changeset 19780:18be6264186f

Bootstrap might exit early in debug JVM
author twisti
date Tue, 10 Mar 2015 20:32:04 -0700
parents fe0bc94a147a
children ea8d6fa333ab
files src/share/vm/graal/graalCompiler.cpp
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/graal/graalCompiler.cpp	Tue Mar 10 23:33:12 2015 +0100
+++ b/src/share/vm/graal/graalCompiler.cpp	Tue Mar 10 20:32:04 2015 -0700
@@ -85,12 +85,15 @@
   }
 
   int qsize;
-  jlong sleep_time = 1000;
+  bool first_round = true;
   int z = 0;
   do {
-    os::sleep(THREAD, sleep_time, true);
-    sleep_time = 100;
-    qsize = CompileBroker::queue_size(CompLevel_full_optimization);
+    // Loop until there is something in the queue.
+    do {
+      os::sleep(THREAD, 100, true);
+      qsize = CompileBroker::queue_size(CompLevel_full_optimization);
+    } while (first_round && qsize == 0);
+    first_round = false;
     if (PrintBootstrap) {
       while (z < (_methodsCompiled / 100)) {
         ++z;