< prev index next >

src/share/vm/jvmci/jvmciCompiler.cpp

Print this page
rev 11184 : 8156034: [JVMCI] Notify the jvmci compiler on completion of a bootstrap

@@ -37,10 +37,11 @@
 JVMCICompiler* JVMCICompiler::_instance = NULL;
 elapsedTimer JVMCICompiler::_codeInstallTimer;
 
 JVMCICompiler::JVMCICompiler() : AbstractCompiler(jvmci) {
   _bootstrapping = false;
+  _bootstrap_compilation_request_seen =  false;
   _methods_compiled = 0;
   assert(_instance == NULL, "only one instance allowed");
   _instance = this;
 }
 

@@ -95,11 +96,11 @@
   do {
     // 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);
+    } while (!_bootstrap_compilation_request_seen && first_round && qsize == 0);
     first_round = false;
     if (PrintBootstrap) {
       while (z < (_methods_compiled / 100)) {
         ++z;
         tty->print_raw(".");

@@ -109,10 +110,11 @@
 
   if (PrintBootstrap) {
     tty->print_cr(" in " JLONG_FORMAT " ms (compiled %d methods)", os::javaTimeMillis() - start, _methods_compiled);
   }
   _bootstrapping = false;
+  JVMCIRuntime::bootstrapFinished();
 }
 
 #define CHECK_ABORT THREAD); \
 if (HAS_PENDING_EXCEPTION) { \
   char buf[256]; \

@@ -185,10 +187,13 @@
       }
     } else {
       assert(false, "JVMCICompiler.compileMethod should always return non-null");
     }
   }
+  if (_bootstrapping) {
+    _bootstrap_compilation_request_seen = true;
+  }
 }
 
 /**
  * Aborts the VM due to an unexpected exception.
  */
< prev index next >