< prev index next >

src/hotspot/share/compiler/compileBroker.cpp

Print this page
rev 55090 : secret-sfac


1057     // We now know that this compilation is not pending, complete,
1058     // or prohibited.  Assign a compile_id to this compilation
1059     // and check to see if it is in our [Start..Stop) range.
1060     int compile_id = assign_compile_id(method, osr_bci);
1061     if (compile_id == 0) {
1062       // The compilation falls outside the allowed range.
1063       return;
1064     }
1065 
1066 #if INCLUDE_JVMCI
1067     if (UseJVMCICompiler) {
1068       if (blocking) {
1069         // Don't allow blocking compiles for requests triggered by JVMCI.
1070         if (thread->is_Compiler_thread()) {
1071           blocking = false;
1072         }
1073 
1074         // Don't allow blocking compiles if inside a class initializer or while performing class loading
1075         vframeStream vfst((JavaThread*) thread);
1076         for (; !vfst.at_end(); vfst.next()) {
1077           if (vfst.method()->is_static_initializer() ||
1078               (vfst.method()->method_holder()->is_subclass_of(SystemDictionary::ClassLoader_klass()) &&
1079                   vfst.method()->name() == vmSymbols::loadClass_name())) {
1080             blocking = false;
1081             break;
1082           }
1083         }
1084 
1085         // Don't allow blocking compilation requests to JVMCI
1086         // if JVMCI itself is not yet initialized
1087         if (!JVMCIRuntime::is_HotSpotJVMCIRuntime_initialized() && compiler(comp_level)->is_jvmci()) {
1088           blocking = false;
1089         }
1090 
1091         // Don't allow blocking compilation requests if we are in JVMCIRuntime::shutdown
1092         // to avoid deadlock between compiler thread(s) and threads run at shutdown
1093         // such as the DestroyJavaVM thread.
1094         if (JVMCIRuntime::shutdown_called()) {
1095           blocking = false;
1096         }
1097       }




1057     // We now know that this compilation is not pending, complete,
1058     // or prohibited.  Assign a compile_id to this compilation
1059     // and check to see if it is in our [Start..Stop) range.
1060     int compile_id = assign_compile_id(method, osr_bci);
1061     if (compile_id == 0) {
1062       // The compilation falls outside the allowed range.
1063       return;
1064     }
1065 
1066 #if INCLUDE_JVMCI
1067     if (UseJVMCICompiler) {
1068       if (blocking) {
1069         // Don't allow blocking compiles for requests triggered by JVMCI.
1070         if (thread->is_Compiler_thread()) {
1071           blocking = false;
1072         }
1073 
1074         // Don't allow blocking compiles if inside a class initializer or while performing class loading
1075         vframeStream vfst((JavaThread*) thread);
1076         for (; !vfst.at_end(); vfst.next()) {
1077           if (vfst.method()->is_class_initializer() ||
1078               (vfst.method()->method_holder()->is_subclass_of(SystemDictionary::ClassLoader_klass()) &&
1079                   vfst.method()->name() == vmSymbols::loadClass_name())) {
1080             blocking = false;
1081             break;
1082           }
1083         }
1084 
1085         // Don't allow blocking compilation requests to JVMCI
1086         // if JVMCI itself is not yet initialized
1087         if (!JVMCIRuntime::is_HotSpotJVMCIRuntime_initialized() && compiler(comp_level)->is_jvmci()) {
1088           blocking = false;
1089         }
1090 
1091         // Don't allow blocking compilation requests if we are in JVMCIRuntime::shutdown
1092         // to avoid deadlock between compiler thread(s) and threads run at shutdown
1093         // such as the DestroyJavaVM thread.
1094         if (JVMCIRuntime::shutdown_called()) {
1095           blocking = false;
1096         }
1097       }


< prev index next >