diff src/share/vm/graal/graalCompiler.cpp @ 12652:0dd597c6c9c7

fixed performance regression in hosted CompileTheWorld
author Doug Simon <doug.simon@oracle.com>
date Fri, 01 Nov 2013 13:07:22 +0100
parents b038b643a3a4
children f6c511451e4a
line wrap: on
line diff
--- a/src/share/vm/graal/graalCompiler.cpp	Fri Nov 01 12:06:22 2013 +0100
+++ b/src/share/vm/graal/graalCompiler.cpp	Fri Nov 01 13:07:22 2013 +0100
@@ -101,13 +101,20 @@
       bool bootstrap = GRAALVM_ONLY(BootstrapGraal) NOT_GRAALVM(false);
       VMToCompiler::startCompiler(bootstrap);
       _initialized = true;
+      CompilationPolicy::completed_vm_startup();
       if (bootstrap) {
-        // We turn off CompileTheWorld and complete the VM startup so that
-        // Graal can be compiled by C1/C2 when we do a CTW.
-        NOT_PRODUCT(CompileTheWorld = false);
-        CompilationPolicy::completed_vm_startup();
         VMToCompiler::bootstrap();
       }
+
+
+#ifndef PRODUCT
+      if (CompileTheWorld) {
+        // We turn off CompileTheWorld so that Graal can
+        // be compiled by C1/C2 when Graal does a CTW.
+        CompileTheWorld = false;
+        VMToCompiler::compileTheWorld();
+      }
+#endif
     }
   }
 }