--- old/src/share/vm/runtime/simpleThresholdPolicy.cpp 2016-06-27 19:50:35.000000000 -0700 +++ new/src/share/vm/runtime/simpleThresholdPolicy.cpp 2016-06-27 19:50:35.000000000 -0700 @@ -238,8 +238,11 @@ } #if INCLUDE_JVMCI - // We can't compile with a JVMCI compiler until the module system is initialized. - if (level == CompLevel_full_optimization && UseJVMCICompiler && !Universe::is_module_initialized()) { + // We can't compile with a JVMCI compiler until the module system is initialized past + // phase 3. The JVMCI API itself isn't available until phase 2 and ServiceLoader isn't + // usable until after phase 3. + if (level == CompLevel_full_optimization && UseJVMCICompiler && SystemDictionary::java_system_loader() == NULL) { + assert(Universe::is_module_initialized(), "must be"); return; } #endif