changeset 9782:931db6a8c548

Merge
author twisti
date Tue, 15 Dec 2015 01:20:08 +0100
parents 5b1e593803b5 (current diff) 3c50dbb0c7ae (diff)
children 2c44727165a3
files
diffstat 4 files changed, 15 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/code/dependencies.cpp	Mon Dec 14 14:48:30 2015 -0800
+++ b/src/share/vm/code/dependencies.cpp	Tue Dec 15 01:20:08 2015 +0100
@@ -346,7 +346,6 @@
       }
     }
   } else {
-    assert(dep_implicit_context_arg(dept) == 0, "sanity");
     if (note_dep_seen(dept, x0) && note_dep_seen(dept, x1)) {
       // look in this bucket for redundant assertions
       const int stride = 2;
--- a/src/share/vm/compiler/compileBroker.cpp	Mon Dec 14 14:48:30 2015 -0800
+++ b/src/share/vm/compiler/compileBroker.cpp	Tue Dec 15 01:20:08 2015 +0100
@@ -56,6 +56,7 @@
 #if INCLUDE_JVMCI
 #include "jvmci/jvmciCompiler.hpp"
 #include "jvmci/jvmciRuntime.hpp"
+#include "jvmci/jvmciJavaClasses.hpp"
 #include "runtime/vframe.hpp"
 #endif
 #ifdef COMPILER2
@@ -498,7 +499,7 @@
 // CompileBroker::compilation_init
 //
 // Initialize the Compilation object
-void CompileBroker::compilation_init() {
+void CompileBroker::compilation_init(TRAPS) {
   _last_method_compiled[0] = '\0';
 
   // No need to initialize compilation system if we do not use it.
@@ -529,6 +530,17 @@
       } else {
         c1_count = JVMCIHostThreads;
       }
+
+      if (!UseInterpreter) {
+        // Force initialization of JVMCI compiler otherwise JVMCI
+        // compilations will not block until JVMCI is initialized
+        ResourceMark rm;
+        TempNewSymbol getCompiler = SymbolTable::new_symbol("getCompiler", CHECK);
+        TempNewSymbol sig = SymbolTable::new_symbol("()Ljdk/vm/ci/runtime/JVMCICompiler;", CHECK);
+        Handle jvmciRuntime = JVMCIRuntime::get_HotSpotJVMCIRuntime(CHECK);
+        JavaValue result(T_OBJECT);
+        JavaCalls::call_virtual(&result, jvmciRuntime, HotSpotJVMCIRuntime::klass(), getCompiler, sig, CHECK);
+      }
     }
   }
 #endif // INCLUDE_JVMCI
--- a/src/share/vm/compiler/compileBroker.hpp	Mon Dec 14 14:48:30 2015 -0800
+++ b/src/share/vm/compiler/compileBroker.hpp	Tue Dec 15 01:20:08 2015 +0100
@@ -276,7 +276,7 @@
     CompileQueue *q = compile_queue(comp_level);
     return q != NULL ? q->size() : 0;
   }
-  static void compilation_init();
+  static void compilation_init(TRAPS);
   static void init_compiler_thread_log();
   static nmethod* compile_method(const methodHandle& method,
                                  int osr_bci,
--- a/src/share/vm/runtime/thread.cpp	Mon Dec 14 14:48:30 2015 -0800
+++ b/src/share/vm/runtime/thread.cpp	Tue Dec 15 01:20:08 2015 +0100
@@ -3628,7 +3628,7 @@
 
   // initialize compiler(s)
 #if defined(COMPILER1) || defined(COMPILER2) || defined(SHARK) || INCLUDE_JVMCI
-  CompileBroker::compilation_init();
+  CompileBroker::compilation_init(CHECK_JNI_ERR);
 #endif
 
   // Pre-initialize some JSR292 core classes to avoid deadlock during class loading.