1 <?xml version="1.0" encoding="utf-8"?>
   2 <!--
   3  Copyright (c) 2012, 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_decls>
  40 
  41 <!--
  42 
  43 Events in the JVM are by default timed (it's more common)
  44 Perhaps a little strange. Might change.
  45 
  46 EVENTS
  47 
  48 Declard with the 'event' tag.
  49 
  50 <value fields> can be one or more of
  51    value            - a simple primitive or constant type value
  52    structvalue      - value is a sub-struct. This type must be previously defined
  53                       with 'struct'
  54 All these require you to declare type, field and label of the field. They also accept
  55 an optional description of the field. If the meaning of the field is not obvious
  56 from the label you should provide a description. If an event however is not actually
  57 meant for end-users, you should probably _not_ write descriptions at all, since you
  58 might just add more concepts the user has no notion of/interest in.
  59 
  60 Events should be modeled after what conceptual process you are expressing, _NOT_
  61 from whatever data structures you might use inside the JVM for expressing a process.
  62 
  63 
  64 STRUCT
  65 
  66 Declared with the 'struct' tag.
  67 
  68 Declares a structure type that can be used in other events.
  69 
  70 -->
  71 
  72   <events>
  73     <event id="ThreadStart" path="java/thread_start" label="Java Thread Start"
  74            has_thread="true" is_instant="true">
  75       <value type="JAVALANGTHREAD" field="javalangthread" label="Java Thread"/>
  76     </event>
  77 
  78     <event id="ThreadEnd" path="java/thread_end" label="Java Thread End"
  79            has_thread="true" is_instant="true">
  80       <value type="JAVALANGTHREAD" field="javalangthread" label="Java Thread"/>
  81     </event>
  82 
  83     <event id="ThreadSleep" path="java/thread_sleep" label="Java Thread Sleep"
  84             has_thread="true" has_stacktrace="true" is_instant="false">
  85       <value type="MILLIS" field="time" label="Sleep Time"/>
  86     </event>
  87 
  88     <event id="ThreadPark" path="java/thread_park" label="Java Thread Park"
  89             has_thread="true" has_stacktrace="true" is_instant="false">
  90       <value type="CLASS" field="klass" label="Class Parked On"/>
  91       <value type="MILLIS" field="timeout" label="Park Timeout"/>
  92       <value type="ADDRESS" field="address" label="Address of Object Parked"/>
  93     </event>
  94 
  95     <event id="JavaMonitorEnter" path="java/monitor_enter" label="Java Monitor Blocked"
  96             has_thread="true" has_stacktrace="true" is_instant="false">
  97       <value type="CLASS" field="klass" label="Monitor Class"/>
  98       <value type="JAVALANGTHREAD" field="previousOwner" label="Previous Monitor Owner"/>
  99       <value type="ADDRESS" field="address" label="Monitor Address"/>
 100     </event>
 101     
 102     <event id="JavaMonitorWait" path="java/monitor_wait" label="Java Monitor Wait" description="Waiting on a Java monitor"
 103             has_thread="true" has_stacktrace="true" is_instant="false">
 104       <value type="CLASS" field="klass" label="Monitor Class" description="Class of object waited on"/>
 105       <value type="OSTHREAD" field="notifier" label="Notifier Thread" description="Notifying Thread"/>
 106       <value type="MILLIS" field="timeout" label="Timeout" description="Maximum wait time"/>
 107       <value type="BOOLEAN" field="timedOut" label="Timed Out" description="Wait has been timed out"/>
 108       <value type="ADDRESS" field="address" label="Monitor Address" description="Address of object waited on"/>
 109     </event>
 110 
 111     <struct id="VirtualSpace">
 112       <value type="ADDRESS" field="start" label="Start Address" description="Start address of the virtual space" />
 113       <value type="ADDRESS" field="committedEnd" label="Committed End Address" description="End address of the committed memory for the virtual space" />
 114       <value type="BYTES64" field="committedSize" label="Committed Size" description="Size of the committed memory for the virtual space" />
 115       <value type="ADDRESS" field="reservedEnd" label="Reserved End Address" description="End address of the reserved memory for the virtual space" />
 116       <value type="BYTES64" field="reservedSize" label="Reserved Size" description="Size of the reserved memory for the virtual space" />
 117     </struct>
 118 
 119     <struct id="ObjectSpace">
 120       <value type="ADDRESS" field="start" label="Start Address" description="Start address of the space" />
 121       <value type="ADDRESS" field="end" label="End Address" description="End address of the space" />
 122       <value type="BYTES64" field="used" label="Used" description="Bytes allocated by objects in the space" />
 123       <value type="BYTES64" field="size" label="Size" description="Size of the space" />
 124     </struct>
 125 
 126     <event id="GCHeapSummary" path="vm/gc/heap/summary" label="Heap Summary" is_instant="true">
 127       <value type="ULONG" field="gcId" label="GC ID" relation="GC_ID"/>
 128       <value type="GCWHEN" field="when" label="When" />
 129       <structvalue type="VirtualSpace" field="heapSpace" label="Heap Space"/>
 130       <value type="BYTES64" field="heapUsed" label="Heap Used" description="Bytes allocated by objects in the heap"/>
 131     </event>
 132 
 133     <event id="PermGenSummary" path="vm/gc/heap/perm_gen_summary" label="Perm Gen Summary" is_instant="true">
 134       <value type="ULONG" field="gcId" label="GC ID" relation="GC_ID"/>
 135       <value type="GCWHEN" field="when" label="When" />
 136       <structvalue type="VirtualSpace" field="permSpace" label="PermGen Space"/>
 137       <structvalue type="ObjectSpace" field="objectSpace" label="Object Space"/>
 138     </event>
 139 
 140     <event id="PSHeapSummary" path="vm/gc/heap/ps_summary" label="ParallelScavengeHeap Summary" is_instant="true">
 141       <value type="ULONG" field="gcId" label="GC ID" relation="GC_ID"/>
 142       <value type="GCWHEN" field="when" label="When" />
 143 
 144       <structvalue type="VirtualSpace" field="oldSpace" label="Old Space"/>
 145       <structvalue type="ObjectSpace" field="oldObjectSpace" label="Old Object Space"/>
 146 
 147       <structvalue type="VirtualSpace" field="youngSpace" label="Young Space"/>
 148       <structvalue type="ObjectSpace" field="edenSpace" label="Eden Space"/>
 149       <structvalue type="ObjectSpace" field="fromSpace" label="From Space"/>
 150       <structvalue type="ObjectSpace" field="toSpace" label="To Space"/>
 151     </event>
 152 
 153     <event id="GCGarbageCollection" path="vm/gc/collector/garbage_collection" label="Garbage Collection"
 154            description="Garbage collection performed by the JVM">
 155       <value type="ULONG" field="gcId"  label="GC ID" relation="GC_ID" />
 156       <value type="GCNAME" field="name" label="Name" description="The name of the Garbage Collector" />
 157       <value type="GCCAUSE" field="cause" label="Cause" description="The reason for triggering this Garbage Collection" />
 158       <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" />
 159       <value type="RELATIVE_TICKS" field="longestPause" label="Longest Pause" description="Longest individual pause during the garbage collection" />
 160     </event>
 161 
 162     <event id="GCParallelOld" path="vm/gc/collector/parold_garbage_collection" label="Parallel Old Garbage Collection"
 163            description="Extra information specific to Parallel Old Garbage Collections">
 164       <value type="ULONG" field="gcId"  label="GC ID" relation="GC_ID" />
 165       <value type="ADDRESS" field="densePrefix" label="Dense Prefix" description="The address of the dense prefix, used when compacting" />
 166     </event>
 167 
 168     <event id="GCYoungGarbageCollection" path="vm/gc/collector/young_garbage_collection" label="Young Garbage Collection"
 169            description="Extra information specific to Young Garbage Collections">
 170       <value type="ULONG" field="gcId"  label="GC ID" relation="GC_ID" />
 171       <!-- This information can also be found by looking for PromotionFailed events. It's here for convenience. -->
 172       <value type="BOOLEAN" field="promotionFailed" label="Promotion Failed" description="Tells if we failed to promote some objects to the old gen" />
 173     </event>
 174 
 175     <event id="GCOldGarbageCollection" path="vm/gc/collector/old_garbage_collection" label="Old Garbage Collection"
 176            description="Extra information specific to Old Garbage Collections">
 177       <value type="ULONG" field="gcId" label="GC ID" relation="GC_ID"/>
 178     </event>
 179 
 180     <event id="GCG1GarbageCollection" path="vm/gc/collector/g1_garbage_collection" label="G1 Garbage Collection"
 181            description="Extra information specific to G1 Garbage Collections">
 182       <value type="ULONG" field="gcId" label="GC ID" relation="GC_ID"/>
 183       <value type="G1YCTYPE" field="type" label="Type" />
 184     </event>
 185 
 186     <event id="GCReferenceProcessing" path="vm/gc/reference/statistics"
 187            label="GC Reference Processing" is_instant="true"
 188            description="Total count of processed references during GC">
 189       <value type="ULONG" field="gcId" label="GC ID" relation="GC_ID"/>
 190       <value type="REFERENCETYPE" field="type" label="Type" />
 191       <value type="ULONG" field="count" label="Total Count" />
 192     </event>
 193 
 194     <event id="ClassCountAfterGC" path="vm/gc/detailed/class_count_after_gc" is_instant="true" label="Class Count">
 195       <value type="ULONG" field="gcId" label="GC ID" relation="GC_ID" />
 196       <value type="UTF8" field="class" label="Class" />
 197       <value type="LONG" field="count" label="Count" />
 198       <value type="BYTES64" field="totalSize" label="Total Size" />
 199     </event>
 200 
 201     <event id="PromotionFailed" path="vm/gc/detailed/promotion_failed" label="Promotion Failed" is_instant="true"
 202            description="Promotion of an object failed">
 203       <value type="ULONG" field="gcId" label="GC ID" relation="GC_ID"/>
 204       <value type="BYTES64" field="objectCount" label="Object Count"/>
 205       <value type="BYTES64" field="totalSize" label="Total Object Size"/>
 206     </event>
 207 
 208     <event id="GCPhasePause" path="vm/gc/phases/pause" label="GC Phase Pause">
 209       <value type="ULONG" field="gcId" label="GC ID" relation="GC_ID"/>
 210       <value type="UTF8" field="name" label="Name" />
 211     </event>
 212     
 213     <event id="GCPhasePauseLevel1" path="vm/gc/phases/pause_level_1" label="GC Phase Pause Level 1">
 214       <value type="ULONG" field="gcId" label="GC ID" relation="GC_ID"/>
 215       <value type="UTF8" field="name" label="Name" />
 216     </event>
 217     
 218     <event id="GCPhasePauseLevel2" path="vm/gc/phases/pause_level_2" label="GC Phase Pause Level 2">
 219       <value type="ULONG" field="gcId" label="GC ID" relation="GC_ID"/>
 220       <value type="UTF8" field="name" label="Name" />
 221     </event>
 222     
 223     <event id="GCPhasePauseLevel3" path="vm/gc/phases/pause_level_3" label="GC Phase Pause Level 3">
 224       <value type="ULONG" field="gcId" label="GC ID" relation="GC_ID"/>
 225       <value type="UTF8" field="name" label="Name" />
 226     </event>
 227     
 228     <!-- Compiler events -->
 229     
 230     <event id="Compilation" path="vm/compiler/compilation" label="Compilation"
 231          has_thread="true" is_requestable="false" is_constant="false">
 232       <value type="METHOD" field="method" label="Java Method"/>
 233       <value type="INTEGER" field="compileID" label="Compilation ID" relation="COMP_ID"/>
 234       <value type="USHORT" field="compileLevel" label="Compilation Level"/>
 235       <value type="BOOLEAN" field="succeded" label="Succeeded"/>
 236       <value type="BOOLEAN" field="isOsr" label="On Stack Replacement"/>
 237       <value type="BYTES" field="codeSize" label="Compiled Code Size"/>
 238       <value type="BYTES" field="inlinedBytes" label="Inlined Code Size"/>
 239     </event>
 240     
 241     <event id="CompilerPhase" path="vm/compiler/phase" label="Compiler Phase"
 242             has_thread="true" is_requestable="false" is_constant="false">
 243       <value type="COMPILERPHASETYPE" field="phase" label="Compile Phase"/>
 244       <value type="INTEGER" field="compileID" label="Compilation ID" relation="COMP_ID"/>
 245       <value type="USHORT" field="phaseLevel" label="Phase Level"/>
 246     </event>
 247     
 248     <event id="CompilerFailure" path="vm/compiler/failure" label="Compilation Failure"
 249             has_thread="true" is_requestable="false" is_constant="false" is_instant="true">
 250       <value type="UTF8" field="failure" label="Message"/>
 251       <value type="INTEGER" field="compileID" label="Compilation ID" relation="COMP_ID"/>
 252     </event>
 253 
 254     <!-- Code sweeper events -->
 255     
 256     <event id="SweepCodeCache" path="vm/code_sweeper/sweep" label="Sweep Code Cache"
 257        has_thread="true" is_requestable="false" is_constant="false">
 258       <value type="INTEGER" field="sweepIndex" label="Sweep Index" relation="SWEEP_ID"/>
 259       <value type="USHORT" field="sweepFractionIndex" label="Fraction Index"/>
 260       <value type="UINT" field="sweptCount" label="Methods Swept"/>
 261       <value type="UINT" field="flushedCount" label="Methods Flushed"/>
 262       <value type="UINT" field="markedCount" label="Methods Reclaim"/>
 263       <value type="UINT" field="zombifiedCount" label="Methods Zombified"/>
 264     </event>
 265     
 266     <event id="CleanCodeCache" path="vm/code_sweeper/clean" label="Clean Code Cache"
 267              description="Clean code cache from oldest methods"
 268              has_thread="true" is_requestable="false" is_constant="false">
 269       <value type="UINT" field="disconnectedCount" label="Methods Disconnected"/>
 270       <value type="UINT" field="madeNonEntrantCount" label="Methods Made Non-Entrant"/>
 271     </event>
 272 
 273     <!-- Code cache events -->
 274     
 275     <event id="CodeCacheFull" path="vm/code_cache/full" label="Code Cache Full"
 276          has_thread="true" is_requestable="false" is_constant="false" is_instant="true">
 277       <value type="ADDRESS" field="startAddress" label="Start Address"/>
 278       <value type="ADDRESS" field="commitedTopAddress" label="Commited Top"/>
 279       <value type="ADDRESS" field="reservedTopAddress" label="Reserved Top"/>
 280       <value type="INTEGER" field="entryCount" label="Entries"/>
 281       <value type="INTEGER" field="methodCount" label="Methods"/>
 282       <value type="INTEGER" field="adaptorCount" label="Adaptors"/>
 283       <value type="BYTES64" field="unallocatedCapacity" label="Unallocated"/>
 284       <value type="BYTES64" field="largestFreeBlock" label="Largest Free Block"/>
 285       <value type="INTEGER" field="fullCount" label="Full Count"/>
 286     </event>
 287 
 288     <event id="ExecuteVMOperation" path="vm/runtime/execute_vm_operation" label="VM Operation"
 289         description="Execution of a VM Operation" has_thread="true">
 290       <value type="VMOPERATIONTYPE" field="operation" label="Operation" />
 291       <value type="BOOLEAN" field="safepoint" label="At Safepoint" description="If the operation occured at a safepoint."/>
 292       <value type="BOOLEAN" field="blocking" label="Caller Blocked" description="If the calling thread was blocked until the operation was complete."/>
 293       <value type="OSTHREAD" field="caller" label="Caller" transition="TO" description="Thread requesting operation. If non-blocking, will be set to 0 indicating thread is unknown."/>
 294     </event>
 295 
 296   </events>
 297   
 298   <xi:include href="../../../closed/share/vm/trace/traceeventtypes.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
 299     <xi:fallback/>
 300   </xi:include>
 301 
 302   <xi:include href="../../../closed/share/vm/trace/traceevents.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
 303     <xi:fallback/>
 304   </xi:include>
 305 </trace>