comparison test/compiler/whitebox/DeoptimizeMethodTest.java @ 10113:4b2eebe03f93

8011971: WB API doesn't accept j.l.reflect.Constructor Reviewed-by: kvn, vlivanov
author iignatyev
date Tue, 16 Apr 2013 10:04:01 -0700
parents b84fd7d73702
children 11237ee74aae
comparison
equal deleted inserted replaced
10112:c89eab0b6b30 10113:4b2eebe03f93
25 * @test DeoptimizeMethodTest 25 * @test DeoptimizeMethodTest
26 * @library /testlibrary /testlibrary/whitebox 26 * @library /testlibrary /testlibrary/whitebox
27 * @build DeoptimizeMethodTest 27 * @build DeoptimizeMethodTest
28 * @run main ClassFileInstaller sun.hotspot.WhiteBox 28 * @run main ClassFileInstaller sun.hotspot.WhiteBox
29 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI DeoptimizeMethodTest 29 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI DeoptimizeMethodTest
30 * @summary testing of WB::deoptimizeMethod()
30 * @author igor.ignatyev@oracle.com 31 * @author igor.ignatyev@oracle.com
31 */ 32 */
32 public class DeoptimizeMethodTest extends CompilerWhiteBoxTest { 33 public class DeoptimizeMethodTest extends CompilerWhiteBoxTest {
33 34
34 public static void main(String[] args) throws Exception { 35 public static void main(String[] args) throws Exception {
35 // to prevent inlining #method into #compile() 36 for (TestCase test : TestCase.values()) {
36 WHITE_BOX.testSetDontInlineMethod(METHOD, true); 37 new DeoptimizeMethodTest(test).runTest();
37 new DeoptimizeMethodTest().runTest(); 38 }
38 } 39 }
39 40
41 public DeoptimizeMethodTest(TestCase testCase) {
42 super(testCase);
43 // to prevent inlining of #method
44 WHITE_BOX.testSetDontInlineMethod(method, true);
45 }
46
47 /**
48 * Tests {@code WB::deoptimizeMethod()} by calling it after
49 * compilation and checking that method isn't compiled.
50 *
51 * @throws Exception if one of the checks fails.
52 */
53 @Override
40 protected void test() throws Exception { 54 protected void test() throws Exception {
41 compile(); 55 compile();
42 checkCompiled(METHOD); 56 checkCompiled();
43 WHITE_BOX.deoptimizeMethod(METHOD); 57 WHITE_BOX.deoptimizeMethod(method);
44 checkNotCompiled(METHOD); 58 checkNotCompiled();
45 } 59 }
46 } 60 }