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; protected static final int THRESHOLD;
/** count of invocation to triger OSR compilation */ /** count of invocation to triger OSR compilation */
protected static final long BACKEDGE_THRESHOLD; 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 { static {
if (TIERED_COMPILATION) { if (TIERED_COMPILATION) {

View File

@ -53,6 +53,12 @@ public class DeoptimizeAllTest extends CompilerWhiteBoxTest {
*/ */
@Override @Override
protected void test() throws Exception { 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(); compile();
checkCompiled(); checkCompiled();
WHITE_BOX.deoptimizeAll(); WHITE_BOX.deoptimizeAll();

View File

@ -53,6 +53,12 @@ public class DeoptimizeMethodTest extends CompilerWhiteBoxTest {
*/ */
@Override @Override
protected void test() throws Exception { 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(); compile();
checkCompiled(); checkCompiled();
deoptimize(); deoptimize();

View File

@ -70,12 +70,10 @@ public class EnqueueMethodForCompilationTest extends CompilerWhiteBoxTest {
int compLevel = getCompLevel(); int compLevel = getCompLevel();
int bci = WHITE_BOX.getMethodEntryBci(method); int bci = WHITE_BOX.getMethodEntryBci(method);
System.out.println("bci = " + bci);
printInfo();
deoptimize(); deoptimize();
printInfo();
checkNotCompiled(); checkNotCompiled();
printInfo(); WHITE_BOX.clearMethodState(method);
WHITE_BOX.enqueueMethodForCompilation(method, compLevel, bci); WHITE_BOX.enqueueMethodForCompilation(method, compLevel, bci);
checkCompiled(); checkCompiled();
deoptimize(); deoptimize();

View File

@ -68,6 +68,12 @@ public class IsMethodCompilableTest extends CompilerWhiteBoxTest {
*/ */
@Override @Override
protected void test() throws Exception { 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()) { if (!isCompilable()) {
throw new RuntimeException(method + " must be compilable"); throw new RuntimeException(method + " must be compilable");
} }

View File

@ -62,6 +62,12 @@ public class MakeMethodNotCompilableTest extends CompilerWhiteBoxTest {
*/ */
@Override @Override
protected void test() throws Exception { 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(); checkNotCompiled();
if (!isCompilable()) { if (!isCompilable()) {
throw new RuntimeException(method + " must be compilable"); throw new RuntimeException(method + " must be compilable");