diff src/share/vm/prims/jni.cpp @ 15463:a20be10ad437

made Graal work with the HotSpot compiler queue and compiler threads, enabled by -XX:-UseGraalCompilationQueue
author Doug Simon <doug.simon@oracle.com>
date Fri, 02 May 2014 00:36:27 +0200
parents 0aed1c2d0caa
children 063ec2920d21
line wrap: on
line diff
--- a/src/share/vm/prims/jni.cpp	Fri May 02 00:17:40 2014 +0200
+++ b/src/share/vm/prims/jni.cpp	Fri May 02 00:36:27 2014 +0200
@@ -5174,15 +5174,19 @@
     *(JNIEnv**)penv = thread->jni_environment();
 
 #ifdef GRAAL
-    // GraalCompiler needs to have been created in compileBroker.cpp
-    GraalCompiler* graal_compiler = GraalCompiler::instance();
-    if (ForceGraalInitialization && graal_compiler == NULL) {
-      graal_compiler = new GraalCompiler();
-    }
-    if (graal_compiler != NULL) {
-      graal_compiler->initialize();
+    if (COMPILERGRAAL_PRESENT(UseGraalCompilationQueue) NOT_COMPILERGRAAL(true)) {
+      // GraalCompiler needs to have been created in compileBroker.cpp
+      GraalCompiler* graal_compiler = GraalCompiler::instance();
+      if (ForceGraalInitialization && graal_compiler == NULL) {
+        graal_compiler = new GraalCompiler();
+      }
+      if (graal_compiler != NULL) {
+        graal_compiler->initialize();
+      } else {
+        assert(!UseCompiler, "why isn't there any compiler?");
+      }
     } else {
-      assert(!UseCompiler, "why isn't there any compiler?");
+      // Graal is initialized on a CompilerThread
     }
 #endif