24 */
25
26 package jdk.jfr.event.compiler;
27
28 import java.io.File;
29 import java.lang.reflect.Method;
30 import java.net.MalformedURLException;
31 import java.net.URL;
32 import java.nio.file.Paths;
33 import java.util.List;
34
35 import sun.hotspot.WhiteBox;
36 import jdk.jfr.Recording;
37 import jdk.jfr.consumer.RecordedEvent;
38 import jdk.test.lib.classloader.FilterClassLoader;
39 import jdk.test.lib.classloader.ParentLastURLClassLoader;
40 import jdk.test.lib.jfr.EventNames;
41 import jdk.test.lib.jfr.Events;
42 import jdk.test.lib.Utils;
43
44 /*
45 * @test TestCodeSweeperStats
46 * @key jfr
47 * @library /test/lib
48 * @requires vm.compMode!="Xint"
49 * @build sun.hotspot.WhiteBox
50 * @run main ClassFileInstaller sun.hotspot.WhiteBox
51 * sun.hotspot.WhiteBox$WhiteBoxPermission
52 * @run main/othervm -Xbootclasspath/a:.
53 * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
54 * -XX:CompileOnly=jdk.jfr.event.compiler.TestCodeSweeperStats::dummyMethod
55 * -XX:+SegmentedCodeCache jdk.jfr.event.compiler.TestCodeSweeperStats
56 * @run main/othervm -Xbootclasspath/a:.
57 * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
58 * -XX:CompileOnly=jdk.jfr.event.compiler.TestCodeSweeperStats::dummyMethod
59 * -XX:-SegmentedCodeCache jdk.jfr.event.compiler.TestCodeSweeperStats
60 */
61 public class TestCodeSweeperStats {
62 private static final String EVENT_NAME = EventNames.CodeSweeperStatistics;
63 private static final int WAIT_TIME = 10_000;
64 private static final String CLASS_METHOD_TO_COMPILE = "dummyMethod";
65 private static final int METHODS_TO_COMPILE = Integer.getInteger("compile.methods.count", 10);
66 private static final int COMP_LEVEL_SIMPLE = 1;
|
24 */
25
26 package jdk.jfr.event.compiler;
27
28 import java.io.File;
29 import java.lang.reflect.Method;
30 import java.net.MalformedURLException;
31 import java.net.URL;
32 import java.nio.file.Paths;
33 import java.util.List;
34
35 import sun.hotspot.WhiteBox;
36 import jdk.jfr.Recording;
37 import jdk.jfr.consumer.RecordedEvent;
38 import jdk.test.lib.classloader.FilterClassLoader;
39 import jdk.test.lib.classloader.ParentLastURLClassLoader;
40 import jdk.test.lib.jfr.EventNames;
41 import jdk.test.lib.jfr.Events;
42 import jdk.test.lib.Utils;
43
44 /**
45 * @test TestCodeSweeperStats
46 * @key jfr
47 * @requires vm.hasJFR
48 * @library /test/lib
49 * @requires vm.compMode!="Xint"
50 * @build sun.hotspot.WhiteBox
51 * @run main ClassFileInstaller sun.hotspot.WhiteBox
52 * sun.hotspot.WhiteBox$WhiteBoxPermission
53 * @run main/othervm -Xbootclasspath/a:.
54 * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
55 * -XX:CompileOnly=jdk.jfr.event.compiler.TestCodeSweeperStats::dummyMethod
56 * -XX:+SegmentedCodeCache jdk.jfr.event.compiler.TestCodeSweeperStats
57 * @run main/othervm -Xbootclasspath/a:.
58 * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
59 * -XX:CompileOnly=jdk.jfr.event.compiler.TestCodeSweeperStats::dummyMethod
60 * -XX:-SegmentedCodeCache jdk.jfr.event.compiler.TestCodeSweeperStats
61 */
62 public class TestCodeSweeperStats {
63 private static final String EVENT_NAME = EventNames.CodeSweeperStatistics;
64 private static final int WAIT_TIME = 10_000;
65 private static final String CLASS_METHOD_TO_COMPILE = "dummyMethod";
66 private static final int METHODS_TO_COMPILE = Integer.getInteger("compile.methods.count", 10);
67 private static final int COMP_LEVEL_SIMPLE = 1;
|