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
@ -1655,7 +1655,8 @@ void CompileBroker::wait_for_completion(CompileTask* task) {
|
||||
bool free_task;
|
||||
#if INCLUDE_JVMCI
|
||||
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);
|
||||
} else
|
||||
#endif
|
||||
|
@ -134,6 +134,20 @@ class CompileTask : public CHeapObj<mtCompiler> {
|
||||
}
|
||||
}
|
||||
#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; }
|
||||
void clear_waiter() { _has_waiter = false; }
|
||||
CompilerThread* jvmci_compiler_thread() const { return _jvmci_compiler_thread; }
|
||||
|
Loading…
Reference in New Issue
Block a user