equal
deleted
inserted
replaced
436 if (thr!=thr_cur && thr->thread_state() == _thread_in_native) { |
436 if (thr!=thr_cur && thr->thread_state() == _thread_in_native) { |
437 num_active++; |
437 num_active++; |
438 if (thr->is_Compiler_thread()) { |
438 if (thr->is_Compiler_thread()) { |
439 #if INCLUDE_JVMCI |
439 #if INCLUDE_JVMCI |
440 CompilerThread* ct = (CompilerThread*) thr; |
440 CompilerThread* ct = (CompilerThread*) thr; |
441 if (ct->compiler() == NULL || !ct->compiler()->is_jvmci() || !UseJVMCINativeLibrary) { |
441 if (ct->compiler() == NULL || !ct->compiler()->is_jvmci()) { |
442 num_active_compiler_thread++; |
442 num_active_compiler_thread++; |
443 } else { |
443 } else { |
444 // When using a compiler in a JVMCI shared library, it's possible |
444 // A JVMCI compiler thread never accesses VM data structures |
445 // for one compiler thread to grab a lock in the shared library, |
445 // while in _thread_in_native state so there's no need to wait |
446 // enter HotSpot and go to sleep on the shutdown safepoint. Another |
446 // for it and potentially add a 300 millisecond delay to VM |
447 // JVMCI shared library compiler thread can then attempt to grab the |
447 // shutdown. |
448 // lock and thus never make progress. |
448 num_active--; |
449 } |
449 } |
450 #else |
450 #else |
451 num_active_compiler_thread++; |
451 num_active_compiler_thread++; |
452 #endif |
452 #endif |
453 } |
453 } |