# HG changeset patch # User Tom Rodriguez # Date 1427309269 25200 # Node ID 104304a54b0cd8f6f3009492368edf25a09a7fda # Parent 87419b0d9bfbda955644e430e4c91ac09ae3e9b4 Support CTW in product for graal diff -r 87419b0d9bfb -r 104304a54b0c src/share/vm/graal/graalCompiler.cpp --- a/src/share/vm/graal/graalCompiler.cpp Wed Mar 25 16:16:36 2015 +0100 +++ b/src/share/vm/graal/graalCompiler.cpp Wed Mar 25 11:47:49 2015 -0700 @@ -155,7 +155,6 @@ tty->print_cr(" Graal code install time: %6.3f s", _codeInstallTimer.seconds()); } -#ifndef PRODUCT void GraalCompiler::compile_the_world() { HandleMark hm; JavaThread* THREAD = JavaThread::current(); @@ -167,4 +166,3 @@ args.push_oop(GraalRuntime::get_HotSpotGraalRuntime()); JavaCalls::call_special(&result, klass, compileTheWorld, vmSymbols::void_method_signature(), &args, CHECK_ABORT); } -#endif diff -r 87419b0d9bfb -r 104304a54b0c src/share/vm/graal/graalCompiler.hpp --- a/src/share/vm/graal/graalCompiler.hpp Wed Mar 25 16:16:36 2015 +0100 +++ b/src/share/vm/graal/graalCompiler.hpp Wed Mar 25 11:47:49 2015 -0700 @@ -87,9 +87,7 @@ static elapsedTimer* codeInstallTimer() { return &_codeInstallTimer; } -#ifndef PRODUCT void compile_the_world(); -#endif }; #endif // SHARE_VM_GRAAL_GRAAL_COMPILER_HPP diff -r 87419b0d9bfb -r 104304a54b0c src/share/vm/prims/jni.cpp --- a/src/share/vm/prims/jni.cpp Wed Mar 25 16:16:36 2015 +0100 +++ b/src/share/vm/prims/jni.cpp Wed Mar 25 11:47:49 2015 -0700 @@ -5199,7 +5199,7 @@ *vm = (JavaVM *)(&main_vm); *(JNIEnv**)penv = thread->jni_environment(); -#if defined(GRAAL) && !defined(PRODUCT) +#if defined(GRAAL) // We turn off CompileTheWorld so that compilation requests are not ignored during bootstrap or that Graal can be compiled by C1/C2. bool doCTW = CompileTheWorld; CompileTheWorld = false; @@ -5210,14 +5210,14 @@ if (FLAG_IS_DEFAULT(BootstrapGraal) ? !TieredCompilation : BootstrapGraal) { GraalCompiler::instance()->bootstrap(); } -#elif defined(GRAAL) && !defined(PRODUCT) +#elif defined(GRAAL) if (doCTW) { // required for hosted CTW. CompilationPolicy::completed_vm_startup(); } #endif -#if defined(GRAAL) && !defined(PRODUCT) +#if defined(GRAAL) if (doCTW) { GraalCompiler::instance()->compile_the_world(); } diff -r 87419b0d9bfb -r 104304a54b0c src/share/vm/runtime/globals.hpp --- a/src/share/vm/runtime/globals.hpp Wed Mar 25 16:16:36 2015 +0100 +++ b/src/share/vm/runtime/globals.hpp Wed Mar 25 11:47:49 2015 -0700 @@ -2678,9 +2678,13 @@ "Delay invoking the compiler until main application class is " \ "loaded") \ \ - develop(bool, CompileTheWorld, false, \ + NOT_GRAAL(develop(bool, CompileTheWorld, false, \ "Compile all methods in all classes in bootstrap class path " \ - "(stress test)") \ + "(stress test)")) \ + \ + GRAAL_ONLY(product(bool, CompileTheWorld, false, \ + "Compile all methods in all classes in bootstrap class path " \ + "(stress test)")) \ \ develop(bool, CompileTheWorldPreloadClasses, true, \ "Preload all classes used by a class before start loading") \