8213966: The ZGC JFR events should be marked as experimental
authoregahlin
Sat, 08 Dec 2018 14:08:04 +0100
changeset 52911 e0ce50c5e220
parent 52910 583fd71c47d6
child 52912 f94276ccc9fc
8213966: The ZGC JFR events should be marked as experimental Reviewed-by: pliden
src/hotspot/share/jfr/metadata/metadata.xml
test/jdk/jdk/jfr/event/metadata/TestLookForUntestedEvents.java
--- a/src/hotspot/share/jfr/metadata/metadata.xml	Sat Dec 08 00:56:10 2018 -0800
+++ b/src/hotspot/share/jfr/metadata/metadata.xml	Sat Dec 08 14:08:04 2018 +0100
@@ -899,7 +899,7 @@
     <Field type="uint" name="newRatio" label="New Ratio" description="The size of the young generation relative to the tenured generation" />
   </Event>
 
-  <Event name="ZPageAllocation" category="Java Application" label="ZPage Allocation" description="Allocation of a ZPage" thread="true" stackTrace="false">
+  <Event name="ZPageAllocation" category="Java Virtual Machine, GC, Detailed" label="ZPage Allocation" description="Allocation of a ZPage" thread="true" stackTrace="false" experimental="true">
      <Field type="ulong" contentType="bytes" name="pageSize" label="Page Size" />
      <Field type="ulong" contentType="bytes" name="usedAfter" label="Used After" />
      <Field type="ulong" contentType="bytes" name="freeAfter" label="Free After" />
@@ -908,18 +908,18 @@
      <Field type="boolean" name="noReserve" label="No Reserve" />
   </Event>
 
-  <Event name="ZThreadPhase" category="Java Virtual Machine, GC, Detailed" label="ZGC Thread Phase" thread="true">
+  <Event name="ZThreadPhase" category="Java Virtual Machine, GC, Detailed" label="ZGC Thread Phase" thread="true" experimental="true">
     <Field type="uint" name="gcId" label="GC Identifier" relation="GcId"/>
     <Field type="string" name="name" label="Name" />
   </Event>
 
-  <Event name="ZStatisticsCounter" category="Java Virtual Machine, GC, Detailed" label="Z Statistics Counter" thread="true">
+  <Event name="ZStatisticsCounter" category="Java Virtual Machine, GC, Detailed" label="Z Statistics Counter" thread="true" experimental="true" >
     <Field type="ZStatisticsCounterType" name="id" label="Id" />
     <Field type="ulong" name="increment" label="Increment" />
     <Field type="ulong" name="value" label="Value" />
   </Event>
 
-  <Event name="ZStatisticsSampler" category="Java Virtual Machine, GC, Detailed" label="Z Statistics Sampler" thread="true">
+  <Event name="ZStatisticsSampler" category="Java Virtual Machine, GC, Detailed" label="Z Statistics Sampler" thread="true" experimental="true">
     <Field type="ZStatisticsSamplerType" name="id" label="Id" />
     <Field type="ulong" name="value" label="Value" />
   </Event>
--- a/test/jdk/jdk/jfr/event/metadata/TestLookForUntestedEvents.java	Sat Dec 08 00:56:10 2018 -0800
+++ b/test/jdk/jdk/jfr/event/metadata/TestLookForUntestedEvents.java	Sat Dec 08 14:08:04 2018 +0100
@@ -24,7 +24,6 @@
  */
 package jdk.jfr.event.metadata;
 
-import java.io.File;
 import java.io.IOException;
 import java.lang.reflect.Field;
 import java.nio.file.Files;
@@ -40,8 +39,8 @@
 import jdk.jfr.EventType;
 import jdk.jfr.Experimental;
 import jdk.jfr.FlightRecorder;
+import jdk.test.lib.Utils;
 import jdk.test.lib.jfr.EventNames;
-import jdk.test.lib.Utils;
 
 /**
  * @test Check for JFR events not covered by tests
@@ -55,14 +54,6 @@
     private static final String MSG_SEPARATOR = "==========================";
     private static Set<String> jfrEventTypes = new HashSet<>();
 
-    private static final Set<String> knownEventsMissingFromEventNames = new HashSet<>(
-        Arrays.asList(
-            // The Z* events below should be marked as experimental; see: JDK-8213966
-            "ZStatisticsSampler", "ZStatisticsCounter",
-            "ZPageAllocation", "ZThreadPhase"
-        )
-    );
-
     private static final Set<String> hardToTestEvents = new HashSet<>(
         Arrays.asList(
             "DataLoss", "IntFlag", "ReservedStackActivation",
@@ -147,9 +138,6 @@
             }
         }
 
-        // Account for the events that are known to be missing from the EventNames.java
-        eventsFromEventNamesClass.addAll(knownEventsMissingFromEventNames);
-
         if (!jfrEventTypes.equals(eventsFromEventNamesClass)) {
             String exceptionMsg = "Events declared in jdk.test.lib.jfr.EventNames differ " +
                          "from events returned by FlightRecorder.getEventTypes()";