hotspot/src/share/vm/runtime/simpleThresholdPolicy.cpp
changeset 40074 135bb8aa1e18
parent 40034 4a288aaf8511
child 40364 5bf8fa4fddfd
equal deleted inserted replaced
40073:4b4da1fb5091 40074:135bb8aa1e18
   234 void SimpleThresholdPolicy::compile(const methodHandle& mh, int bci, CompLevel level, JavaThread* thread) {
   234 void SimpleThresholdPolicy::compile(const methodHandle& mh, int bci, CompLevel level, JavaThread* thread) {
   235   assert(level <= TieredStopAtLevel, "Invalid compilation level");
   235   assert(level <= TieredStopAtLevel, "Invalid compilation level");
   236   if (level == CompLevel_none) {
   236   if (level == CompLevel_none) {
   237     return;
   237     return;
   238   }
   238   }
   239 
       
   240 #if INCLUDE_JVMCI
       
   241   // We can't compile with a JVMCI compiler until the module system is initialized past
       
   242   // phase 3.  The JVMCI API itself isn't available until phase 2 and ServiceLoader isn't
       
   243   // usable until after phase 3.
       
   244   if (level == CompLevel_full_optimization && EnableJVMCI && UseJVMCICompiler) {
       
   245     if (SystemDictionary::java_system_loader() == NULL) {
       
   246       return;
       
   247      }
       
   248      assert(Universe::is_module_initialized(), "must be");
       
   249   }
       
   250 #endif
       
   251 
   239 
   252   // Check if the method can be compiled. If it cannot be compiled with C1, continue profiling
   240   // Check if the method can be compiled. If it cannot be compiled with C1, continue profiling
   253   // in the interpreter and then compile with C2 (the transition function will request that,
   241   // in the interpreter and then compile with C2 (the transition function will request that,
   254   // see common() ). If the method cannot be compiled with C2 but still can with C1, compile it with
   242   // see common() ). If the method cannot be compiled with C2 but still can with C1, compile it with
   255   // pure C1.
   243   // pure C1.