Mercurial > hg > truffle
diff test/compiler/whitebox/IsMethodCompilableTest.java @ 14909:4ca6dc0799b6
Backout jdk9 merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 01 Apr 2014 13:57:07 +0200 |
parents | f9a4b59ae350 |
children | 52b4284cb496 |
line wrap: on
line diff
--- a/test/compiler/whitebox/IsMethodCompilableTest.java Tue Apr 01 14:09:03 2014 +0200 +++ b/test/compiler/whitebox/IsMethodCompilableTest.java Tue Apr 01 13:57:07 2014 +0200 @@ -27,7 +27,7 @@ * @library /testlibrary /testlibrary/whitebox * @build IsMethodCompilableTest * @run main ClassFileInstaller sun.hotspot.WhiteBox - * @run main/othervm/timeout=2400 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,SimpleTestCase$Helper::* IsMethodCompilableTest + * @run main/othervm/timeout=2400 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,TestCase$Helper::* IsMethodCompilableTest * @summary testing of WB::isMethodCompilable() * @author igor.ignatyev@oracle.com */ @@ -48,10 +48,12 @@ } public static void main(String[] args) throws Exception { - CompilerWhiteBoxTest.main(IsMethodCompilableTest::new, args); + for (TestCase test : TestCase.values()) { + new IsMethodCompilableTest(test).runTest(); + } } - private IsMethodCompilableTest(TestCase testCase) { + public IsMethodCompilableTest(TestCase testCase) { super(testCase); // to prevent inlining of #method WHITE_BOX.testSetDontInlineMethod(method, true); @@ -66,7 +68,7 @@ */ @Override protected void test() throws Exception { - if (testCase.isOsr() && CompilerWhiteBoxTest.MODE.startsWith( + if (testCase.isOsr && CompilerWhiteBoxTest.MODE.startsWith( "compiled ")) { System.err.printf("Warning: %s is not applicable in %s%n", testCase.name(), CompilerWhiteBoxTest.MODE); @@ -87,7 +89,7 @@ for (long i = 0L, n = PER_METHOD_RECOMPILATION_CUTOFF - 1; i < n; ++i) { compileAndDeoptimize(); } - if (!testCase.isOsr() && !isCompilable()) { + if (!testCase.isOsr && !isCompilable()) { // in osr test case count of deopt maybe more than iterations throw new RuntimeException(method + " is not compilable after " + (PER_METHOD_RECOMPILATION_CUTOFF - 1) + " iterations"); @@ -100,7 +102,7 @@ && isCompilable(); ++i) { compileAndDeoptimize(); } - if (!testCase.isOsr() && i != PER_METHOD_RECOMPILATION_CUTOFF) { + if (!testCase.isOsr && i != PER_METHOD_RECOMPILATION_CUTOFF) { // in osr test case count of deopt maybe more than iterations throw new RuntimeException(method + " is not compilable after " + i + " iterations, but must only after "