Mercurial > hg > truffle
diff src/share/vm/prims/jni.cpp @ 15603:b7fb36e57da8
made Graal initialization be driven from Java to simplify sequencing and synchronization
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 12 May 2014 23:27:07 +0200 |
parents | 063ec2920d21 |
children | 66a9286203a2 |
line wrap: on
line diff
--- a/src/share/vm/prims/jni.cpp Mon May 12 22:37:26 2014 +0200 +++ b/src/share/vm/prims/jni.cpp Mon May 12 23:27:07 2014 +0200 @@ -35,6 +35,7 @@ #include "utilities/macros.hpp" #ifdef GRAAL #include "graal/graalCompiler.hpp" +#include "graal/graalVMToCompiler.hpp" #endif #if INCLUDE_ALL_GCS #include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp" @@ -5210,7 +5211,19 @@ #endif // Check if we should compile all classes on bootclasspath +#ifdef GRAAL +#ifndef COMPILERGRAAL + if (CompileTheWorld) { + // Graal is considered as application code so we need to + // stop the VM deferring compilation now. + CompilationPolicy::completed_vm_startup(); + + VMToCompiler::compileTheWorld(); + } +#endif +#else if (CompileTheWorld) ClassLoader::compile_the_world(); +#endif if (ReplayCompiles) ciReplay::replay(thread); // Some platforms (like Win*) need a wrapper around these test