test/jdk/jdk/jfr/event/runtime/TestClassUnloadEvent.java
changeset 59094 5d4c3724e4c7
parent 59053 ba6c248cae19
equal deleted inserted replaced
59093:6933b57d7667 59094:5d4c3724e4c7
    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"