# HG changeset patch # User Bernhard Urban # Date 1398353485 -7200 # Node ID 0aed1c2d0caa4a5182e3befadce88d3451e0fe83 # Parent 9693513ce95c5580e6f61274d30444059c22863e graal init: add flag to force compiler initialization diff -r 9693513ce95c -r 0aed1c2d0caa src/share/vm/graal/graalGlobals.hpp --- a/src/share/vm/graal/graalGlobals.hpp Thu Apr 24 17:09:39 2014 +0200 +++ b/src/share/vm/graal/graalGlobals.hpp Thu Apr 24 17:31:25 2014 +0200 @@ -52,6 +52,9 @@ COMPILERGRAAL_PRESENT(product(bool, BootstrapGraal, true, \ "Bootstrap Graal before running Java main method")) \ \ + product(bool, ForceGraalInitialization, false, \ + "Force VM to initialize the Compiler although not used") \ + \ product(intx, TraceGraal, 0, \ "Trace level for Graal") \ \ diff -r 9693513ce95c -r 0aed1c2d0caa src/share/vm/prims/jni.cpp --- a/src/share/vm/prims/jni.cpp Thu Apr 24 17:09:39 2014 +0200 +++ b/src/share/vm/prims/jni.cpp Thu Apr 24 17:31:25 2014 +0200 @@ -5176,6 +5176,9 @@ #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(); } else {