8215175: Inconsistencies in JFR event metadata

Thu, 13 Dec 2018 14:21:04 +0100

author
egahlin
date
Thu, 13 Dec 2018 14:21:04 +0100
changeset 9874
9c3c8469d9be
parent 9873
c2fd697c6c1a
child 9875
6388d0d497f7

8215175: Inconsistencies in JFR event metadata
Reviewed-by: mgronlun

src/share/vm/jfr/leakprofiler/emitEventOperation.cpp file | annotate | diff | comparison | revisions
src/share/vm/jfr/metadata/metadata.xml file | annotate | diff | comparison | revisions
src/share/vm/jfr/metadata/metadata.xsd file | annotate | diff | comparison | revisions
src/share/vm/jfr/periodic/jfrNetworkUtilization.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/jfr/leakprofiler/emitEventOperation.cpp	Sat Dec 08 14:08:04 2018 +0100
     1.2 +++ b/src/share/vm/jfr/leakprofiler/emitEventOperation.cpp	Thu Dec 13 14:21:04 2018 +0100
     1.3 @@ -184,7 +184,7 @@
     1.4    if (object->is_array()) {
     1.5      return arrayOop(object)->length();
     1.6    }
     1.7 -  return -1;
     1.8 +  return min_jint;
     1.9  }
    1.10  
    1.11  void EmitEventOperation::write_event(const ObjectSample* sample, EdgeStore* edge_store) {
     2.1 --- a/src/share/vm/jfr/metadata/metadata.xml	Sat Dec 08 14:08:04 2018 +0100
     2.2 +++ b/src/share/vm/jfr/metadata/metadata.xml	Thu Dec 13 14:21:04 2018 +0100
     2.3 @@ -65,19 +65,19 @@
     2.4      <Field type="InflateCause" name="cause" label="Monitor Inflation Cause" description="Cause of inflation" />
     2.5    </Event>
     2.6  
     2.7 -  <Event name="BiasedLockRevocation" category="Java Application" label="Biased Lock Revocation" description="Revoked bias of object" thread="true"
     2.8 +  <Event name="BiasedLockRevocation" category="Java Virtual Machine, Runtime" label="Biased Lock Revocation" description="Revoked bias of object" thread="true"
     2.9      stackTrace="true">
    2.10      <Field type="Class" name="lockClass" label="Lock Class" description="Class of object whose biased lock was revoked" />
    2.11      <Field type="int" name="safepointId" label="Safepoint Identifier" relation="SafepointId" />
    2.12      <Field type="Thread" name="previousOwner" label="Previous Owner" description="Thread owning the bias before revocation" />
    2.13    </Event>
    2.14  
    2.15 -  <Event name="BiasedLockSelfRevocation" category="Java Application" label="Biased Lock Self Revocation" description="Revoked bias of object biased towards own thread"
    2.16 +  <Event name="BiasedLockSelfRevocation" category="Java Virtual Machine, Runtime" label="Biased Lock Self Revocation" description="Revoked bias of object biased towards own thread"
    2.17      thread="true" stackTrace="true">
    2.18      <Field type="Class" name="lockClass" label="Lock Class" description="Class of object whose biased lock was revoked" />
    2.19    </Event>
    2.20  
    2.21 -  <Event name="BiasedLockClassRevocation" category="Java Application" label="Biased Lock Class Revocation" description="Revoked biases for all instances of a class"
    2.22 +  <Event name="BiasedLockClassRevocation" category="Java Virtual Machine, Runtime" label="Biased Lock Class Revocation" description="Revoked biases for all instances of a class"
    2.23      thread="true" stackTrace="true">
    2.24      <Field type="Class" name="revokedClass" label="Revoked Class" description="Class whose biased locks were revoked" />
    2.25      <Field type="boolean" name="disableBiasing" label="Disable Further Biasing" description="Whether further biasing for instances of this class will be allowed" />
    2.26 @@ -350,7 +350,7 @@
    2.27      <Field type="ulong" contentType="bytes" name="recentMutatorAllocationSize" label="Recent Mutator Allocation Size"
    2.28        description="Mutator allocation during mutator operation in the most recent interval" />
    2.29      <Field type="long" contentType="millis" name="recentMutatorDuration" label="Recent Mutator Duration" description="Time the mutator ran in the most recent interval" />
    2.30 -    <Field type="double" name="recentAllocationRate" label="Recent Allocation Rate" description="Allocation rate of the mutator in the most recent interval in bytes/second" />
    2.31 +    <Field type="double" contentType="bytes-per-second" name="recentAllocationRate" label="Recent Allocation Rate" description="Allocation rate of the mutator in the most recent interval in bytes/second" />
    2.32      <Field type="long" contentType="millis" name="lastMarkingDuration" label="Last Marking Duration" description="Last time from the end of the last initial mark to the first mixed GC" />
    2.33    </Event>
    2.34  
    2.35 @@ -362,7 +362,7 @@
    2.36      <Field type="ulong" contentType="bytes" name="ihopTargetOccupancy" label="IHOP Target Occupancy" description="Internal target old generation occupancy to reach at the start of mixed GC" />
    2.37      <Field type="ulong" contentType="bytes" name="currentOccupancy" label="Current Occupancy" description="Current old generation occupancy" />
    2.38      <Field type="ulong" contentType="bytes" name="additionalBufferSize" label="Additional Buffer" description="Additional buffer size" experimental="true" />
    2.39 -    <Field type="double" name="predictedAllocationRate" label="Predicted Allocation Rate" description="Current predicted allocation rate for the mutator in bytes/second" />
    2.40 +    <Field type="double" contentType="bytes-per-second" name="predictedAllocationRate" label="Predicted Allocation Rate" description="Current predicted allocation rate for the mutator in bytes/second" />
    2.41      <Field type="long" contentType="millis" name="predictedMarkingDuration" label="Predicted Marking Duration"
    2.42        description="Current predicted time from the end of the last initial mark to the first mixed GC" />
    2.43      <Field type="boolean" name="predictionActive" label="Prediction Active" description="Indicates whether the adaptive IHOP prediction is active" />
    2.44 @@ -557,9 +557,9 @@
    2.45        relation="SafepointId" />
    2.46    </Event>
    2.47  
    2.48 -  <Event name="Shutdown" category="Java Virtual Machine, Runtime" label="VM Shutdown" description="VM shutting down" thread="true" stackTrace="true"
    2.49 +  <Event name="Shutdown" category="Java Virtual Machine, Runtime" label="JVM Shutdown" description="JVM shutting down" thread="true" stackTrace="true"
    2.50      startTime="false">
    2.51 -    <Field type="string" name="reason" label="Reason" description="Reason for VM shutdown" />
    2.52 +    <Field type="string" name="reason" label="Reason" description="Reason for JVM shutdown" />
    2.53    </Event>
    2.54  
    2.55    <Event name="ObjectAllocationInNewTLAB" category="Java Application" label="Allocation in new TLAB" description="Allocation in new Thread Local Allocation Buffer"
    2.56 @@ -575,7 +575,7 @@
    2.57      <Field type="ulong" contentType="bytes" name="allocationSize" label="Allocation Size" />
    2.58    </Event>
    2.59  
    2.60 -  <Event name="OldObjectSample" category="Java Application" label="Old Object Sample" description="A potential memory leak" stackTrace="true" thread="true"
    2.61 +  <Event name="OldObjectSample" category="Java Virtual Machine, Profiling" label="Old Object Sample" description="A potential memory leak" stackTrace="true" thread="true"
    2.62      startTime="false" cutoff="true">
    2.63      <Field type="Ticks" name="allocationTime" label="Allocation Time" />
    2.64      <Field type="ulong" contentType="bytes" name="lastKnownHeapUsage" label="Last Known Heap Usage" />
    2.65 @@ -640,8 +640,8 @@
    2.66    <Event name="CPUTimeStampCounter" category="Operating System, Processor" label="CPU Time Stamp Counter" period="endChunk">
    2.67      <Field type="boolean" name="fastTimeEnabled" label="Fast Time" />
    2.68      <Field type="boolean" name="fastTimeAutoEnabled" label="Trusted Platform" />
    2.69 -    <Field type="long" name="osFrequency" label="OS Frequency Per Second" />
    2.70 -    <Field type="long" name="fastTimeFrequency" label="Fast Time Frequency per Second" />
    2.71 +    <Field type="long" contentType="hertz" name="osFrequency" label="OS Frequency" />
    2.72 +    <Field type="long" contentType="hertz" name="fastTimeFrequency" label="Fast Time Frequency" />
    2.73    </Event>
    2.74  
    2.75    <Event name="CPULoad" category="Operating System, Processor" label="CPU Load" description="OS CPU Load" period="everyChunk">
    2.76 @@ -656,13 +656,13 @@
    2.77    </Event>
    2.78  
    2.79    <Event name="ThreadContextSwitchRate" category="Operating System, Processor" label="Thread Context Switch Rate" period="everyChunk">
    2.80 -    <Field type="float" name="switchRate" label="Switch Rate" description="Number of context switches per second" />
    2.81 +    <Field type="float" contentType="hertz" name="switchRate" label="Switch Rate" description="Number of context switches per second" />
    2.82    </Event>
    2.83  
    2.84    <Event name="NetworkUtilization" category="Operating System, Network" label="Network Utilization" period="everyChunk">
    2.85      <Field type="NetworkInterfaceName" name="networkInterface" label="Network Interface" description="Network Interface Name"/>
    2.86 -    <Field type="long" contentType="bytes" name="readRate" label="Read Rate" description="Number of incoming bytes per second"/>
    2.87 -    <Field type="long" contentType="bytes" name="writeRate" label="Write Rate" description="Number of outgoing bytes per second"/>
    2.88 +    <Field type="long" contentType="bits-per-second" name="readRate" label="Read Rate" description="Number of incoming bits per second"/>
    2.89 +    <Field type="long" contentType="bits-per-second" name="writeRate" label="Write Rate" description="Number of outgoing bits per second"/>
    2.90    </Event>
    2.91  
    2.92    <Event name="JavaThreadStatistics" category="Java Application, Statistics" label="Java Thread Statistics" period="everyChunk">
    2.93 @@ -680,7 +680,7 @@
    2.94    <Event name="ClassLoaderStatistics" category="Java Application, Statistics" label="Class Loader Statistics" period="everyChunk">
    2.95      <Field type="ClassLoader" name="classLoader" label="Class Loader" />
    2.96      <Field type="ClassLoader" name="parentClassLoader" label="Parent Class Loader" />
    2.97 -    <Field type="ulong" contentType="address" name="classLoaderData" label="ClassLoaderData pointer" description="Pointer to the ClassLoaderData structure in the JVM" />
    2.98 +    <Field type="ulong" contentType="address" name="classLoaderData" label="ClassLoaderData Pointer" description="Pointer to the ClassLoaderData structure in the JVM" />
    2.99      <Field type="long" name="classCount" label="Classes" description="Number of loaded classes" />
   2.100      <Field type="ulong" contentType="bytes" name="chunkSize" label="Total Chunk Size" description="Total size of all allocated metaspace chunks (each chunk has several blocks)" />
   2.101      <Field type="ulong" contentType="bytes" name="blockSize" label="Total Block Size" description="Total size of all allocated metaspace blocks (each chunk has several blocks)" />
   2.102 @@ -735,8 +735,7 @@
   2.103    <Event name="ModuleExport" category="Java Virtual Machine, Runtime, Modules" label="Module Export" thread="false" period="everyChunk">
   2.104      <Field type="Package" name="exportedPackage" label="Exported Package" />
   2.105      <Field type="Module" name="targetModule" label="Target Module"
   2.106 -      description="Module to which the package is qualifiedly exported.
   2.107 -             If null, the package is unqualifiedly exported" />
   2.108 +      description="Module to which the package is qualifiedly exported. If null or N/A, the package is unqualifiedly exported" />
   2.109    </Event>
   2.110    -->
   2.111    <Event name="CompilerStatistics" category="Java Virtual Machine, Compiler" label="Compiler Statistics" thread="false" period="everyChunk" startTime="false">
   2.112 @@ -1092,7 +1091,7 @@
   2.113      <Field type="OldObjectArray" name="array" label="Array Information" description="Array or null if it is not an array" />
   2.114      <Field type="OldObjectField" name="field" label="Field Information" description="Field or null if it is an array" />
   2.115      <Field type="OldObject" name="object" label="Object" description="Object holder for this reference" />
   2.116 -    <Field type="int" name="skip" label="Skip value" description="The object is this many hops away" />
   2.117 +    <Field type="int" name="skip" label="Skip Value" description="The object is this many hops away" />
   2.118    </Type>
   2.119  
   2.120    <Type name="StackFrame">
   2.121 @@ -1129,13 +1128,16 @@
   2.122    <XmlType name="char" javaType="char" parameterType="char" fieldType="char"/> 
   2.123    <XmlType name="string" javaType="java.lang.String" parameterType="const char*" fieldType="const char*"/> 
   2.124   
   2.125 -  <XmlContentType name="bytes" annotationType="jdk.jfr.DataAmount" annotationValue="BYTES" />
   2.126 -  <XmlContentType name="tickstamp" annotationType="jdk.jfr.Timestamp" annotationValue="TICKS" />
   2.127 -  <XmlContentType name="epochmillis" annotationType="jdk.jfr.Timestamp" annotationValue="MILLISECONDS_SINCE_EPOCH" />
   2.128 -  <XmlContentType name="tickspan" annotationType="jdk.jfr.Timespan" annotationValue="TICKS" />
   2.129 -  <XmlContentType name="address" annotationType="jdk.jfr.MemoryAddress" />
   2.130 -  <XmlContentType name="percentage" annotationType="jdk.jfr.Percentage" />
   2.131 -  <XmlContentType name="millis" annotationType="jdk.jfr.Timespan" annotationValue="MILLISECONDS" />
   2.132 -  <XmlContentType name="nanos" annotationType="jdk.jfr.Timespan" annotationValue="NANOSECONDS" />
   2.133 -  
   2.134 +  <XmlContentType name="bytes" annotation="jdk.jfr.DataAmount(BYTES)" />
   2.135 +  <XmlContentType name="tickstamp" annotation="jdk.jfr.Timestamp(TICKS)" />
   2.136 +  <XmlContentType name="epochmillis" annotation="jdk.jfr.Timestamp(MILLISECONDS_SINCE_EPOCH)" />
   2.137 +  <XmlContentType name="tickspan" annotation="jdk.jfr.Timespan(TICKS)" />
   2.138 +  <XmlContentType name="address" annotation="jdk.jfr.MemoryAddress" />
   2.139 +  <XmlContentType name="percentage" annotation="jdk.jfr.Percentage" />
   2.140 +  <XmlContentType name="millis" annotation="jdk.jfr.Timespan(MILLISECONDS)" />
   2.141 +  <XmlContentType name="nanos" annotation="jdk.jfr.Timespan(NANOSECONDS)" />
   2.142 +  <XmlContentType name="hertz" annotation="jdk.jfr.Frequency" />
   2.143 +  <XmlContentType name="bytes-per-second" annotation="jdk.jfr.DataAmount(BYTES), jdk.jfr.Frequency" />
   2.144 +  <XmlContentType name="bits-per-second" annotation="jdk.jfr.DataAmount(BITS), jdk.jfr.Frequency" />
   2.145 + 
   2.146  </Metadata>
     3.1 --- a/src/share/vm/jfr/metadata/metadata.xsd	Sat Dec 08 14:08:04 2018 +0100
     3.2 +++ b/src/share/vm/jfr/metadata/metadata.xsd	Thu Dec 13 14:21:04 2018 +0100
     3.3 @@ -107,8 +107,7 @@
     3.4            <xs:element name="XmlContentType">
     3.5              <xs:complexType>
     3.6                <xs:attribute name="name" type="xs:NMTOKEN" use="required" />
     3.7 -              <xs:attribute name="annotationType" type="xs:NMTOKEN" use="required" />
     3.8 -              <xs:attribute name="annotationValue" type="xs:string" use="optional" />
     3.9 +              <xs:attribute name="annotation" type="xs:string" use="required" />
    3.10              </xs:complexType>
    3.11            </xs:element>
    3.12            <xs:element name="Relation">
     4.1 --- a/src/share/vm/jfr/periodic/jfrNetworkUtilization.cpp	Sat Dec 08 14:08:04 2018 +0100
     4.2 +++ b/src/share/vm/jfr/periodic/jfrNetworkUtilization.cpp	Thu Dec 13 14:21:04 2018 +0100
     4.3 @@ -173,8 +173,8 @@
     4.4          event.set_starttime(cur_time);
     4.5          event.set_endtime(cur_time);
     4.6          event.set_networkInterface(entry.id);
     4.7 -        event.set_readRate(read_rate);
     4.8 -        event.set_writeRate(write_rate);
     4.9 +        event.set_readRate(8 * read_rate);
    4.10 +        event.set_writeRate(8 * write_rate);
    4.11          event.commit();
    4.12        }
    4.13        // update existing entry with new values

mercurial