本文整理汇总了C++中Klass::adr_name方法的典型用法代码示例。如果您正苦于以下问题:C++ Klass::adr_name方法的具体用法?C++ Klass::adr_name怎么用?C++ Klass::adr_name使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Klass
的用法示例。
在下文中一共展示了Klass::adr_name方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: oop_oop_iterate
int klassKlass::oop_oop_iterate(oop obj, OopClosure* blk) {
// Get size before changing pointers
int size = oop_size(obj);
Klass* k = Klass::cast(klassOop(obj));
blk->do_oop(k->adr_super());
for (juint i = 0; i < Klass::primary_super_limit(); i++)
blk->do_oop(k->adr_primary_supers()+i);
blk->do_oop(k->adr_secondary_super_cache());
blk->do_oop(k->adr_secondary_supers());
blk->do_oop(k->adr_java_mirror());
blk->do_oop(k->adr_name());
// The following are in the perm gen and are treated
// specially in a later phase of a perm gen collection; ...
assert(oop(k)->is_perm(), "should be in perm");
assert(oop(k->subklass())->is_perm_or_null(), "should be in perm");
assert(oop(k->next_sibling())->is_perm_or_null(), "should be in perm");
// ... don't scan them normally, but remember this klassKlass
// for later (see, for instance, oop_follow_contents above
// for what MarkSweep does with it.
if (blk->should_remember_klasses()) {
blk->remember_klass(k);
}
obj->oop_iterate_header(blk);
return size;
}
示例2: oop_oop_iterate_m
int klassKlass::oop_oop_iterate_m(oop obj, OopClosure* blk, MemRegion mr) {
// Get size before changing pointers
int size = oop_size(obj);
Klass* k = Klass::cast(klassOop(obj));
oop* adr;
adr = k->adr_super();
if (mr.contains(adr)) blk->do_oop(adr);
for (juint i = 0; i < Klass::primary_super_limit(); i++) {
adr = k->adr_primary_supers()+i;
if (mr.contains(adr)) blk->do_oop(adr);
}
adr = k->adr_secondary_super_cache();
if (mr.contains(adr)) blk->do_oop(adr);
adr = k->adr_secondary_supers();
if (mr.contains(adr)) blk->do_oop(adr);
adr = k->adr_java_mirror();
if (mr.contains(adr)) blk->do_oop(adr);
adr = k->adr_name();
if (mr.contains(adr)) blk->do_oop(adr);
// The following are "weak links" in the perm gen and are
// treated specially in a later phase of a perm gen collection.
assert(oop(k)->is_perm(), "should be in perm");
assert(oop(k->adr_subklass())->is_perm(), "should be in perm");
assert(oop(k->adr_next_sibling())->is_perm(), "should be in perm");
if (blk->should_remember_klasses()
&& (mr.contains(k->adr_subklass())
|| mr.contains(k->adr_next_sibling()))) {
blk->remember_klass(k);
}
obj->oop_iterate_header(blk, mr);
return size;
}
示例3: oop_follow_contents
void klassKlass::oop_follow_contents(oop obj) {
Klass* k = Klass::cast(klassOop(obj));
// If we are alive it is valid to keep our superclass and subtype caches alive
MarkSweep::mark_and_push(k->adr_super());
for (juint i = 0; i < Klass::primary_super_limit(); i++)
MarkSweep::mark_and_push(k->adr_primary_supers()+i);
MarkSweep::mark_and_push(k->adr_secondary_super_cache());
MarkSweep::mark_and_push(k->adr_secondary_supers());
MarkSweep::mark_and_push(k->adr_java_mirror());
MarkSweep::mark_and_push(k->adr_name());
// We follow the subklass and sibling links at the end of the
// marking phase, since otherwise following them will prevent
// class unloading (all classes are transitively linked from
// java.lang.Object).
MarkSweep::revisit_weak_klass_link(k);
obj->follow_header();
}
示例4: oop_adjust_pointers
int klassKlass::oop_adjust_pointers(oop obj) {
// Get size before changing pointers
int size = oop_size(obj);
obj->adjust_header();
Klass* k = Klass::cast(klassOop(obj));
MarkSweep::adjust_pointer(k->adr_super());
for (juint i = 0; i < Klass::primary_super_limit(); i++)
MarkSweep::adjust_pointer(k->adr_primary_supers()+i);
MarkSweep::adjust_pointer(k->adr_secondary_super_cache());
MarkSweep::adjust_pointer(k->adr_secondary_supers());
MarkSweep::adjust_pointer(k->adr_java_mirror());
MarkSweep::adjust_pointer(k->adr_name());
MarkSweep::adjust_pointer(k->adr_subklass());
MarkSweep::adjust_pointer(k->adr_next_sibling());
return size;
}