8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library

Reviewed-by: dnsimon, never, stefank, rehn, neliasso, dholmes, kbarrett, coleenp
This commit is contained in:
Vladimir Kozlov 2019-05-01 12:31:29 -07:00
parent f9bbbb6e27
commit e9c523ae5f
173 changed files with 12881 additions and 5297 deletions

View file

@ -435,7 +435,20 @@ int VM_Exit::wait_for_threads_in_native_to_block() {
if (thr!=thr_cur && thr->thread_state() == _thread_in_native) {
num_active++;
if (thr->is_Compiler_thread()) {
#if INCLUDE_JVMCI
CompilerThread* ct = (CompilerThread*) thr;
if (ct->compiler() == NULL || !ct->compiler()->is_jvmci() || !UseJVMCINativeLibrary) {
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.
}
#else
num_active_compiler_thread++;
#endif
}
}
}