changeset 23386:2625b10989ee

8156034: update 02
author Josef Eisl <josef.eisl@jku.at>
date Wed, 11 May 2016 09:53:28 +0200
parents 6ee2af864395
children a920338dd4d4
files src/share/vm/jvmci/jvmciCompiler.cpp src/share/vm/jvmci/jvmciCompiler.hpp src/share/vm/prims/jni.cpp
diffstat 3 files changed, 8 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/jvmci/jvmciCompiler.cpp	Wed May 11 09:50:37 2016 +0200
+++ b/src/share/vm/jvmci/jvmciCompiler.cpp	Wed May 11 09:53:28 2016 +0200
@@ -37,7 +37,7 @@
 JVMCICompiler::JVMCICompiler() : AbstractCompiler(jvmci) {
 #ifdef COMPILERJVMCI
   _bootstrapping = false;
-  _bootstrap_compilation_request_seen = false;
+  _bootstrap_compilation_request_handled = false;
   _methods_compiled = 0;
 #endif
   assert(_instance == NULL, "only one instance allowed");
@@ -60,7 +60,7 @@
 }
 
 #ifdef COMPILERJVMCI
-void JVMCICompiler::bootstrap() {
+void JVMCICompiler::bootstrap(TRAPS) {
   if (Arguments::mode() == Arguments::_int) {
     // Nothing to do in -Xint mode
     return;
@@ -71,7 +71,6 @@
   FlagSetting ctwOff(CompileTheWorld, false);
 #endif
 
-  JavaThread* THREAD = JavaThread::current();
   _bootstrapping = true;
   // Allow bootstrap to perform JVMCI compilations of itself
   ResourceMark rm;
@@ -101,7 +100,7 @@
     do {
       os::sleep(THREAD, 100, true);
       qsize = CompileBroker::queue_size(CompLevel_full_optimization);
-    } while (!_bootstrap_compilation_request_seen && first_round && qsize == 0);
+    } while (!_bootstrap_compilation_request_handled && first_round && qsize == 0);
     first_round = false;
     if (PrintBootstrap) {
       while (z < (_methods_compiled / 100)) {
@@ -115,7 +114,7 @@
     tty->print_cr(" in " JLONG_FORMAT " ms (compiled %d methods)", os::javaTimeMillis() - start, _methods_compiled);
   }
   _bootstrapping = false;
-  JVMCIRuntime::bootstrap_finished(THREAD);
+  JVMCIRuntime::bootstrap_finished(CHECK);
 }
 
 void JVMCICompiler::compile_method(const methodHandle& method, int entry_bci, JVMCIEnv* env) {
@@ -182,7 +181,7 @@
     }
   }
   if (_bootstrapping) {
-    _bootstrap_compilation_request_seen = true;
+    _bootstrap_compilation_request_handled = true;
   }
 }
 
--- a/src/share/vm/jvmci/jvmciCompiler.hpp	Wed May 11 09:50:37 2016 +0200
+++ b/src/share/vm/jvmci/jvmciCompiler.hpp	Wed May 11 09:53:28 2016 +0200
@@ -37,7 +37,7 @@
   /**
    * True if we have seen a bootstrap compilation request.
    */
-  volatile bool _bootstrap_compilation_request_seen;
+  volatile bool _bootstrap_compilation_request_handled;
 
   /**
    * Number of methods successfully compiled by a call to
@@ -77,7 +77,7 @@
    * Initialize the compile queue with the methods in java.lang.Object and
    * then wait until the queue is empty.
    */
-  void bootstrap();
+  void bootstrap(TRAPS);
 
   bool is_bootstrapping() const { return _bootstrapping; }
 
--- a/src/share/vm/prims/jni.cpp	Wed May 11 09:50:37 2016 +0200
+++ b/src/share/vm/prims/jni.cpp	Wed May 11 09:53:28 2016 +0200
@@ -5209,7 +5209,7 @@
     if (BootstrapJVMCI) {
       JavaThread* THREAD = thread;
       JVMCICompiler* compiler = JVMCICompiler::instance(CATCH);
-      compiler->bootstrap();
+      compiler->bootstrap(THREAD);
       if (HAS_PENDING_EXCEPTION) {
         HandleMark hm;
         vm_exit_during_initialization(Handle(THREAD, PENDING_EXCEPTION));