8205400: [Graal] compiler/jvmci/compilerToVM/DisassembleCodeBlobTest.java fails with can't be enqueued for compilation on level 4
Add -XX:-BackgroundCompilation to tests to eager initialize JVMCI Reviewed-by: thartmann
This commit is contained in:
parent
a7e35cb988
commit
f4ae3d5325
@ -855,7 +855,16 @@ WB_END
|
||||
bool WhiteBox::compile_method(Method* method, int comp_level, int bci, Thread* THREAD) {
|
||||
// Screen for unavailable/bad comp level or null method
|
||||
AbstractCompiler* comp = CompileBroker::compiler(comp_level);
|
||||
if (method == NULL || comp_level > MIN2((CompLevel) TieredStopAtLevel, CompLevel_highest_tier) || comp == NULL) {
|
||||
if (method == NULL) {
|
||||
tty->print_cr("WB error: request to compile NULL method");
|
||||
return false;
|
||||
}
|
||||
if (comp_level > MIN2((CompLevel) TieredStopAtLevel, CompLevel_highest_tier)) {
|
||||
tty->print_cr("WB error: invalid compilation level %d", comp_level);
|
||||
return false;
|
||||
}
|
||||
if (comp == NULL) {
|
||||
tty->print_cr("WB error: no compiler for requested compilation level %d", comp_level);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -868,7 +877,17 @@ bool WhiteBox::compile_method(Method* method, int comp_level, int bci, Thread* T
|
||||
// Compile method and check result
|
||||
nmethod* nm = CompileBroker::compile_method(mh, bci, comp_level, mh, mh->invocation_count(), CompileTask::Reason_Whitebox, THREAD);
|
||||
MutexLockerEx mu(Compile_lock);
|
||||
return ((!is_blocking && mh->queued_for_compilation()) || nm != NULL);
|
||||
bool is_queued = mh->queued_for_compilation();
|
||||
if ((!is_blocking && is_queued) || nm != 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();
|
||||
if (is_blocking && is_queued) {
|
||||
tty->print_cr("WB error: blocking compilation is still in queue!");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
WB_ENTRY(jboolean, WB_EnqueueMethodForCompilation(JNIEnv* env, jobject o, jobject method, jint comp_level, jint bci))
|
||||
|
@ -41,6 +41,7 @@
|
||||
* @run main/othervm -Xbootclasspath/a:.
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
|
||||
* -XX:-BackgroundCompilation
|
||||
* compiler.jvmci.compilerToVM.DisassembleCodeBlobTest
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -38,6 +38,7 @@
|
||||
* @run main/othervm -Xbootclasspath/a:.
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
|
||||
* -XX:-BackgroundCompilation
|
||||
* compiler.jvmci.compilerToVM.ExecuteInstalledCodeTest
|
||||
*/
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user