mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
8227647: [Graal] Test8009761.java fails due to "RuntimeException: static java.lang.Object compiler.uncommontrap.Test8009761.m3(boolean,boolean) not compiled"
Wait Graal compilation to finish if request came from testing environment. Reviewed-by: thartmann, iignatyev
This commit is contained in:
parent
a351ebd40b
commit
dd016c34dd
2 changed files with 16 additions and 1 deletions
|
@ -1655,7 +1655,8 @@ void CompileBroker::wait_for_completion(CompileTask* task) {
|
||||||
bool free_task;
|
bool free_task;
|
||||||
#if INCLUDE_JVMCI
|
#if INCLUDE_JVMCI
|
||||||
AbstractCompiler* comp = compiler(task->comp_level());
|
AbstractCompiler* comp = compiler(task->comp_level());
|
||||||
if (comp->is_jvmci()) {
|
if (comp->is_jvmci() && !task->should_wait_for_compilation()) {
|
||||||
|
// It may return before compilation is completed.
|
||||||
free_task = wait_for_jvmci_completion((JVMCICompiler*) comp, task, thread);
|
free_task = wait_for_jvmci_completion((JVMCICompiler*) comp, task, thread);
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -134,6 +134,20 @@ class CompileTask : public CHeapObj<mtCompiler> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if INCLUDE_JVMCI
|
#if INCLUDE_JVMCI
|
||||||
|
bool should_wait_for_compilation() const {
|
||||||
|
// Wait for blocking compilation to finish.
|
||||||
|
switch (_compile_reason) {
|
||||||
|
case Reason_CTW:
|
||||||
|
case Reason_Replay:
|
||||||
|
case Reason_Whitebox:
|
||||||
|
case Reason_MustBeCompiled:
|
||||||
|
case Reason_Bootstrap:
|
||||||
|
return _is_blocking;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool has_waiter() const { return _has_waiter; }
|
bool has_waiter() const { return _has_waiter; }
|
||||||
void clear_waiter() { _has_waiter = false; }
|
void clear_waiter() { _has_waiter = false; }
|
||||||
CompilerThread* jvmci_compiler_thread() const { return _jvmci_compiler_thread; }
|
CompilerThread* jvmci_compiler_thread() const { return _jvmci_compiler_thread; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue