22 */
23
24 import compiler.whitebox.CompilerWhiteBoxTest;
25
26 /*
27 * @test MakeMethodNotCompilableTest
28 * @bug 8012322 8006683 8007288 8022832
29 * @library /testlibrary /test/lib /
30 * @modules java.management
31 * @build MakeMethodNotCompilableTest
32 * @run main ClassFileInstaller sun.hotspot.WhiteBox
33 * sun.hotspot.WhiteBox$WhiteBoxPermission
34 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xmixed MakeMethodNotCompilableTest
35 * @summary testing of WB::makeMethodNotCompilable()
36 * @author igor.ignatyev@oracle.com
37 */
38 public class MakeMethodNotCompilableTest extends CompilerWhiteBoxTest {
39 private int bci;
40 public static void main(String[] args) throws Exception {
41 String directive =
42 "[{ match:\"*SimpleTestCase$Helper.*\", BackgroundCompilation: false }, " +
43 " { match:\"*.*\", inline:\"-*SimpleTestCase$Helper.*\"}]";
44 if (WHITE_BOX.addCompilerDirective(directive) != 2) {
45 throw new RuntimeException("Could not add directive");
46 }
47 try {
48 CompilerWhiteBoxTest.main(MakeMethodNotCompilableTest::new, args);
49 } finally {
50 WHITE_BOX.removeCompilerDirective(2);
51 }
52 }
53
54 private MakeMethodNotCompilableTest(TestCase testCase) {
55 super(testCase);
56 // to prevent inlining of #method
57 WHITE_BOX.testSetDontInlineMethod(method, true);
58 }
59
60 /**
61 * Tests {@code WB::makeMethodNotCompilable()} by calling it before
62 * compilation and checking that method isn't compiled. Also
63 * checks that WB::clearMethodState() clears no-compilable flags. For
|
22 */
23
24 import compiler.whitebox.CompilerWhiteBoxTest;
25
26 /*
27 * @test MakeMethodNotCompilableTest
28 * @bug 8012322 8006683 8007288 8022832
29 * @library /testlibrary /test/lib /
30 * @modules java.management
31 * @build MakeMethodNotCompilableTest
32 * @run main ClassFileInstaller sun.hotspot.WhiteBox
33 * sun.hotspot.WhiteBox$WhiteBoxPermission
34 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xmixed MakeMethodNotCompilableTest
35 * @summary testing of WB::makeMethodNotCompilable()
36 * @author igor.ignatyev@oracle.com
37 */
38 public class MakeMethodNotCompilableTest extends CompilerWhiteBoxTest {
39 private int bci;
40 public static void main(String[] args) throws Exception {
41 String directive =
42 "[{ match:\"*SimpleTestCaseHelper.*\", BackgroundCompilation: false }, " +
43 " { match:\"*.*\", inline:\"-*SimpleTestCaseHelper.*\"}]";
44 if (WHITE_BOX.addCompilerDirective(directive) != 2) {
45 throw new RuntimeException("Could not add directive");
46 }
47 try {
48 CompilerWhiteBoxTest.main(MakeMethodNotCompilableTest::new, args);
49 } finally {
50 WHITE_BOX.removeCompilerDirective(2);
51 }
52 }
53
54 private MakeMethodNotCompilableTest(TestCase testCase) {
55 super(testCase);
56 // to prevent inlining of #method
57 WHITE_BOX.testSetDontInlineMethod(method, true);
58 }
59
60 /**
61 * Tests {@code WB::makeMethodNotCompilable()} by calling it before
62 * compilation and checking that method isn't compiled. Also
63 * checks that WB::clearMethodState() clears no-compilable flags. For
|