提交 96e91379 编写于 作者: I iignatyev

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

Reviewed-by: kvn
上级 7cacbd54
......@@ -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.
......
......@@ -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();
......
......@@ -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();
......
......@@ -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();
......
......@@ -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");
}
......
......@@ -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");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册