hotspot/src/share/vm/compiler/compileBroker.cpp
changeset 35114 3d49d37ab9c4
parent 34196 72152eea3d39
child 35129 8b93709bf4e5
equal deleted inserted replaced
35112:b3c4347bb751 35114:3d49d37ab9c4
    54 #include "c1/c1_Compiler.hpp"
    54 #include "c1/c1_Compiler.hpp"
    55 #endif
    55 #endif
    56 #if INCLUDE_JVMCI
    56 #if INCLUDE_JVMCI
    57 #include "jvmci/jvmciCompiler.hpp"
    57 #include "jvmci/jvmciCompiler.hpp"
    58 #include "jvmci/jvmciRuntime.hpp"
    58 #include "jvmci/jvmciRuntime.hpp"
       
    59 #include "jvmci/jvmciJavaClasses.hpp"
    59 #include "runtime/vframe.hpp"
    60 #include "runtime/vframe.hpp"
    60 #endif
    61 #endif
    61 #ifdef COMPILER2
    62 #ifdef COMPILER2
    62 #include "opto/c2compiler.hpp"
    63 #include "opto/c2compiler.hpp"
    63 #endif
    64 #endif
   496 
   497 
   497 // ------------------------------------------------------------------
   498 // ------------------------------------------------------------------
   498 // CompileBroker::compilation_init
   499 // CompileBroker::compilation_init
   499 //
   500 //
   500 // Initialize the Compilation object
   501 // Initialize the Compilation object
   501 void CompileBroker::compilation_init() {
   502 void CompileBroker::compilation_init(TRAPS) {
   502   _last_method_compiled[0] = '\0';
   503   _last_method_compiled[0] = '\0';
   503 
   504 
   504   // No need to initialize compilation system if we do not use it.
   505   // No need to initialize compilation system if we do not use it.
   505   if (!UseCompiler) {
   506   if (!UseCompiler) {
   506     return;
   507     return;
   526         c2_count = JVMCIThreads;
   527         c2_count = JVMCIThreads;
   527       }
   528       }
   528       if (FLAG_IS_DEFAULT(JVMCIHostThreads)) {
   529       if (FLAG_IS_DEFAULT(JVMCIHostThreads)) {
   529       } else {
   530       } else {
   530         c1_count = JVMCIHostThreads;
   531         c1_count = JVMCIHostThreads;
       
   532       }
       
   533 
       
   534       if (!UseInterpreter) {
       
   535         // Force initialization of JVMCI compiler otherwise JVMCI
       
   536         // compilations will not block until JVMCI is initialized
       
   537         ResourceMark rm;
       
   538         TempNewSymbol getCompiler = SymbolTable::new_symbol("getCompiler", CHECK);
       
   539         TempNewSymbol sig = SymbolTable::new_symbol("()Ljdk/vm/ci/runtime/JVMCICompiler;", CHECK);
       
   540         Handle jvmciRuntime = JVMCIRuntime::get_HotSpotJVMCIRuntime(CHECK);
       
   541         JavaValue result(T_OBJECT);
       
   542         JavaCalls::call_virtual(&result, jvmciRuntime, HotSpotJVMCIRuntime::klass(), getCompiler, sig, CHECK);
   531       }
   543       }
   532     }
   544     }
   533   }
   545   }
   534 #endif // INCLUDE_JVMCI
   546 #endif // INCLUDE_JVMCI
   535 
   547