diff --git a/src/hotspot/share/compiler/compilerDefinitions.hpp b/src/hotspot/share/compiler/compilerDefinitions.hpp index 2c1ae85af8ab3..bdaa6dffb8f5f 100644 --- a/src/hotspot/share/compiler/compilerDefinitions.hpp +++ b/src/hotspot/share/compiler/compilerDefinitions.hpp @@ -53,7 +53,7 @@ enum MethodCompilation { // Enumeration to distinguish tiers of compilation enum CompLevel : s1 { - CompLevel_any = -2, // Used for querying the state + CompLevel_any = -1, // Used for querying the state CompLevel_all = -1, // Used for changing the state CompLevel_none = 0, // Interpreter CompLevel_simple = 1, // C1 diff --git a/test/hotspot/jtreg/compiler/whitebox/CompilerWhiteBoxTest.java b/test/hotspot/jtreg/compiler/whitebox/CompilerWhiteBoxTest.java index dde2b3cdfd01f..f87292be019c0 100644 --- a/test/hotspot/jtreg/compiler/whitebox/CompilerWhiteBoxTest.java +++ b/test/hotspot/jtreg/compiler/whitebox/CompilerWhiteBoxTest.java @@ -41,10 +41,8 @@ public abstract class CompilerWhiteBoxTest { /** {@code CompLevel::CompLevel_none} -- Interpreter */ public static final int COMP_LEVEL_NONE = 0; - /** {@code CompLevel::CompLevel_any} */ - public static final int COMP_LEVEL_ANY = -2; - /** {@code CompLevel::CompLevel_all} */ - public static final int COMP_LEVEL_ALL = -1; + /** {@code CompLevel::CompLevel_any}, {@code CompLevel::CompLevel_all} */ + public static final int COMP_LEVEL_ANY = -1; /** {@code CompLevel::CompLevel_simple} -- C1 */ public static final int COMP_LEVEL_SIMPLE = 1; /** {@code CompLevel::CompLevel_limited_profile} -- C1, invocation & backedge counters */ @@ -286,7 +284,7 @@ protected final boolean isCompilable(int compLevel) { } protected final void makeNotCompilable() { - WHITE_BOX.makeMethodNotCompilable(method, COMP_LEVEL_ALL, + WHITE_BOX.makeMethodNotCompilable(method, COMP_LEVEL_ANY, testCase.isOsr()); } diff --git a/test/lib/jdk/test/whitebox/WhiteBox.java b/test/lib/jdk/test/whitebox/WhiteBox.java index 2744978b8a935..f0e164d94b518 100644 --- a/test/lib/jdk/test/whitebox/WhiteBox.java +++ b/test/lib/jdk/test/whitebox/WhiteBox.java @@ -345,7 +345,7 @@ public boolean isMethodCompiled(Executable method, boolean isOsr){ return isMethodCompiled0(method, isOsr); } public boolean isMethodCompilable(Executable method) { - return isMethodCompilable(method, -2 /*any*/); + return isMethodCompilable(method, -1 /*any*/); } public boolean isMethodCompilable(Executable method, int compLevel) { return isMethodCompilable(method, compLevel, false /*not osr*/); @@ -393,7 +393,7 @@ public int deoptimizeMethod(Executable method, boolean isOsr) { return deoptimizeMethod0(method, isOsr); } public void makeMethodNotCompilable(Executable method) { - makeMethodNotCompilable(method, -1 /*all*/); + makeMethodNotCompilable(method, -1 /*any*/); } public void makeMethodNotCompilable(Executable method, int compLevel) { makeMethodNotCompilable(method, compLevel, false /*not osr*/);