hotspot/src/share/vm/runtime/thread.cpp
changeset 40034 4a288aaf8511
parent 39391 b9bb367ccb85
child 40074 135bb8aa1e18
--- a/hotspot/src/share/vm/runtime/thread.cpp	Mon Jun 27 17:23:15 2016 +0300
+++ b/hotspot/src/share/vm/runtime/thread.cpp	Tue Jun 28 17:22:56 2016 +0000
@@ -3770,6 +3770,13 @@
   // Final system initialization including security manager and system class loader
   call_initPhase3(CHECK_JNI_ERR);
 
+#if INCLUDE_JVMCI
+  if (EnableJVMCI && UseJVMCICompiler && (!UseInterpreter || !BackgroundCompilation)) {
+    // 8145270: Force initialization of JVMCI runtime otherwise requests for blocking
+    // compilations via JVMCI will not actually block until JVMCI is initialized.
+    JVMCIRuntime::force_initialization(CHECK_JNI_ERR);
+  }
+#endif
   // cache the system class loader
   SystemDictionary::compute_java_system_loader(CHECK_(JNI_ERR));