本文整理汇总了C++中oop::is_perm方法的典型用法代码示例。如果您正苦于以下问题:C++ oop::is_perm方法的具体用法?C++ oop::is_perm怎么用?C++ oop::is_perm使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类oop
的用法示例。
在下文中一共展示了oop::is_perm方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: oop_verify_on
void klassKlass::oop_verify_on(oop obj, outputStream* st) {
Klass::oop_verify_on(obj, st);
guarantee(obj->is_perm(), "should be in permspace");
guarantee(obj->is_klass(), "should be klass");
Klass* k = Klass::cast(klassOop(obj));
if (k->super() != NULL) {
guarantee(k->super()->is_perm(), "should be in permspace");
guarantee(k->super()->is_klass(), "should be klass");
}
klassOop ko = k->secondary_super_cache();
if( ko != NULL ) {
guarantee(ko->is_perm(), "should be in permspace");
guarantee(ko->is_klass(), "should be klass");
}
for( uint i = 0; i < primary_super_limit(); i++ ) {
oop ko = k->adr_primary_supers()[i]; // Cannot use normal accessor because it asserts
if( ko != NULL ) {
guarantee(ko->is_perm(), "should be in permspace");
guarantee(ko->is_klass(), "should be klass");
}
}
if (k->java_mirror() != NULL || (k->oop_is_instance() && instanceKlass::cast(klassOop(obj))->is_loaded())) {
guarantee(k->java_mirror() != NULL, "should be allocated");
guarantee(k->java_mirror()->is_perm(), "should be in permspace");
guarantee(k->java_mirror()->is_instance(), "should be instance");
}
if (k->name() != NULL) {
guarantee(Universe::heap()->is_in_permanent(k->name()),
"should be in permspace");
guarantee(k->name()->is_symbol(), "should be symbol");
}
}
示例2: init_flags_from
void init_flags_from(oop x) {
int flags = 0;
if (x != NULL) {
if (x->is_perm())
flags |= PERM_FLAG;
if (x->is_scavengable())
flags |= SCAVENGABLE_FLAG;
}
_ident |= flags;
}
示例3: assemble_ic_buffer_code
void InlineCacheBuffer::assemble_ic_buffer_code(address code_begin, oop cached_oop, address entry_point) {
ResourceMark rm;
CodeBuffer code(code_begin, ic_stub_code_size());
MacroAssembler* masm = new MacroAssembler(&code);
// note: even though the code contains an embedded oop, we do not need reloc info
// because
// (1) the oop is old (i.e., doesn't matter for scavenges)
// (2) these ICStubs are removed *before* a GC happens, so the roots disappear
assert(cached_oop == NULL || cached_oop->is_perm(), "must be perm oop");
masm->lea(rax, OopAddress((address) cached_oop));
masm->jump(ExternalAddress(entry_point));
}
示例4: assemble_ic_buffer_code
void InlineCacheBuffer::assemble_ic_buffer_code(address code_begin, oop cached_oop, address entry_point) {
ResourceMark rm;
CodeBuffer code(code_begin, ic_stub_code_size());
MacroAssembler* masm = new MacroAssembler(&code);
// note: even though the code contains an embedded oop, we do not need reloc info
// because
// (1) the oop is old (i.e., doesn't matter for scavenges)
// (2) these ICStubs are removed *before* a GC happens, so the roots disappear
assert(cached_oop == NULL || cached_oop->is_perm(), "must be old oop");
AddressLiteral cached_oop_addrlit(cached_oop, relocInfo::none);
// Force the set to generate the fixed sequence so next_instruction_address works
masm->patchable_set(cached_oop_addrlit, G5_inline_cache_reg);
assert(G3_scratch != G5_method, "Do not clobber the method oop in the transition stub");
assert(G3_scratch != G5_inline_cache_reg, "Do not clobber the inline cache register in the transition stub");
AddressLiteral entry(entry_point);
masm->JUMP(entry, G3_scratch, 0);
masm->delayed()->nop();
masm->flush();
}
示例5: create_transition_stub
void InlineCacheBuffer::create_transition_stub(CompiledIC *ic, oop cached_oop, address entry) {
assert(!SafepointSynchronize::is_at_safepoint(), "should not be called during a safepoint");
assert (CompiledIC_lock->is_locked(), "");
assert(cached_oop == NULL || cached_oop->is_perm(), "must belong to perm. space");
if (TraceICBuffer) { tty->print_cr(" create transition stub for " INTPTR_FORMAT, ic->instruction_address()); }
// If an transition stub is already associate with the inline cache, then we remove the association.
if (ic->is_in_transition_state()) {
ICStub* old_stub = ICStub_from_destination_address(ic->stub_address());
old_stub->clear();
}
// allocate and initialize new "out-of-line" inline-cache
ICStub* ic_stub = get_next_stub();
ic_stub->set_stub(ic, cached_oop, entry);
// Update inline cache in nmethod to point to new "out-of-line" allocated inline cache
ic->set_ic_destination(ic_stub->code_begin());
set_next_stub(new_ic_stub()); // can cause safepoint synchronization
}