test/jdk/jdk/jfr/event/runtime/TestClassUnloadEvent.java
changeset 59053 ba6c248cae19
parent 51214 67736b4846a0
child 59094 5d4c3724e4c7
equal deleted inserted replaced
59051:f0312c7d5b37 59053:ba6c248cae19
     1 /*
     1 /*
     2  * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    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 /**
    50 /**
    51  * System.gc() will trigger class unloading if -XX:+ExplicitGCInvokesConcurrent is NOT set.
    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() and
    52  * If this flag is set G1 will never unload classes on System.gc().
    53  * CMS will not guarantee that all semantically dead classes will be unloaded.
       
    54  * As far as the "jfr" key guarantees no VM flags are set from the outside
    53  * As far as the "jfr" key guarantees no VM flags are set from the outside
    55  * it should be enough with System.gc().
    54  * it should be enough with System.gc().
    56  */
    55  */
    57 public final class TestClassUnloadEvent {
    56 public final class TestClassUnloadEvent {
    58     private final static String TEST_CLASS_NAME = "jdk.jfr.event.runtime.TestClasses";
    57     private final static String TEST_CLASS_NAME = "jdk.jfr.event.runtime.TestClasses";