mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8156034: [JVMCI] Notify the jvmci compiler on completion of a bootstrap
Reviewed-by: twisti
This commit is contained in:
parent
3548f9ecba
commit
536db8741f
10 changed files with 48 additions and 7 deletions
|
@ -39,6 +39,7 @@ 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;
|
||||
|
@ -57,7 +58,7 @@ void JVMCICompiler::initialize() {
|
|||
CompilationPolicy::completed_vm_startup();
|
||||
}
|
||||
|
||||
void JVMCICompiler::bootstrap() {
|
||||
void JVMCICompiler::bootstrap(TRAPS) {
|
||||
if (Arguments::mode() == Arguments::_int) {
|
||||
// Nothing to do in -Xint mode
|
||||
return;
|
||||
|
@ -68,7 +69,6 @@ void JVMCICompiler::bootstrap() {
|
|||
FlagSetting ctwOff(CompileTheWorld, false);
|
||||
#endif
|
||||
|
||||
JavaThread* THREAD = JavaThread::current();
|
||||
_bootstrapping = true;
|
||||
ResourceMark rm;
|
||||
HandleMark hm;
|
||||
|
@ -97,7 +97,7 @@ void JVMCICompiler::bootstrap() {
|
|||
do {
|
||||
os::sleep(THREAD, 100, true);
|
||||
qsize = CompileBroker::queue_size(CompLevel_full_optimization);
|
||||
} while (first_round && qsize == 0);
|
||||
} while (!_bootstrap_compilation_request_handled && first_round && qsize == 0);
|
||||
first_round = false;
|
||||
if (PrintBootstrap) {
|
||||
while (z < (_methods_compiled / 100)) {
|
||||
|
@ -111,6 +111,7 @@ void JVMCICompiler::bootstrap() {
|
|||
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); \
|
||||
|
@ -187,6 +188,9 @@ void JVMCICompiler::compile_method(const methodHandle& method, int entry_bci, JV
|
|||
assert(false, "JVMCICompiler.compileMethod should always return non-null");
|
||||
}
|
||||
}
|
||||
if (_bootstrapping) {
|
||||
_bootstrap_compilation_request_handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
CompLevel JVMCIRuntime::adjust_comp_level(methodHandle method, bool is_osr, CompLevel level, JavaThread* thread) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue