--- old/src/share/vm/runtime/sweeper.cpp 2014-10-07 12:56:31.853608251 +0200 +++ new/src/share/vm/runtime/sweeper.cpp 2014-10-07 12:56:31.773608255 +0200 @@ -543,9 +543,10 @@ if (PrintMethodFlushing && Verbose) { tty->print_cr("### Nmethod %3d/" PTR_FORMAT " (not entrant) being made zombie", nm->compile_id(), nm); } + // Do not check for a safepoint here + MutexLockerEx cl(CompiledIC_lock, Mutex::_no_safepoint_check_flag); // Clear ICStubs to prevent back patching stubs of zombie or unloaded // nmethods during the next safepoint (see ICStub::finalize). - MutexLocker cl(CompiledIC_lock); nm->clear_ic_stubs(); // Code cache state change is tracked in make_zombie() nm->make_zombie();