diff -r 0f1e29c77e50 -r 0fb70c9118ce src/hotspot/share/compiler/compileBroker.cpp --- a/src/hotspot/share/compiler/compileBroker.cpp Wed Jul 10 05:12:23 2019 +0100 +++ b/src/hotspot/share/compiler/compileBroker.cpp Wed Jul 10 07:58:24 2019 -0400 @@ -1595,16 +1595,10 @@ // Final sanity check - the compiler object must exist guarantee(comp != NULL, "Compiler object must exist"); - int system_dictionary_modification_counter; - { - MutexLocker locker(Compile_lock, thread); - system_dictionary_modification_counter = SystemDictionary::number_of_modifications(); - } - { // Must switch to native to allocate ci_env ThreadToNativeFromVM ttn(thread); - ciEnv ci_env(NULL, system_dictionary_modification_counter); + ciEnv ci_env((CompileTask*)NULL); // Cache Jvmti state ci_env.cache_jvmti_state(); // Cache DTrace flags @@ -2045,12 +2039,6 @@ bool failure_reason_on_C_heap = false; const char* retry_message = NULL; - int system_dictionary_modification_counter; - { - MutexLocker locker(Compile_lock, thread); - system_dictionary_modification_counter = SystemDictionary::number_of_modifications(); - } - #if INCLUDE_JVMCI if (UseJVMCICompiler && comp != NULL && comp->is_jvmci()) { JVMCICompiler* jvmci = (JVMCICompiler*) comp; @@ -2064,7 +2052,7 @@ retry_message = "not retryable"; compilable = ciEnv::MethodCompilable_never; } else { - JVMCICompileState compile_state(task, system_dictionary_modification_counter); + JVMCICompileState compile_state(task); JVMCIEnv env(thread, &compile_state, __FILE__, __LINE__); methodHandle method(thread, target_handle); env.runtime()->compile_method(&env, jvmci, method, osr_bci); @@ -2090,7 +2078,7 @@ NoHandleMark nhm; ThreadToNativeFromVM ttn(thread); - ciEnv ci_env(task, system_dictionary_modification_counter); + ciEnv ci_env(task); if (should_break) { ci_env.set_break_at_compile(true); }