< prev index next >

test/jdk/jdk/jfr/event/runtime/TestClassLoadingStatisticsEvent.java

Print this page
rev 51054 : imported patch 9000013-aixDisableJFR-requires.patch


  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package jdk.jfr.event.runtime;
  27 
  28 import java.util.List;
  29 
  30 import jdk.jfr.Recording;
  31 import jdk.jfr.consumer.RecordedEvent;
  32 import jdk.test.lib.Asserts;
  33 import jdk.test.lib.jfr.EventNames;
  34 import jdk.test.lib.jfr.Events;
  35 import jdk.test.lib.jfr.TestClassLoader;
  36 
  37 /*
  38  * @test
  39  * @key jfr

  40  * @library /test/lib /test/jdk
  41  * @build jdk.jfr.event.runtime.TestClasses
  42  * @run main/othervm jdk.jfr.event.runtime.TestClassLoadingStatisticsEvent
  43  */
  44 /**
  45  * This test will load a number of classes. After each load step we verify that
  46  * the loadedClassCount and unloadedClassCount attributes are correct.
  47  *
  48  * System.gc() will trigger class unloading if -XX:+ExplicitGCInvokesConcurrent
  49  * is NOT set. If this flag is set G1 will never unload classes on System.gc()
  50  * and CMS will not guarantee that all semantically dead classes will be
  51  * unloaded. As far as the "jfr" key guarantees no VM flags are set from the
  52  * outside it should be enough with System.gc().
  53  */
  54 public class TestClassLoadingStatisticsEvent {
  55 
  56     private final static String EVENT_PATH = EventNames.ClassLoadingStatistics;
  57     private final static String TESTCLASS_PUBLIC_STATIC =
  58                 "jdk.jfr.event.runtime.TestClasses$TestClassPublicStatic";
  59     private final static String TESTCLASS_PUBLIC_STATIC_INNER =




  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package jdk.jfr.event.runtime;
  27 
  28 import java.util.List;
  29 
  30 import jdk.jfr.Recording;
  31 import jdk.jfr.consumer.RecordedEvent;
  32 import jdk.test.lib.Asserts;
  33 import jdk.test.lib.jfr.EventNames;
  34 import jdk.test.lib.jfr.Events;
  35 import jdk.test.lib.jfr.TestClassLoader;
  36 
  37 /**
  38  * @test
  39  * @key jfr
  40  * @requires vm.hasJFR
  41  * @library /test/lib /test/jdk
  42  * @build jdk.jfr.event.runtime.TestClasses
  43  * @run main/othervm jdk.jfr.event.runtime.TestClassLoadingStatisticsEvent
  44  */
  45 /**
  46  * This test will load a number of classes. After each load step we verify that
  47  * the loadedClassCount and unloadedClassCount attributes are correct.
  48  *
  49  * System.gc() will trigger class unloading if -XX:+ExplicitGCInvokesConcurrent
  50  * is NOT set. If this flag is set G1 will never unload classes on System.gc()
  51  * and CMS will not guarantee that all semantically dead classes will be
  52  * unloaded. As far as the "jfr" key guarantees no VM flags are set from the
  53  * outside it should be enough with System.gc().
  54  */
  55 public class TestClassLoadingStatisticsEvent {
  56 
  57     private final static String EVENT_PATH = EventNames.ClassLoadingStatistics;
  58     private final static String TESTCLASS_PUBLIC_STATIC =
  59                 "jdk.jfr.event.runtime.TestClasses$TestClassPublicStatic";
  60     private final static String TESTCLASS_PUBLIC_STATIC_INNER =


< prev index next >