equal
deleted
inserted
replaced
45 * @library /test/lib /test/jdk |
45 * @library /test/lib /test/jdk |
46 * @build jdk.jfr.event.runtime.TestClasses |
46 * @build jdk.jfr.event.runtime.TestClasses |
47 * @run main/othervm -Xlog:class+unload -Xlog:gc -Xmx16m jdk.jfr.event.runtime.TestClassUnloadEvent |
47 * @run main/othervm -Xlog:class+unload -Xlog:gc -Xmx16m jdk.jfr.event.runtime.TestClassUnloadEvent |
48 */ |
48 */ |
49 |
49 |
50 /** |
|
51 * System.gc() will trigger class unloading if -XX:+ExplicitGCInvokesConcurrent is NOT set. |
|
52 * If this flag is set G1 will never unload classes on System.gc(). |
|
53 * As far as the "jfr" key guarantees no VM flags are set from the outside |
|
54 * it should be enough with System.gc(). |
|
55 */ |
|
56 public final class TestClassUnloadEvent { |
50 public final class TestClassUnloadEvent { |
57 private final static String TEST_CLASS_NAME = "jdk.jfr.event.runtime.TestClasses"; |
51 private final static String TEST_CLASS_NAME = "jdk.jfr.event.runtime.TestClasses"; |
58 private final static String EVENT_PATH = EventNames.ClassUnload; |
52 private final static String EVENT_PATH = EventNames.ClassUnload; |
59 |
53 |
60 // Declare unloadableClassLoader as "public static" |
54 // Declare unloadableClassLoader as "public static" |