diff -r 57ad70bcf06c -r 15936b142f86 src/hotspot/share/aot/aotCompiledMethod.cpp --- a/src/hotspot/share/aot/aotCompiledMethod.cpp Wed Nov 13 11:27:50 2019 +0000 +++ b/src/hotspot/share/aot/aotCompiledMethod.cpp Wed Nov 13 08:23:23 2019 -0500 @@ -160,8 +160,6 @@ } bool AOTCompiledMethod::make_not_entrant_helper(int new_state) { - // Make sure the method is not flushed in case of a safepoint in code below. - methodHandle the_method(method()); NoSafepointVerifier nsv; { @@ -208,10 +206,7 @@ bool AOTCompiledMethod::make_entrant() { assert(!method()->is_old(), "reviving evolved method!"); - // Make sure the method is not flushed in case of a safepoint in code below. - methodHandle the_method(method()); NoSafepointVerifier nsv; - { // Enter critical section. Does not block for safepoint. MutexLocker pl(CompiledMethod_lock, Mutex::_no_safepoint_check_flag);