< prev index next >

src/hotspot/share/runtime/sweeper.cpp

   // Skip methods that are currently referenced by the VM
   if (cm->is_locked_by_vm()) {
     // But still remember to clean-up inline caches for alive nmethods
     if (cm->is_alive() && !cm->is_unloading()) {
       // Clean inline caches that point to zombie/non-entrant/unloaded nmethods
-      CompiledICLocker ml(cm);
       cm->cleanup_inline_caches(false);
       SWEEP(cm);
     }
     return result;
   }

@@ -743,23 +742,20 result = MadeZombie; assert(cm->is_zombie(), "nmethod must be zombie"); } } else { // Still alive, clean up its inline caches - CompiledICLocker ml(cm); cm->cleanup_inline_caches(false); SWEEP(cm); } } else if (cm->is_unloaded()) { // Code is unloaded, so there are no activations on the stack. // Convert the nmethod to zombie or flush it directly in the OSR case. - { - // Clean ICs of unloaded nmethods as well because they may reference other - // unloaded nmethods that may be flushed earlier in the sweeper cycle. - CompiledICLocker ml(cm); - cm->cleanup_inline_caches(false); - } + + // Clean ICs of unloaded nmethods as well because they may reference other + // unloaded nmethods that may be flushed earlier in the sweeper cycle. + cm->cleanup_inline_caches(false); if (cm->is_osr_method()) { SWEEP(cm); // No inline caches will ever point to osr methods, so we can just remove it release_compiled_method(cm); assert(result == None, "sanity");
@@ -774,11 +770,10 } else { if (cm->is_nmethod()) { possibly_flush((nmethod*)cm); } // Clean inline caches that point to zombie/non-entrant/unloaded nmethods - CompiledICLocker ml(cm); cm->cleanup_inline_caches(false); SWEEP(cm); } return result; }
< prev index next >