# HG changeset patch # User iignatyev # Date 1380357130 -14400 # Node ID 303826f477c6e87ee9f9dcb46776cb08cac46834 # Parent e8e077292da395c77f7374bf116d6538971c4f8a 8023452: TestCase$Helper(java.lang.Object) must be osr_compiled Reviewed-by: kvn diff -r e8e077292da3 -r 303826f477c6 test/compiler/whitebox/CompilerWhiteBoxTest.java --- a/test/compiler/whitebox/CompilerWhiteBoxTest.java Sat Sep 28 12:32:09 2013 +0400 +++ b/test/compiler/whitebox/CompilerWhiteBoxTest.java Sat Sep 28 12:32:10 2013 +0400 @@ -74,6 +74,9 @@ protected static final int THRESHOLD; /** count of invocation to triger OSR compilation */ protected static final long BACKEDGE_THRESHOLD; + /** Value of {@code java.vm.info} (interpreted|mixed|comp mode) */ + protected static final String MODE + = System.getProperty("java.vm.info"); static { if (TIERED_COMPILATION) { @@ -202,7 +205,7 @@ if (WHITE_BOX.getMethodCompilationLevel(method, true) != 0) { throw new RuntimeException(method + " osr_comp_level must be == 0"); } - } + } /** * Checks, that {@linkplain #method} is compiled. diff -r e8e077292da3 -r 303826f477c6 test/compiler/whitebox/DeoptimizeAllTest.java --- a/test/compiler/whitebox/DeoptimizeAllTest.java Sat Sep 28 12:32:09 2013 +0400 +++ b/test/compiler/whitebox/DeoptimizeAllTest.java Sat Sep 28 12:32:10 2013 +0400 @@ -53,6 +53,12 @@ */ @Override protected void test() throws Exception { + if (testCase.isOsr && CompilerWhiteBoxTest.MODE.startsWith( + "compiled ")) { + System.err.printf("Warning: %s is not applicable in %s%n", + testCase.name(), CompilerWhiteBoxTest.MODE); + return; + } compile(); checkCompiled(); WHITE_BOX.deoptimizeAll(); diff -r e8e077292da3 -r 303826f477c6 test/compiler/whitebox/DeoptimizeMethodTest.java --- a/test/compiler/whitebox/DeoptimizeMethodTest.java Sat Sep 28 12:32:09 2013 +0400 +++ b/test/compiler/whitebox/DeoptimizeMethodTest.java Sat Sep 28 12:32:10 2013 +0400 @@ -53,6 +53,12 @@ */ @Override protected void test() throws Exception { + if (testCase.isOsr && CompilerWhiteBoxTest.MODE.startsWith( + "compiled ")) { + System.err.printf("Warning: %s is not applicable in %s%n", + testCase.name(), CompilerWhiteBoxTest.MODE); + return; + } compile(); checkCompiled(); deoptimize(); diff -r e8e077292da3 -r 303826f477c6 test/compiler/whitebox/EnqueueMethodForCompilationTest.java --- a/test/compiler/whitebox/EnqueueMethodForCompilationTest.java Sat Sep 28 12:32:09 2013 +0400 +++ b/test/compiler/whitebox/EnqueueMethodForCompilationTest.java Sat Sep 28 12:32:10 2013 +0400 @@ -70,12 +70,10 @@ int compLevel = getCompLevel(); int bci = WHITE_BOX.getMethodEntryBci(method); - System.out.println("bci = " + bci); - printInfo(); deoptimize(); - printInfo(); checkNotCompiled(); - printInfo(); + WHITE_BOX.clearMethodState(method); + WHITE_BOX.enqueueMethodForCompilation(method, compLevel, bci); checkCompiled(); deoptimize(); diff -r e8e077292da3 -r 303826f477c6 test/compiler/whitebox/IsMethodCompilableTest.java --- a/test/compiler/whitebox/IsMethodCompilableTest.java Sat Sep 28 12:32:09 2013 +0400 +++ b/test/compiler/whitebox/IsMethodCompilableTest.java Sat Sep 28 12:32:10 2013 +0400 @@ -68,6 +68,12 @@ */ @Override protected void test() throws Exception { + if (testCase.isOsr && CompilerWhiteBoxTest.MODE.startsWith( + "compiled ")) { + System.err.printf("Warning: %s is not applicable in %s%n", + testCase.name(), CompilerWhiteBoxTest.MODE); + return; + } if (!isCompilable()) { throw new RuntimeException(method + " must be compilable"); } diff -r e8e077292da3 -r 303826f477c6 test/compiler/whitebox/MakeMethodNotCompilableTest.java --- a/test/compiler/whitebox/MakeMethodNotCompilableTest.java Sat Sep 28 12:32:09 2013 +0400 +++ b/test/compiler/whitebox/MakeMethodNotCompilableTest.java Sat Sep 28 12:32:10 2013 +0400 @@ -62,6 +62,12 @@ */ @Override protected void test() throws Exception { + if (testCase.isOsr && CompilerWhiteBoxTest.MODE.startsWith( + "compiled ")) { + System.err.printf("Warning: %s is not applicable in %s%n", + testCase.name(), CompilerWhiteBoxTest.MODE); + return; + } checkNotCompiled(); if (!isCompilable()) { throw new RuntimeException(method + " must be compilable");