8023452: TestCase$Helper(java.lang.Object) must be osr_compiled

Reviewed-by: kvn
This commit is contained in:
Igor Ignatyev 2013-09-28 12:32:10 +04:00
parent 74b0d053ee
commit 30874d35f1
6 changed files with 30 additions and 5 deletions

View File

@ -74,6 +74,9 @@ public abstract class CompilerWhiteBoxTest {
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 @@ public abstract class CompilerWhiteBoxTest {
if (WHITE_BOX.getMethodCompilationLevel(method, true) != 0) {
throw new RuntimeException(method + " osr_comp_level must be == 0");
}
}
}
/**
* Checks, that {@linkplain #method} is compiled.

View File

@ -53,6 +53,12 @@ public class DeoptimizeAllTest extends CompilerWhiteBoxTest {
*/
@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();

View File

@ -53,6 +53,12 @@ public class DeoptimizeMethodTest extends CompilerWhiteBoxTest {
*/
@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();

View File

@ -70,12 +70,10 @@ public class EnqueueMethodForCompilationTest extends CompilerWhiteBoxTest {
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();

View File

@ -68,6 +68,12 @@ public class IsMethodCompilableTest extends CompilerWhiteBoxTest {
*/
@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");
}

View File

@ -62,6 +62,12 @@ public class MakeMethodNotCompilableTest extends CompilerWhiteBoxTest {
*/
@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");