< prev index next >

src/share/vm/jvmci/jvmciCompiler.cpp

Print this page

        

*** 37,46 **** --- 37,47 ---- JVMCICompiler* JVMCICompiler::_instance = NULL; elapsedTimer JVMCICompiler::_codeInstallTimer; JVMCICompiler::JVMCICompiler() : AbstractCompiler(jvmci) { _bootstrapping = false; + _bootstrap_compilation_request_handled = false; _methods_compiled = 0; assert(_instance == NULL, "only one instance allowed"); _instance = this; }
*** 55,76 **** // JVMCI is considered as application code so we need to // stop the VM deferring compilation now. CompilationPolicy::completed_vm_startup(); } ! void JVMCICompiler::bootstrap() { if (Arguments::mode() == Arguments::_int) { // Nothing to do in -Xint mode return; } #ifndef PRODUCT // We turn off CompileTheWorld so that compilation requests are not // ignored during bootstrap or that JVMCI can be compiled by C1/C2. FlagSetting ctwOff(CompileTheWorld, false); #endif - JavaThread* THREAD = JavaThread::current(); _bootstrapping = true; ResourceMark rm; HandleMark hm; if (PrintBootstrap) { tty->print("Bootstrapping JVMCI"); --- 56,76 ---- // JVMCI is considered as application code so we need to // stop the VM deferring compilation now. CompilationPolicy::completed_vm_startup(); } ! void JVMCICompiler::bootstrap(TRAPS) { if (Arguments::mode() == Arguments::_int) { // Nothing to do in -Xint mode return; } #ifndef PRODUCT // We turn off CompileTheWorld so that compilation requests are not // ignored during bootstrap or that JVMCI can be compiled by C1/C2. FlagSetting ctwOff(CompileTheWorld, false); #endif _bootstrapping = true; ResourceMark rm; HandleMark hm; if (PrintBootstrap) { tty->print("Bootstrapping JVMCI");
*** 95,105 **** 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); first_round = false; if (PrintBootstrap) { while (z < (_methods_compiled / 100)) { ++z; tty->print_raw("."); --- 95,105 ---- do { // Loop until there is something in the queue. do { os::sleep(THREAD, 100, true); qsize = CompileBroker::queue_size(CompLevel_full_optimization); ! } while (!_bootstrap_compilation_request_handled && first_round && qsize == 0); first_round = false; if (PrintBootstrap) { while (z < (_methods_compiled / 100)) { ++z; tty->print_raw(".");
*** 109,118 **** --- 109,119 ---- if (PrintBootstrap) { tty->print_cr(" in " JLONG_FORMAT " ms (compiled %d methods)", os::javaTimeMillis() - start, _methods_compiled); } _bootstrapping = false; + JVMCIRuntime::bootstrap_finished(CHECK); } #define CHECK_ABORT THREAD); \ if (HAS_PENDING_EXCEPTION) { \ char buf[256]; \
*** 185,194 **** --- 186,198 ---- } } else { assert(false, "JVMCICompiler.compileMethod should always return non-null"); } } + if (_bootstrapping) { + _bootstrap_compilation_request_handled = true; + } } /** * Aborts the VM due to an unexpected exception. */
< prev index next >