Skip to content
Permalink
Browse files
8227647: [Graal] Test8009761.java fails due to "RuntimeException: sta…
…tic 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
  • Loading branch information
Vladimir Kozlov committed Jun 4, 2020
1 parent a351ebd commit dd016c34dd12b4184e20c9fbbdcb8cd2e01e86a8
Showing 2 changed files with 16 additions and 1 deletion.
@@ -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; }

0 comments on commit dd016c3

Please sign in to comment.