diff -r c5d0a0a90f37 -r efce070b8d42 hotspot/test/compiler/whitebox/CompilerWhiteBoxTest.java --- a/hotspot/test/compiler/whitebox/CompilerWhiteBoxTest.java Mon Apr 08 07:40:08 2013 -0700 +++ b/hotspot/test/compiler/whitebox/CompilerWhiteBoxTest.java Tue Apr 09 09:54:17 2013 -0700 @@ -37,6 +37,8 @@ = Integer.parseInt(getVMOption("CompileThreshold", "10000")); protected static final boolean BACKGROUND_COMPILATION = Boolean.valueOf(getVMOption("BackgroundCompilation", "true")); + protected static final boolean TIERED_COMPILATION + = Boolean.valueOf(getVMOption("TieredCompilation", "false")); protected static Method getMethod(String name) { try { @@ -81,6 +83,9 @@ } protected static void checkNotCompiled(Method method) { + if (WHITE_BOX.isMethodQueuedForCompilation(method)) { + throw new RuntimeException(method + " must not be in queue"); + } if (WHITE_BOX.isMethodCompiled(method)) { throw new RuntimeException(method + " must be not compiled"); } @@ -139,8 +144,11 @@ protected abstract void test() throws Exception; protected final int compile() { + return compile(Math.max(COMPILE_THRESHOLD, 150000)); + } + + protected final int compile(int count) { int result = 0; - int count = Math.max(COMPILE_THRESHOLD, 150000); for (int i = 0; i < count; ++i) { result += method(); }