comparison test/compiler/whitebox/ClearMethodStateTest.java @ 14203:f9a4b59ae350

8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul Reviewed-by: twisti Contributed-by: anton.ivanov@oracle.com
author iignatyev
date Tue, 31 Dec 2013 19:26:57 +0400
parents f99558245e5c
children 4ca6dc0799b6
comparison
equal deleted inserted replaced
14202:3e98456aab94 14203:f9a4b59ae350
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any 20 * or visit www.oracle.com if you need additional information or have any
21 * questions. 21 * questions.
22 */ 22 */
23 23
24 import java.util.function.Function;
25
24 /* 26 /*
25 * @test ClearMethodStateTest 27 * @test ClearMethodStateTest
26 * @bug 8006683 8007288 8022832 28 * @bug 8006683 8007288 8022832
27 * @library /testlibrary /testlibrary/whitebox 29 * @library /testlibrary /testlibrary/whitebox
28 * @build ClearMethodStateTest 30 * @build ClearMethodStateTest
29 * @run main ClassFileInstaller sun.hotspot.WhiteBox 31 * @run main ClassFileInstaller sun.hotspot.WhiteBox
30 * @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,TestCase$Helper::* ClearMethodStateTest 32 * @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,SimpleTestCase$Helper::* ClearMethodStateTest
31 * @summary testing of WB::clearMethodState() 33 * @summary testing of WB::clearMethodState()
32 * @author igor.ignatyev@oracle.com 34 * @author igor.ignatyev@oracle.com
33 */ 35 */
34 public class ClearMethodStateTest extends CompilerWhiteBoxTest { 36 public class ClearMethodStateTest extends CompilerWhiteBoxTest {
35 37
36 public static void main(String[] args) throws Exception { 38 public static void main(String[] args) throws Exception {
37 for (TestCase test : TestCase.values()) { 39 CompilerWhiteBoxTest.main(ClearMethodStateTest::new, args);
38 new ClearMethodStateTest(test).runTest();
39 }
40 } 40 }
41 41
42 public ClearMethodStateTest(TestCase testCase) { 42 private ClearMethodStateTest(TestCase testCase) {
43 super(testCase); 43 super(testCase);
44 // to prevent inlining of #method 44 // to prevent inlining of #method
45 WHITE_BOX.testSetDontInlineMethod(method, true); 45 WHITE_BOX.testSetDontInlineMethod(method, true);
46 } 46 }
47 47
61 checkCompiled(); 61 checkCompiled();
62 WHITE_BOX.clearMethodState(method); 62 WHITE_BOX.clearMethodState(method);
63 deoptimize(); 63 deoptimize();
64 checkNotCompiled(); 64 checkNotCompiled();
65 65
66 if (testCase.isOsr) { 66 if (testCase.isOsr()) {
67 // part test isn't applicable for OSR test case 67 // part test isn't applicable for OSR test case
68 return; 68 return;
69 } 69 }
70 if (!TIERED_COMPILATION) { 70 if (!TIERED_COMPILATION) {
71 WHITE_BOX.clearMethodState(method); 71 WHITE_BOX.clearMethodState(method);