--- a/src/hotspot/share/runtime/vmOperations.cpp Tue May 07 10:21:04 2019 +0800
+++ b/src/hotspot/share/runtime/vmOperations.cpp Mon May 06 20:05:19 2019 -0700
@@ -438,14 +438,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++;