1 <?xml version="1.0" encoding="utf-8"?>
   2 <!--
   3  Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
   4  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   5 
   6  This code is free software; you can redistribute it and/or modify it
   7  under the terms of the GNU General Public License version 2 only, as
   8  published by the Free Software Foundation.
   9 
  10  This code is distributed in the hope that it will be useful, but WITHOUT
  11  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  version 2 for more details (a copy is included in the LICENSE file that
  14  accompanied this code).
  15 
  16  You should have received a copy of the GNU General Public License version
  17  2 along with this work; if not, write to the Free Software Foundation,
  18  Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19 
  20  Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  or visit www.oracle.com if you need additional information or have any
  22  questions.
  23 
  24 -->
  25 
  26 
  27 <!DOCTYPE trace SYSTEM "trace.dtd" [
  28 <!ENTITY % xinclude SYSTEM "xinclude.mod">
  29 %xinclude;
  30 ]>
  31 
  32 <trace>
  33   <xi:include href="tracetypes.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
  34 
  35   <relation_decls>
  36     <relation_decl id="GC_ID" uri="vm/gc/id"/>
  37     <relation_decl id="COMP_ID" uri="vm/compiler/id"/>
  38     <relation_decl id="SWEEP_ID" uri="vm/code_sweeper/id"/>
  39     <relation_decl id="JAVA_MONITOR_ADDRESS" uri="java/monitor/address"/>
  40   </relation_decls>
  41 
  42 <!--
  43 
  44 Events in the JVM are by default timed (it's more common)
  45 Perhaps a little strange. Might change.
  46 
  47 EVENTS
  48 
  49 Declard with the 'event' tag.
  50 
  51 <value fields> can be one or more of
  52    value            - a simple primitive or constant type value
  53    structvalue      - value is a sub-struct. This type must be previously defined
  54                       with 'struct'
  55 All these require you to declare type, field and label of the field. They also accept
  56 an optional description of the field. If the meaning of the field is not obvious
  57 from the label you should provide a description. If an event however is not actually
  58 meant for end-users, you should probably _not_ write descriptions at all, since you
  59 might just add more concepts the user has no notion of/interest in.
  60 
  61 Events should be modeled after what conceptual process you are expressing, _NOT_
  62 from whatever data structures you might use inside the JVM for expressing a process.
  63 
  64 
  65 STRUCT
  66 
  67 Declared with the 'struct' tag.
  68 
  69 Declares a structure type that can be used in other events.
  70 
  71 -->
  72 
  73   <events>
  74     <event id="ThreadStart" path="java/thread_start" label="Java Thread Start"
  75            has_thread="true" is_instant="true">
  76       <value type="JAVALANGTHREAD" field="javalangthread" label="Java Thread"/>
  77     </event>
  78 
  79     <event id="ThreadEnd" path="java/thread_end" label="Java Thread End"
  80            has_thread="true" is_instant="true">
  81       <value type="JAVALANGTHREAD" field="javalangthread" label="Java Thread"/>
  82     </event>
  83 
  84     <event id="ThreadSleep" path="java/thread_sleep" label="Java Thread Sleep"
  85             has_thread="true" has_stacktrace="true" is_instant="false">
  86       <value type="MILLIS" field="time" label="Sleep Time"/>
  87     </event>
  88 
  89     <event id="ThreadPark" path="java/thread_park" label="Java Thread Park"
  90             has_thread="true" has_stacktrace="true" is_instant="false">
  91       <value type="CLASS" field="klass" label="Class Parked On"/>
  92       <value type="MILLIS" field="timeout" label="Park Timeout"/>
  93       <value type="ADDRESS" field="address" label="Address of Object Parked" relation="JAVA_MONITOR_ADDRESS"/>
  94     </event>
  95 
  96     <event id="JavaMonitorEnter" path="java/monitor_enter" label="Java Monitor Blocked"
  97             has_thread="true" has_stacktrace="true" is_instant="false">
  98       <value type="CLASS" field="klass" label="Monitor Class"/>
  99       <value type="JAVALANGTHREAD" field="previousOwner" label="Previous Monitor Owner"/>
 100       <value type="ADDRESS" field="address" label="Monitor Address" relation="JAVA_MONITOR_ADDRESS"/>
 101     </event>
 102 
 103     <event id="JavaMonitorWait" path="java/monitor_wait" label="Java Monitor Wait" description="Waiting on a Java monitor"
 104             has_thread="true" has_stacktrace="true" is_instant="false">
 105       <value type="CLASS" field="klass" label="Monitor Class" description="Class of object waited on"/>
 106       <value type="OSTHREAD" field="notifier" label="Notifier Thread" description="Notifying Thread"/>
 107       <value type="MILLIS" field="timeout" label="Timeout" description="Maximum wait time"/>
 108       <value type="BOOLEAN" field="timedOut" label="Timed Out" description="Wait has been timed out"/>
 109       <value type="ADDRESS" field="address" label="Monitor Address" description="Address of object waited on" relation="JAVA_MONITOR_ADDRESS"/>
 110     </event>
 111 
 112     <event id="ClassLoad" path="vm/class/load" label="Class Load"
 113             has_thread="true" has_stacktrace="true" is_instant="false">
 114       <value type="CLASS" field="loadedClass" label="Loaded Class"/>
 115       <value type="CLASS" field="definingClassLoader" label="Defining Class Loader"/>
 116       <value type="CLASS" field="initiatingClassLoader" label="Initiating Class Loader"/>
 117     </event>
 118 
 119     <event id="ClassUnload" path="vm/class/unload" label="Class Unload"
 120         has_thread="true" is_instant="true">
 121       <value type="CLASS" field="unloadedClass" label="Unloaded Class"/>
 122       <value type="CLASS" field="definingClassLoader" label="Defining Class Loader"/>
 123     </event>
 124 
 125     <struct id="VirtualSpace">
 126       <value type="ADDRESS" field="start" label="Start Address" description="Start address of the virtual space" />
 127       <value type="ADDRESS" field="committedEnd" label="Committed End Address" description="End address of the committed memory for the virtual space" />
 128       <value type="BYTES64" field="committedSize" label="Committed Size" description="Size of the committed memory for the virtual space" />
 129       <value type="ADDRESS" field="reservedEnd" label="Reserved End Address" description="End address of the reserved memory for the virtual space" />
 130       <value type="BYTES64" field="reservedSize" label="Reserved Size" description="Size of the reserved memory for the virtual space" />
 131     </struct>
 132 
 133     <struct id="ObjectSpace">
 134       <value type="ADDRESS" field="start" label="Start Address" description="Start address of the space" />
 135       <value type="ADDRESS" field="end" label="End Address" description="End address of the space" />
 136       <value type="BYTES64" field="used" label="Used" description="Bytes allocated by objects in the space" />
 137       <value type="BYTES64" field="size" label="Size" description="Size of the space" />
 138     </struct>
 139 
 140     <event id="GCHeapSummary" path="vm/gc/heap/summary" label="Heap Summary" is_instant="true">
 141       <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
 142       <value type="GCWHEN" field="when" label="When" />
 143       <structvalue type="VirtualSpace" field="heapSpace" label="Heap Space"/>
 144       <value type="BYTES64" field="heapUsed" label="Heap Used" description="Bytes allocated by objects in the heap"/>
 145     </event>
 146 
 147     <struct id="MetaspaceSizes">
 148       <value type="BYTES64" field="capacity" label="Capacity" description="Total available memory to allocate in" />
 149       <value type="BYTES64" field="used" label="Used" description="Bytes allocated by objects in the space" />
 150       <value type="BYTES64" field="reserved" label="Reserved" description="Reserved memory for this space" />
 151     </struct>
 152 
 153     <event id="MetaspaceSummary" path="vm/gc/heap/metaspace_summary" label="Metaspace Summary" is_instant="true">
 154       <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
 155       <value type="GCWHEN" field="when" label="When" />
 156       <structvalue type="MetaspaceSizes" field="metaspace" label="Total"/>
 157       <structvalue type="MetaspaceSizes" field="dataSpace" label="Data"/>
 158       <structvalue type="MetaspaceSizes" field="classSpace" label="Class"/>
 159     </event>
 160 
 161     <event id="PSHeapSummary" path="vm/gc/heap/ps_summary" label="Parallel Scavenge Heap Summary" is_instant="true">
 162       <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
 163       <value type="GCWHEN" field="when" label="When" />
 164 
 165       <structvalue type="VirtualSpace" field="oldSpace" label="Old Space"/>
 166       <structvalue type="ObjectSpace" field="oldObjectSpace" label="Old Object Space"/>
 167 
 168       <structvalue type="VirtualSpace" field="youngSpace" label="Young Space"/>
 169       <structvalue type="ObjectSpace" field="edenSpace" label="Eden Space"/>
 170       <structvalue type="ObjectSpace" field="fromSpace" label="From Space"/>
 171       <structvalue type="ObjectSpace" field="toSpace" label="To Space"/>
 172     </event>
 173 
 174     <event id="GCGarbageCollection" path="vm/gc/collector/garbage_collection" label="Garbage Collection"
 175            description="Garbage collection performed by the JVM">
 176       <value type="UINT" field="gcId"  label="GC ID" relation="GC_ID" />
 177       <value type="GCNAME" field="name" label="Name" description="The name of the Garbage Collector" />
 178       <value type="GCCAUSE" field="cause" label="Cause" description="The reason for triggering this Garbage Collection" />
 179       <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" />
 180       <value type="RELATIVE_TICKS" field="longestPause" label="Longest Pause" description="Longest individual pause during the garbage collection" />
 181     </event>
 182 
 183     <event id="GCParallelOld" path="vm/gc/collector/parold_garbage_collection" label="Parallel Old Garbage Collection"
 184            description="Extra information specific to Parallel Old Garbage Collections">
 185       <value type="UINT" field="gcId"  label="GC ID" relation="GC_ID" />
 186       <value type="ADDRESS" field="densePrefix" label="Dense Prefix" description="The address of the dense prefix, used when compacting" />
 187     </event>
 188 
 189     <event id="GCYoungGarbageCollection" path="vm/gc/collector/young_garbage_collection" label="Young Garbage Collection"
 190            description="Extra information specific to Young Garbage Collections">
 191       <value type="UINT" field="gcId"  label="GC ID" relation="GC_ID" />
 192       <value type="UINT" field="tenuringThreshold" label="Tenuring Threshold" />
 193     </event>
 194 
 195     <event id="GCOldGarbageCollection" path="vm/gc/collector/old_garbage_collection" label="Old Garbage Collection"
 196            description="Extra information specific to Old Garbage Collections">
 197       <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
 198     </event>
 199 
 200     <event id="GCG1GarbageCollection" path="vm/gc/collector/g1_garbage_collection" label="G1 Garbage Collection"
 201            description="Extra information specific to G1 Garbage Collections">
 202       <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
 203       <value type="G1YCTYPE" field="type" label="Type" />
 204     </event>
 205 
 206     <event id="EvacuationInfo" path="vm/gc/detailed/evacuation_info" label="Evacuation Information" is_instant="true">
 207       <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
 208       <value type="UINT" field="cSetRegions" label="Collection Set Regions"/>
 209       <value type="BYTES64" field="cSetUsedBefore" label="Collection Set Before" description="Memory usage before GC in the collection set regions"/>
 210       <value type="BYTES64" field="cSetUsedAfter" label="Collection Set After" description="Memory usage after GC in the collection set regions"/>
 211       <value type="UINT" field="allocationRegions" label="Allocation Regions" description="Regions chosen as allocation regions during evacuation (includes survivors and old space regions)"/>
 212       <value type="BYTES64" field="allocRegionsUsedBefore" label="Alloc Regions Before" description="Memory usage before GC in allocation regions"/>
 213       <value type="BYTES64" field="allocRegionsUsedAfter" label="Alloc Regions After" description="Memory usage after GC in allocation regions"/>
 214       <value type="BYTES64" field="bytesCopied" label="Bytes Copied"/>
 215       <value type="UINT" field="regionsFreed" label="Regions Freed"/>
 216     </event>
 217 
 218     <event id="GCReferenceStatistics" path="vm/gc/reference/statistics"
 219            label="GC Reference Statistics" is_instant="true"
 220            description="Total count of processed references during GC">
 221       <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
 222       <value type="REFERENCETYPE" field="type" label="Type" />
 223       <value type="ULONG" field="count" label="Total Count" />
 224     </event>
 225 
 226     <struct id="CopyFailed">
 227       <value type="ULONG" field="objectCount" label="Object Count"/>
 228       <value type="BYTES64" field="firstSize" label="First Failed Object Size"/>
 229       <value type="BYTES64" field="smallestSize" label="Smallest Failed Object Size"/>
 230       <value type="BYTES64" field="totalSize" label="Total Object Size"/>
 231     </struct>
 232 
 233     <event id="ObjectCountAfterGC" path="vm/gc/detailed/object_count_after_gc" is_instant="true" label="Object Count after GC">
 234       <value type="UINT" field="gcId"  label="GC ID" relation="GC_ID" />
 235       <value type="CLASS" field="class" label="Class" />
 236       <value type="LONG" field="count" label="Count" />
 237       <value type="BYTES64" field="totalSize" label="Total Size" />
 238     </event>
 239 
 240     <event id="PromotionFailed" path="vm/gc/detailed/promotion_failed" label="Promotion Failed" is_instant="true"
 241            description="Promotion of an object failed">
 242       <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
 243       <structvalue type="CopyFailed" field="data" label="Data"/>
 244       <value type="OSTHREAD" field="thread" label="Running thread"/>
 245     </event>
 246 
 247     <event id="EvacuationFailed" path="vm/gc/detailed/evacuation_failed" label="Evacuation Failed" is_instant="true"
 248            description="Evacuation of an object failed">
 249       <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
 250       <structvalue type="CopyFailed" field="data" label="Data"/>
 251     </event>
 252 
 253     <event id="ConcurrentModeFailure" path="vm/gc/detailed/concurrent_mode_failure" label="Concurrent Mode Failure"
 254            is_instant="true" description="Concurrent Mode failed">
 255       <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
 256     </event>
 257 
 258     <event id="GCPhasePause" path="vm/gc/phases/pause" label="GC Phase Pause">
 259       <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
 260       <value type="UTF8" field="name" label="Name" />
 261     </event>
 262 
 263     <event id="GCPhasePauseLevel1" path="vm/gc/phases/pause_level_1" label="GC Phase Pause Level 1">
 264       <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
 265       <value type="UTF8" field="name" label="Name" />
 266     </event>
 267 
 268     <event id="GCPhasePauseLevel2" path="vm/gc/phases/pause_level_2" label="GC Phase Pause Level 2">
 269       <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
 270       <value type="UTF8" field="name" label="Name" />
 271     </event>
 272 
 273     <event id="GCPhasePauseLevel3" path="vm/gc/phases/pause_level_3" label="GC Phase Pause Level 3">
 274       <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
 275       <value type="UTF8" field="name" label="Name" />
 276     </event>
 277 
 278     <!-- Compiler events -->
 279 
 280     <event id="Compilation" path="vm/compiler/compilation" label="Compilation"
 281          has_thread="true" is_requestable="false" is_constant="false">
 282       <value type="METHOD" field="method" label="Java Method"/>
 283       <value type="UINT" field="compileID" label="Compilation ID" relation="COMP_ID"/>
 284       <value type="USHORT" field="compileLevel" label="Compilation Level"/>
 285       <value type="BOOLEAN" field="succeded" label="Succeeded"/>
 286       <value type="BOOLEAN" field="isOsr" label="On Stack Replacement"/>
 287       <value type="BYTES" field="codeSize" label="Compiled Code Size"/>
 288       <value type="BYTES" field="inlinedBytes" label="Inlined Code Size"/>
 289     </event>
 290 
 291     <event id="CompilerPhase" path="vm/compiler/phase" label="Compiler Phase"
 292             has_thread="true" is_requestable="false" is_constant="false">
 293       <value type="COMPILERPHASETYPE" field="phase" label="Compile Phase"/>
 294       <value type="UINT" field="compileID" label="Compilation ID" relation="COMP_ID"/>
 295       <value type="USHORT" field="phaseLevel" label="Phase Level"/>
 296     </event>
 297 
 298     <event id="CompilerFailure" path="vm/compiler/failure" label="Compilation Failure"
 299             has_thread="true" is_requestable="false" is_constant="false" is_instant="true">
 300       <value type="UTF8" field="failure" label="Message"/>
 301       <value type="UINT" field="compileID" label="Compilation ID" relation="COMP_ID"/>
 302     </event>
 303 
 304     <!-- Code sweeper events -->
 305 
 306     <event id="SweepCodeCache" path="vm/code_sweeper/sweep" label="Sweep Code Cache"
 307        has_thread="true" is_requestable="false" is_constant="false">
 308       <value type="INTEGER" field="sweepIndex" label="Sweep Index" relation="SWEEP_ID"/>
 309       <value type="USHORT" field="sweepFractionIndex" label="Fraction Index"/>
 310       <value type="UINT" field="sweptCount" label="Methods Swept"/>
 311       <value type="UINT" field="flushedCount" label="Methods Flushed"/>
 312       <value type="UINT" field="markedCount" label="Methods Reclaimed"/>
 313       <value type="UINT" field="zombifiedCount" label="Methods Zombified"/>
 314     </event>
 315 
 316     <!-- Code cache events -->
 317 
 318     <event id="CodeCacheFull" path="vm/code_cache/full" label="Code Cache Full"
 319          has_thread="true" is_requestable="false" is_constant="false" is_instant="true">
 320       <value type="ADDRESS" field="startAddress" label="Start Address"/>
 321       <value type="ADDRESS" field="commitedTopAddress" label="Commited Top"/>
 322       <value type="ADDRESS" field="reservedTopAddress" label="Reserved Top"/>
 323       <value type="INTEGER" field="entryCount" label="Entries"/>
 324       <value type="INTEGER" field="methodCount" label="Methods"/>
 325       <value type="INTEGER" field="adaptorCount" label="Adaptors"/>
 326       <value type="BYTES64" field="unallocatedCapacity" label="Unallocated"/>
 327       <value type="INTEGER" field="fullCount" label="Full Count"/>
 328     </event>
 329 
 330     <event id="ExecuteVMOperation" path="vm/runtime/execute_vm_operation" label="VM Operation"
 331         description="Execution of a VM Operation" has_thread="true">
 332       <value type="VMOPERATIONTYPE" field="operation" label="Operation" />
 333       <value type="BOOLEAN" field="safepoint" label="At Safepoint" description="If the operation occured at a safepoint."/>
 334       <value type="BOOLEAN" field="blocking" label="Caller Blocked" description="If the calling thread was blocked until the operation was complete."/>
 335       <value type="OSTHREAD" field="caller" label="Caller" transition="FROM" description="Thread requesting operation. If non-blocking, will be set to 0 indicating thread is unknown."/>
 336     </event>
 337 
 338     <!-- Allocation events -->
 339     <event id="AllocObjectInNewTLAB" path="java/object_alloc_in_new_TLAB" label="Allocation in new TLAB"
 340         description="Allocation in new Thread Local Allocation Buffer" has_thread="true" has_stacktrace="true" is_instant="true">
 341       <value type="CLASS" field="class" label="Class" description="Class of allocated object"/>
 342       <value type="BYTES64" field="allocationSize" label="Allocation Size"/>
 343       <value type="BYTES64" field="tlabSize" label="TLAB Size"/>
 344     </event>
 345 
 346     <event id="AllocObjectOutsideTLAB" path="java/object_alloc_outside_TLAB" label="Allocation outside TLAB"
 347         description="Allocation outside Thread Local Allocation Buffers" has_thread="true" has_stacktrace="true" is_instant="true">
 348       <value type="CLASS" field="class" label="Class" description="Class of allocated object"/>
 349       <value type="BYTES64" field="allocationSize" label="Allocation Size"/>
 350     </event>
 351   </events>
 352 
 353   <xi:include href="../../../closed/share/vm/trace/traceeventtypes.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
 354     <xi:fallback/>
 355   </xi:include>
 356 
 357   <xi:include href="../../../closed/share/vm/trace/traceevents.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
 358     <xi:fallback/>
 359   </xi:include>
 360 </trace>