comparison src/share/vm/prims/jni.cpp @ 20028:104304a54b0c

Support CTW in product for graal
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Wed, 25 Mar 2015 11:47:49 -0700
parents 6a2f814224b1
children 7848fc12602b
comparison
equal deleted inserted replaced
20027:87419b0d9bfb 20028:104304a54b0c
5197 JavaThread *thread = JavaThread::current(); 5197 JavaThread *thread = JavaThread::current();
5198 /* thread is thread_in_vm here */ 5198 /* thread is thread_in_vm here */
5199 *vm = (JavaVM *)(&main_vm); 5199 *vm = (JavaVM *)(&main_vm);
5200 *(JNIEnv**)penv = thread->jni_environment(); 5200 *(JNIEnv**)penv = thread->jni_environment();
5201 5201
5202 #if defined(GRAAL) && !defined(PRODUCT) 5202 #if defined(GRAAL)
5203 // We turn off CompileTheWorld so that compilation requests are not ignored during bootstrap or that Graal can be compiled by C1/C2. 5203 // We turn off CompileTheWorld so that compilation requests are not ignored during bootstrap or that Graal can be compiled by C1/C2.
5204 bool doCTW = CompileTheWorld; 5204 bool doCTW = CompileTheWorld;
5205 CompileTheWorld = false; 5205 CompileTheWorld = false;
5206 #endif 5206 #endif
5207 5207
5208 #ifdef COMPILERGRAAL 5208 #ifdef COMPILERGRAAL
5209 // Graal is initialized on a CompilerThread 5209 // Graal is initialized on a CompilerThread
5210 if (FLAG_IS_DEFAULT(BootstrapGraal) ? !TieredCompilation : BootstrapGraal) { 5210 if (FLAG_IS_DEFAULT(BootstrapGraal) ? !TieredCompilation : BootstrapGraal) {
5211 GraalCompiler::instance()->bootstrap(); 5211 GraalCompiler::instance()->bootstrap();
5212 } 5212 }
5213 #elif defined(GRAAL) && !defined(PRODUCT) 5213 #elif defined(GRAAL)
5214 if (doCTW) { 5214 if (doCTW) {
5215 // required for hosted CTW. 5215 // required for hosted CTW.
5216 CompilationPolicy::completed_vm_startup(); 5216 CompilationPolicy::completed_vm_startup();
5217 } 5217 }
5218 #endif 5218 #endif
5219 5219
5220 #if defined(GRAAL) && !defined(PRODUCT) 5220 #if defined(GRAAL)
5221 if (doCTW) { 5221 if (doCTW) {
5222 GraalCompiler::instance()->compile_the_world(); 5222 GraalCompiler::instance()->compile_the_world();
5223 } 5223 }
5224 #endif 5224 #endif
5225 5225