--- old/src/hotspot/share/runtime/vmOperations.cpp 2019-05-04 16:23:01.687565771 -0700 +++ new/src/hotspot/share/runtime/vmOperations.cpp 2019-05-04 16:23:00.428563894 -0700 @@ -437,14 +437,14 @@ if (thr->is_Compiler_thread()) { #if INCLUDE_JVMCI CompilerThread* ct = (CompilerThread*) thr; - if (ct->compiler() == NULL || !ct->compiler()->is_jvmci() || !UseJVMCINativeLibrary) { + if (ct->compiler() == NULL || !ct->compiler()->is_jvmci()) { num_active_compiler_thread++; } else { - // When using a compiler in a JVMCI shared library, it's possible - // for one compiler thread to grab a lock in the shared library, - // enter HotSpot and go to sleep on the shutdown safepoint. Another - // JVMCI shared library compiler thread can then attempt to grab the - // lock and thus never make progress. + // A JVMCI compiler thread never accesses VM data structures + // while in _thread_in_native state so there's no need to wait + // for it and potentially add a 300 millisecond delay to VM + // shutdown. + num_active--; } #else num_active_compiler_thread++;