Skip to content
Permalink
Browse files
8260301: misc gc/g1/unloading tests fails with "RuntimeException: Met…
…hod could not be enqueued for compilation at level N"

Reviewed-by: dlong, iignatyev
  • Loading branch information
Vladimir Kozlov committed Feb 3, 2021
1 parent 4a8b5c1 commit f025bc1d5d81532a3bdb87665537de4aaf15b7ea
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/hotspot/share/prims/whitebox.cpp
@@ -992,6 +992,15 @@ bool WhiteBox::compile_method(Method* method, int comp_level, int bci, Thread* T
if ((!is_blocking && is_queued) || nm != NULL) {
return true;
}
// Check code again because compilation may be finished before Compile_lock is acquired.
if (bci == InvocationEntryBci) {
CompiledMethod* code = mh->code();
if (code != NULL && code->as_nmethod_or_null() != NULL) {
return true;
}
} else if (mh->lookup_osr_nmethod_for(bci, comp_level, false) != NULL) {
return true;
}
tty->print("WB error: failed to %s compile at level %d method ", is_blocking ? "blocking" : "", comp_level);
mh->print_short_name(tty);
tty->cr();

0 comments on commit f025bc1

Please sign in to comment.