27 * @test MakeMethodNotCompilableTest |
27 * @test MakeMethodNotCompilableTest |
28 * @bug 8012322 8006683 8007288 8022832 |
28 * @bug 8012322 8006683 8007288 8022832 |
29 * @library /testlibrary /test/lib / |
29 * @library /testlibrary /test/lib / |
30 * @modules java.management |
30 * @modules java.management |
31 * @build MakeMethodNotCompilableTest |
31 * @build MakeMethodNotCompilableTest |
32 * @run main ClassFileInstaller sun.hotspot.WhiteBox |
32 * @run driver ClassFileInstaller sun.hotspot.WhiteBox |
33 * sun.hotspot.WhiteBox$WhiteBoxPermission |
33 * sun.hotspot.WhiteBox$WhiteBoxPermission |
34 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xmixed MakeMethodNotCompilableTest |
34 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xmixed -XX:-UseCounterDecay MakeMethodNotCompilableTest |
35 * @summary testing of WB::makeMethodNotCompilable() |
35 * @summary testing of WB::makeMethodNotCompilable() |
36 * @author igor.ignatyev@oracle.com |
36 * @author igor.ignatyev@oracle.com |
37 */ |
37 */ |
38 public class MakeMethodNotCompilableTest extends CompilerWhiteBoxTest { |
38 public class MakeMethodNotCompilableTest extends CompilerWhiteBoxTest { |
39 private int bci; |
39 private int bci; |
40 public static void main(String[] args) throws Exception { |
40 public static void main(String[] args) throws Exception { |
41 String directive = |
41 String directive = |
42 "[{ match:\"*SimpleTestCase$Helper.*\", BackgroundCompilation: false }, " + |
42 "[{ match:\"*SimpleTestCaseHelper.*\", BackgroundCompilation: false }, " + |
43 " { match:\"*.*\", inline:\"-*SimpleTestCase$Helper.*\"}]"; |
43 " { match:\"*.*\", inline:\"-*SimpleTestCaseHelper.*\"}]"; |
44 if (WHITE_BOX.addCompilerDirective(directive) != 2) { |
44 if (WHITE_BOX.addCompilerDirective(directive) != 2) { |
45 throw new RuntimeException("Could not add directive"); |
45 throw new RuntimeException("Could not add directive"); |
46 } |
46 } |
47 try { |
47 try { |
48 CompilerWhiteBoxTest.main(MakeMethodNotCompilableTest::new, args); |
48 CompilerWhiteBoxTest.main(MakeMethodNotCompilableTest::new, args); |