< prev index next >

test/jdk/jdk/jfr/event/metadata/TestLookForUntestedEvents.java

Print this page

 62     // GC uses specific framework to test the events, instead of using event names literally.
 63     // GC tests were inspected, as well as runtime output of GC tests.
 64     // The following events below are know to be covered based on that inspection.
 65     private static final Set<String> coveredGcEvents = new HashSet<>(
 66         Arrays.asList(
 67             "MetaspaceGCThreshold", "MetaspaceAllocationFailure", "MetaspaceOOM",
 68             "MetaspaceChunkFreeListSummary", "G1HeapSummary", "ParallelOldGarbageCollection",
 69             "OldGarbageCollection", "G1GarbageCollection", "GCPhasePause",
 70             "GCPhasePauseLevel1", "GCPhasePauseLevel2", "GCPhasePauseLevel3",
 71             "GCPhasePauseLevel4")
 72     );
 73 
 74     // Container events are tested in hotspot/jtreg/containers/docker/TestJFREvents.java
 75     private static final Set<String> coveredContainerEvents = new HashSet<>(
 76         Arrays.asList(
 77             "ContainerConfiguration", "ContainerCPUUsage", "ContainerCPUThrottling",
 78             "ContainerMemoryUsage", "ContainerIOUsage")
 79     );
 80     // These events are tested in test/jdk/java/lang/Thread/virtual/JfrEvents.java
 81     private static final Set<String> coveredVirtualThreadEvents = Set.of(
 82         "VirtualThreadPinned", "VirtualThreadSubmitFailed");
 83 
 84     // This event is tested in test/jdk/java/lang/reflect/Field/mutateFinals/FinalFieldMutationEventTest.java
 85     private static final Set<String> coveredFinalFieldMutationEvents = Set.of(
 86         "FinalFieldMutationEvent");
 87 
 88     // This is a "known failure list" for this test.
 89     // NOTE: if the event is not covered, a bug should be open, and bug number
 90     // noted in the comments for this set.
 91     private static final Set<String> knownNotCoveredEvents = new HashSet<>(
 92     );
 93 
 94     // Experimental events
 95     private static final Set<String> experimentalEvents = Set.of(
 96         "Flush", "SyncOnValueBasedClass", "CPUTimeSample", "CPUTimeSamplesLost");
 97 
 98     // Subset of the experimental events that should have tests
 99     private static final Set<String> experimentalButTestedEvents = Set.of("CPUTimeSample");
100 
101     public static void main(String[] args) throws Exception {
102         for (EventType type : FlightRecorder.getFlightRecorder().getEventTypes()) {

 62     // GC uses specific framework to test the events, instead of using event names literally.
 63     // GC tests were inspected, as well as runtime output of GC tests.
 64     // The following events below are know to be covered based on that inspection.
 65     private static final Set<String> coveredGcEvents = new HashSet<>(
 66         Arrays.asList(
 67             "MetaspaceGCThreshold", "MetaspaceAllocationFailure", "MetaspaceOOM",
 68             "MetaspaceChunkFreeListSummary", "G1HeapSummary", "ParallelOldGarbageCollection",
 69             "OldGarbageCollection", "G1GarbageCollection", "GCPhasePause",
 70             "GCPhasePauseLevel1", "GCPhasePauseLevel2", "GCPhasePauseLevel3",
 71             "GCPhasePauseLevel4")
 72     );
 73 
 74     // Container events are tested in hotspot/jtreg/containers/docker/TestJFREvents.java
 75     private static final Set<String> coveredContainerEvents = new HashSet<>(
 76         Arrays.asList(
 77             "ContainerConfiguration", "ContainerCPUUsage", "ContainerCPUThrottling",
 78             "ContainerMemoryUsage", "ContainerIOUsage")
 79     );
 80     // These events are tested in test/jdk/java/lang/Thread/virtual/JfrEvents.java
 81     private static final Set<String> coveredVirtualThreadEvents = Set.of(
 82         "VirtualThreadPark", "VirtualThreadPinned", "VirtualThreadSubmitFailed");
 83 
 84     // This event is tested in test/jdk/java/lang/reflect/Field/mutateFinals/FinalFieldMutationEventTest.java
 85     private static final Set<String> coveredFinalFieldMutationEvents = Set.of(
 86         "FinalFieldMutationEvent");
 87 
 88     // This is a "known failure list" for this test.
 89     // NOTE: if the event is not covered, a bug should be open, and bug number
 90     // noted in the comments for this set.
 91     private static final Set<String> knownNotCoveredEvents = new HashSet<>(
 92     );
 93 
 94     // Experimental events
 95     private static final Set<String> experimentalEvents = Set.of(
 96         "Flush", "SyncOnValueBasedClass", "CPUTimeSample", "CPUTimeSamplesLost");
 97 
 98     // Subset of the experimental events that should have tests
 99     private static final Set<String> experimentalButTestedEvents = Set.of("CPUTimeSample");
100 
101     public static void main(String[] args) throws Exception {
102         for (EventType type : FlightRecorder.getFlightRecorder().getEventTypes()) {
< prev index next >