hotspot/src/share/vm/runtime/sweeper.cpp
changeset 32466 915d0c3d25aa
parent 32401 cc58aeaec340
child 33148 68fa8b6c4340
equal deleted inserted replaced
32465:d38126f16dbe 32466:915d0c3d25aa
   609       result = MarkedForReclamation;
   609       result = MarkedForReclamation;
   610     }
   610     }
   611   } else if (nm->is_not_entrant()) {
   611   } else if (nm->is_not_entrant()) {
   612     // If there are no current activations of this method on the
   612     // If there are no current activations of this method on the
   613     // stack we can safely convert it to a zombie method
   613     // stack we can safely convert it to a zombie method
   614     if (nm->can_not_entrant_be_converted()) {
   614     if (nm->can_convert_to_zombie()) {
   615       // Clear ICStubs to prevent back patching stubs of zombie or unloaded
   615       // Clear ICStubs to prevent back patching stubs of zombie or unloaded
   616       // nmethods during the next safepoint (see ICStub::finalize).
   616       // nmethods during the next safepoint (see ICStub::finalize).
   617       {
   617       {
   618         MutexLocker cl(CompiledIC_lock);
   618         MutexLocker cl(CompiledIC_lock);
   619         nm->clear_ic_stubs();
   619         nm->clear_ic_stubs();
   643       // No inline caches will ever point to osr methods, so we can just remove it
   643       // No inline caches will ever point to osr methods, so we can just remove it
   644       release_nmethod(nm);
   644       release_nmethod(nm);
   645       assert(result == None, "sanity");
   645       assert(result == None, "sanity");
   646       result = Flushed;
   646       result = Flushed;
   647     } else {
   647     } else {
       
   648       {
       
   649         // Clean ICs of unloaded nmethods as well because they may reference other
       
   650         // unloaded nmethods that may be flushed earlier in the sweeper cycle.
       
   651         MutexLocker cl(CompiledIC_lock);
       
   652         nm->cleanup_inline_caches();
       
   653       }
   648       // Code cache state change is tracked in make_zombie()
   654       // Code cache state change is tracked in make_zombie()
   649       nm->make_zombie();
   655       nm->make_zombie();
   650       SWEEP(nm);
   656       SWEEP(nm);
   651       assert(result == None, "sanity");
   657       assert(result == None, "sanity");
   652       result = MadeZombie;
   658       result = MadeZombie;