25 import java.lang.reflect.Method;
26 import java.util.EnumSet;
27
28 import sun.hotspot.WhiteBox;
29 import sun.hotspot.code.BlobType;
30
31 import jdk.test.lib.Asserts;
32 import jdk.test.lib.InfiniteLoop;
33 import compiler.whitebox.CompilerWhiteBoxTest;
34
35 /*
36 * @test
37 * @bug 8059624 8064669
38 * @library /testlibrary /test/lib /
39 * @modules java.management
40 * @build ForceNMethodSweepTest
41 * @run main ClassFileInstaller sun.hotspot.WhiteBox
42 * sun.hotspot.WhiteBox$WhiteBoxPermission
43 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
44 * -XX:-TieredCompilation -XX:+WhiteBoxAPI
45 * -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCase$Helper::*
46 * -XX:-BackgroundCompilation ForceNMethodSweepTest
47 * @summary testing of WB::forceNMethodSweep
48 */
49 public class ForceNMethodSweepTest extends CompilerWhiteBoxTest {
50 public static void main(String[] args) throws Exception {
51 CompilerWhiteBoxTest.main(ForceNMethodSweepTest::new, args);
52 }
53 private final EnumSet<BlobType> blobTypes;
54 private ForceNMethodSweepTest(TestCase testCase) {
55 super(testCase);
56 // to prevent inlining of #method
57 WHITE_BOX.testSetDontInlineMethod(method, true);
58 blobTypes = BlobType.getAvailable();
59 }
60
61 @Override
62 protected void test() throws Exception {
63 checkNotCompiled();
64 guaranteedSweep();
65 int usage = getTotalUsage();
|
25 import java.lang.reflect.Method;
26 import java.util.EnumSet;
27
28 import sun.hotspot.WhiteBox;
29 import sun.hotspot.code.BlobType;
30
31 import jdk.test.lib.Asserts;
32 import jdk.test.lib.InfiniteLoop;
33 import compiler.whitebox.CompilerWhiteBoxTest;
34
35 /*
36 * @test
37 * @bug 8059624 8064669
38 * @library /testlibrary /test/lib /
39 * @modules java.management
40 * @build ForceNMethodSweepTest
41 * @run main ClassFileInstaller sun.hotspot.WhiteBox
42 * sun.hotspot.WhiteBox$WhiteBoxPermission
43 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
44 * -XX:-TieredCompilation -XX:+WhiteBoxAPI
45 * -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::*
46 * -XX:-BackgroundCompilation ForceNMethodSweepTest
47 * @summary testing of WB::forceNMethodSweep
48 */
49 public class ForceNMethodSweepTest extends CompilerWhiteBoxTest {
50 public static void main(String[] args) throws Exception {
51 CompilerWhiteBoxTest.main(ForceNMethodSweepTest::new, args);
52 }
53 private final EnumSet<BlobType> blobTypes;
54 private ForceNMethodSweepTest(TestCase testCase) {
55 super(testCase);
56 // to prevent inlining of #method
57 WHITE_BOX.testSetDontInlineMethod(method, true);
58 blobTypes = BlobType.getAvailable();
59 }
60
61 @Override
62 protected void test() throws Exception {
63 checkNotCompiled();
64 guaranteedSweep();
65 int usage = getTotalUsage();
|