changeset 4177:a7ffe4177db0

8007005: JEP 167 tracing gives negative time stamps for certain event fields Reviewed-by: brutisso Contributed-by: markus.gronlund@oracle.com
author nloodin
date Thu, 31 Jan 2013 16:07:24 +0100
parents b3686bbdb7d0
children 88f46d208452
files src/share/vm/trace/trace.xml src/share/vm/trace/traceEventClasses.xsl src/share/vm/trace/traceTime.hpp src/share/vm/trace/tracetypes.xml
diffstat 4 files changed, 16 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/trace/trace.xml	Wed Jan 16 14:55:18 2013 -0800
+++ b/src/share/vm/trace/trace.xml	Thu Jan 31 16:07:24 2013 +0100
@@ -155,8 +155,8 @@
       <value type="ULONG" field="gcId"  label="GC ID" relation="GC_ID" />
       <value type="GCNAME" field="name" label="Name" description="The name of the Garbage Collector" />
       <value type="GCCAUSE" field="cause" label="Cause" description="The reason for triggering this Garbage Collection" />
-      <value type="TICKS" field="sumOfPauses" label="Sum of Pauses" description="Sum of all the times in which Java execution was paused during the garbage collection" />
-      <value type="TICKS" field="longestPause" label="Longest Pause" description="Longest individual pause during the garbage collection" />
+      <value type="RELATIVE_TICKS" field="sumOfPauses" label="Sum of Pauses" description="Sum of all the times in which Java execution was paused during the garbage collection" />
+      <value type="RELATIVE_TICKS" field="longestPause" label="Longest Pause" description="Longest individual pause during the garbage collection" />
     </event>
 
     <event id="GCParallelOld" path="vm/gc/collector/parold_garbage_collection" label="Parallel Old Garbage Collection"
--- a/src/share/vm/trace/traceEventClasses.xsl	Wed Jan 16 14:55:18 2013 -0800
+++ b/src/share/vm/trace/traceEventClasses.xsl	Thu Jan 31 16:07:24 2013 +0100
@@ -166,6 +166,14 @@
 #endif
 </xsl:template>
 
+<xsl:template match="value[@type='RELATIVE_TICKS']" mode="write-setters">
+#if INCLUDE_TRACE
+  <xsl:value-of select="concat('void set_', @field, '(jlong time) { _', @field, ' = time; }')"/>
+#else
+  <xsl:value-of select="concat('void set_', @field, '(jlong ignore) {}')"/>
+#endif
+</xsl:template>
+
 <xsl:template match="value" mode="write-fields">
   <xsl:variable name="type" select="@type"/>
   <xsl:variable name="wt" select="//primary_type[@symbol=$type]/@type"/>
--- a/src/share/vm/trace/traceTime.hpp	Wed Jan 16 14:55:18 2013 -0800
+++ b/src/share/vm/trace/traceTime.hpp	Thu Jan 31 16:07:24 2013 +0100
@@ -28,5 +28,6 @@
 #include "prims/jni.h"
 
 typedef jlong TracingTime;
+typedef jlong RelativeTracingTime;
 
 #endif
--- a/src/share/vm/trace/tracetypes.xml	Wed Jan 16 14:55:18 2013 -0800
+++ b/src/share/vm/trace/tracetypes.xml	Thu Jan 31 16:07:24 2013 +0100
@@ -264,10 +264,14 @@
     <primary_type symbol="NANOS" datatype="LONG" contenttype="NANOS"
                   type="s8" sizeop="sizeof(s8)"/>
 
-    <!-- 64-bit unsigned integer, SEMANTIC value RELATIVE TICKS -->
+    <!-- 64-bit signed integer, SEMANTIC value ABSOLUTE TICKS -->
     <primary_type symbol="TICKS" datatype="LONG" contenttype="TICKS"
                   type="s8" sizeop="sizeof(s8)"/>
 
+    <!-- 64-bit signed integer, SEMANTIC value RELATIVE TICKS -->
+    <primary_type symbol="RELATIVE_TICKS" datatype="LONG" contenttype="TICKS"
+                  type="s8" sizeop="sizeof(s8)"/>
+
     <!-- 64-bit unsigned integer, SEMANTIC value ADDRESS (mem loc) -->
     <primary_type symbol="ADDRESS" datatype="U8" contenttype="ADDRESS"
                   type="u8" sizeop="sizeof(u8)"/>