< prev index next >

test/jdk/jdk/jfr/event/oldobject/TestMetadataRetention.java

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


  24  */
  25 package jdk.jfr.event.oldobject;
  26 
  27 import java.time.Instant;
  28 import java.util.List;
  29 
  30 import jdk.jfr.Event;
  31 import jdk.jfr.Recording;
  32 import jdk.jfr.consumer.RecordedClass;
  33 import jdk.jfr.consumer.RecordedClassLoader;
  34 import jdk.jfr.consumer.RecordedEvent;
  35 import jdk.jfr.consumer.RecordedFrame;
  36 import jdk.jfr.consumer.RecordedStackTrace;
  37 import jdk.jfr.consumer.RecordedThread;
  38 import jdk.jfr.internal.test.WhiteBox;
  39 import jdk.test.lib.Asserts;
  40 import jdk.test.lib.jfr.EventNames;
  41 import jdk.test.lib.jfr.Events;
  42 import jdk.test.lib.jfr.TestClassLoader;
  43 
  44 /*
  45  * @test
  46  * @summary The test verifies that an old object sample maintains references to "stale" metadata

  47  * @requires vm.gc == "null"
  48  * @key jfr
  49  * @modules jdk.jfr/jdk.jfr.internal.test
  50  * @library /test/lib /test/jdk
  51  * @build jdk.jfr.event.oldobject.TestMetadataObject
  52  * @run main/othervm -XX:TLABSize=2k -Xmx16m jdk.jfr.event.oldobject.TestMetadataRetention
  53  */
  54 public final class TestMetadataRetention {
  55     private final static String TEST_PACKAGE = TestMetadataRetention.class.getPackage().getName();
  56     private final static String TEST_CLASS_LOADER_NAME = "JFR TestClassLoader";
  57     private final static String TEST_CLASS_NAME = TEST_PACKAGE + ".TestMetadataObject";
  58     private final static String ALLOCATOR_THREAD_NAME = "TestAllocationThread";
  59 
  60     public static ClassLoader testClassLoader;
  61     public static Object leakObject;
  62     public static Thread allocatorThread;
  63     public static Class<?> testClass;
  64 
  65     static class ChunkRotation extends Event {
  66     }




  24  */
  25 package jdk.jfr.event.oldobject;
  26 
  27 import java.time.Instant;
  28 import java.util.List;
  29 
  30 import jdk.jfr.Event;
  31 import jdk.jfr.Recording;
  32 import jdk.jfr.consumer.RecordedClass;
  33 import jdk.jfr.consumer.RecordedClassLoader;
  34 import jdk.jfr.consumer.RecordedEvent;
  35 import jdk.jfr.consumer.RecordedFrame;
  36 import jdk.jfr.consumer.RecordedStackTrace;
  37 import jdk.jfr.consumer.RecordedThread;
  38 import jdk.jfr.internal.test.WhiteBox;
  39 import jdk.test.lib.Asserts;
  40 import jdk.test.lib.jfr.EventNames;
  41 import jdk.test.lib.jfr.Events;
  42 import jdk.test.lib.jfr.TestClassLoader;
  43 
  44 /**
  45  * @test
  46  * @summary The test verifies that an old object sample maintains references to "stale" metadata
  47  * @requires vm.hasJFR
  48  * @requires vm.gc == "null"
  49  * @key jfr
  50  * @modules jdk.jfr/jdk.jfr.internal.test
  51  * @library /test/lib /test/jdk
  52  * @build jdk.jfr.event.oldobject.TestMetadataObject
  53  * @run main/othervm -XX:TLABSize=2k -Xmx16m jdk.jfr.event.oldobject.TestMetadataRetention
  54  */
  55 public final class TestMetadataRetention {
  56     private final static String TEST_PACKAGE = TestMetadataRetention.class.getPackage().getName();
  57     private final static String TEST_CLASS_LOADER_NAME = "JFR TestClassLoader";
  58     private final static String TEST_CLASS_NAME = TEST_PACKAGE + ".TestMetadataObject";
  59     private final static String ALLOCATOR_THREAD_NAME = "TestAllocationThread";
  60 
  61     public static ClassLoader testClassLoader;
  62     public static Object leakObject;
  63     public static Thread allocatorThread;
  64     public static Class<?> testClass;
  65 
  66     static class ChunkRotation extends Event {
  67     }


< prev index next >