< prev index next >

src/share/vm/code/nmethod.cpp

Print this page

        

*** 1019,1029 **** } } void nmethod::cleanup_inline_caches() { - assert_locked_or_safepoint(CompiledIC_lock); // If the method is not entrant or zombie then a JMP is plastered over the // first few bytes. If an oop in the old code was there, that oop // should not get GC'd. Skip the first few bytes of oops on --- 1019,1028 ----
*** 1035,1045 **** // This means that the low_boundary is going to be a little too high. // This shouldn't matter, since oops of non-entrant methods are never used. // In fact, why are we bothering to look at oops in a non-entrant method?? } ! // Find all calls in an nmethod, and clear the ones that points to zombie methods ResourceMark rm; RelocIterator iter(this, low_boundary); while(iter.next()) { switch(iter.type()) { case relocInfo::virtual_call_type: --- 1034,1045 ---- // This means that the low_boundary is going to be a little too high. // This shouldn't matter, since oops of non-entrant methods are never used. // In fact, why are we bothering to look at oops in a non-entrant method?? } ! // Find all calls in an nmethod and clear the ones that point to non-entrant, ! // zombie and unloaded nmethods. ResourceMark rm; RelocIterator iter(this, low_boundary); while(iter.next()) { switch(iter.type()) { case relocInfo::virtual_call_type:
*** 1047,1067 **** CompiledIC *ic = CompiledIC_at(&iter); // Ok, to lookup references to zombies here CodeBlob *cb = CodeCache::find_blob_unsafe(ic->ic_destination()); if( cb != NULL && cb->is_nmethod() ) { nmethod* nm = (nmethod*)cb; ! // Clean inline caches pointing to both zombie and not_entrant methods if (!nm->is_in_use() || (nm->method()->code() != nm)) ic->set_to_clean(); } break; } case relocInfo::static_call_type: { CompiledStaticCall *csc = compiledStaticCall_at(iter.reloc()); CodeBlob *cb = CodeCache::find_blob_unsafe(csc->destination()); if( cb != NULL && cb->is_nmethod() ) { nmethod* nm = (nmethod*)cb; ! // Clean inline caches pointing to both zombie and not_entrant methods if (!nm->is_in_use() || (nm->method()->code() != nm)) csc->set_to_clean(); } break; } } --- 1047,1067 ---- CompiledIC *ic = CompiledIC_at(&iter); // Ok, to lookup references to zombies here CodeBlob *cb = CodeCache::find_blob_unsafe(ic->ic_destination()); if( cb != NULL && cb->is_nmethod() ) { nmethod* nm = (nmethod*)cb; ! // Clean inline caches pointing to zombie, non-entrant and unloaded methods if (!nm->is_in_use() || (nm->method()->code() != nm)) ic->set_to_clean(); } break; } case relocInfo::static_call_type: { CompiledStaticCall *csc = compiledStaticCall_at(iter.reloc()); CodeBlob *cb = CodeCache::find_blob_unsafe(csc->destination()); if( cb != NULL && cb->is_nmethod() ) { nmethod* nm = (nmethod*)cb; ! // Clean inline caches pointing to zombie, non-entrant and unloaded methods if (!nm->is_in_use() || (nm->method()->code() != nm)) csc->set_to_clean(); } break; } }
*** 2527,2537 **** void nmethod::verify() { // Hmm. OSR methods can be deopted but not marked as zombie or not_entrant // seems odd. ! if( is_zombie() || is_not_entrant() ) return; // Make sure all the entry points are correctly aligned for patching. NativeJump::check_verified_entry_alignment(entry_point(), verified_entry_point()); --- 2527,2537 ---- void nmethod::verify() { // Hmm. OSR methods can be deopted but not marked as zombie or not_entrant // seems odd. ! if (is_zombie() || is_not_entrant() || is_unloaded()) return; // Make sure all the entry points are correctly aligned for patching. NativeJump::check_verified_entry_alignment(entry_point(), verified_entry_point());
< prev index next >