src/share/vm/trace/tracetypes.xml

changeset 0
f90c822e73f8
child 6876
710a3c8b516e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/share/vm/trace/tracetypes.xml	Wed Apr 27 01:25:04 2016 +0800
     1.3 @@ -0,0 +1,375 @@
     1.4 +<?xml version="1.0" encoding="utf-8"?>
     1.5 +<!--
     1.6 + Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
     1.7 + DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8 +
     1.9 + This code is free software; you can redistribute it and/or modify it
    1.10 + under the terms of the GNU General Public License version 2 only, as
    1.11 + published by the Free Software Foundation.
    1.12 +
    1.13 + This code is distributed in the hope that it will be useful, but WITHOUT
    1.14 + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1.15 + FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    1.16 + version 2 for more details (a copy is included in the LICENSE file that
    1.17 + accompanied this code).
    1.18 +
    1.19 + You should have received a copy of the GNU General Public License version
    1.20 + 2 along with this work; if not, write to the Free Software Foundation,
    1.21 + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1.22 +
    1.23 + Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    1.24 + or visit www.oracle.com if you need additional information or have any
    1.25 + questions.
    1.26 +-->
    1.27 +
    1.28 +<!DOCTYPE types SYSTEM "trace.dtd">
    1.29 +
    1.30 +<!--
    1.31 +
    1.32 +Content types (complex) should create constant pool data
    1.33 +in the recording.
    1.34 +Currently at least, there is _NO_ verification that whatever
    1.35 +writer you have is actually writing correctly. So BE CAREFUL!
    1.36 +
    1.37 +Declared with the 'content_type' tag.
    1.38 +
    1.39 +<type> is the ID type, i.e the integer type that resolves this. Most often
    1.40 +U4 or U8, but for example really small number constants, like GCTYPE uses U1.
    1.41 +
    1.42 +<content-type> is where it gets interesting. 'builtin_type' means we're
    1.43 +defining how we resolve one of the trace built-in types (Class, Thread etc),
    1.44 +jvm_type means defining a new one for our own use.
    1.45 +
    1.46 +Example: (GcMode)
    1.47 +
    1.48 +<content_type id="GCMode" hr_name="GC mode" type="U1" jvm_type="GCMODE">
    1.49 +  <value type="UTF8" field="desc" description="Description"/>
    1.50 +</content_type>
    1.51 +
    1.52 +This creates a content type CONTENT_TYPE_GCMODE
    1.53 +The field type referencing it is u1 (U1), and the constant pool struct has one field, the name.
    1.54 +
    1.55 +Before we can use it we need also define a primary field data type:
    1.56 +
    1.57 +<primary_type symbol="GCMODE" datatype="U1" contenttype="NONE"
    1.58 +              type="u8" sizeop="sizeof(u1)"/>
    1.59 +
    1.60 +Now we can use the content + data type in declaring event fields.
    1.61 + -->
    1.62 +
    1.63 + <types>
    1.64 +  <content_types>
    1.65 +    <content_type id="Thread" hr_name="Thread"
    1.66 +                  type="U4" builtin_type="OSTHREAD">
    1.67 +      <value type="UTF8" field="name" label="Thread name"/>
    1.68 +    </content_type>
    1.69 +
    1.70 +    <content_type id="VMThread" hr_name="VM Thread"
    1.71 +                  type="U8" jvm_type="VMTHREAD">
    1.72 +      <value type="OSTHREAD" field="thread" label="VM Thread"/>
    1.73 +    </content_type>
    1.74 +
    1.75 +    <content_type id="JavaThread" hr_name="Java thread"
    1.76 +                  type="U8" builtin_type="JAVALANGTHREAD">
    1.77 +      <value type="OSTHREAD" field="thread" label="OS Thread ID"/>
    1.78 +      <value type="BYTES64" field="allocInsideTla"
    1.79 +             label="Allocated bytes inside TLAs"/>
    1.80 +      <value type="BYTES64" field="allocOutsideTla"
    1.81 +             label="Allocated bytes outside TLAs"/>
    1.82 +      <value type="THREADGROUP" field="group" label="Java Thread Group"/>
    1.83 +    </content_type>
    1.84 +
    1.85 +    <content_type id="ThreadGroup" hr_name="Thread group"
    1.86 +                  type="U4" jvm_type="THREADGROUP">
    1.87 +      <value type="THREADGROUP" field="parent" label="Parent"/>
    1.88 +      <value type="UTF8" field="name" label="Name"/>
    1.89 +    </content_type>
    1.90 +
    1.91 +    <content_type id="Class" hr_name="Java class"
    1.92 +                  type="U8" builtin_type="CLASS">
    1.93 +      <value type="CLASS" field="loaderClass" label="ClassLoader"/>
    1.94 +      <value type="SYMBOL" field="name" label="Name"/>
    1.95 +      <value type="SHORT" field="modifiers" label="Access modifiers"/>
    1.96 +    </content_type>
    1.97 +
    1.98 +    <content_type id="Method" hr_name="Java method"
    1.99 +                  type="U8" jvm_type="METHOD">
   1.100 +      <value type="CLASS" field="class" label="Class"/>
   1.101 +      <value type="SYMBOL" field="name" label="Name"/>
   1.102 +      <value type="SYMBOL" field="signature" label="Signature"/>
   1.103 +      <value type="SHORT" field="modifiers" label="Access modifiers"/>
   1.104 +    </content_type>
   1.105 +
   1.106 +    <content_type id="UTFConstant" hr_name="UTF constant"
   1.107 +                  type="U8" jvm_type="SYMBOL">
   1.108 +      <value type="UTF8" field="utf8" label="UTF8 data"/>
   1.109 +    </content_type>
   1.110 +
   1.111 +    <content_type id="ThreadState" hr_name="Java Thread State"
   1.112 +                  type="U2" jvm_type="THREADSTATE">
   1.113 +      <value type="UTF8" field="name" label="Name"/>
   1.114 +    </content_type>
   1.115 +
   1.116 +    <content_type id="GCName" hr_name="GC Name"
   1.117 +                  type="U1" jvm_type="GCNAME">
   1.118 +      <value type="UTF8" field="name" label="name" />
   1.119 +    </content_type>
   1.120 +
   1.121 +    <content_type id="GCCause" hr_name="GC Cause"
   1.122 +                  type="U2" jvm_type="GCCAUSE">
   1.123 +      <value type="UTF8" field="cause" label="cause" />
   1.124 +    </content_type>
   1.125 +
   1.126 +    <content_type id="GCWhen" hr_name="GC When"
   1.127 +                  type="U1" jvm_type="GCWHEN">
   1.128 +      <value type="UTF8" field="when" label="when" />
   1.129 +    </content_type>
   1.130 +
   1.131 +    <content_type id="G1YCType" hr_name="G1 YC Type"
   1.132 +                  type="U1" jvm_type="G1YCTYPE">
   1.133 +      <value type="UTF8" field="type" label="type" />
   1.134 +    </content_type>
   1.135 +
   1.136 +    <content_type id="GCThresholdUpdater" hr_name="GC Treshold Updater"
   1.137 +                  type="U1" jvm_type="GCTHRESHOLDUPDATER">
   1.138 +      <value type="UTF8" field="updater" label="updater" />
   1.139 +    </content_type>
   1.140 +
   1.141 +    <content_type id="ReferenceType" hr_name="Reference Type"
   1.142 +                  type="U1" jvm_type="REFERENCETYPE">
   1.143 +      <value type="UTF8" field="type" label="type" />
   1.144 +    </content_type>
   1.145 +
   1.146 +    <content_type id="MetadataType" hr_name="Metadata Type"
   1.147 +                  type="U1" jvm_type="METADATATYPE">
   1.148 +      <value type="UTF8" field="type" label="type" />
   1.149 +    </content_type>
   1.150 +
   1.151 +    <content_type id="MetaspaceObjectType" hr_name="Metaspace Object Type"
   1.152 +                  type="U1" jvm_type="METASPACEOBJTYPE">
   1.153 +      <value type="UTF8" field="type" label="type" />
   1.154 +    </content_type>
   1.155 +
   1.156 +    <content_type id="NARROW_OOP_MODE" hr_name="Narrow Oop Mode"
   1.157 +                  type="U1" jvm_type="NARROWOOPMODE">
   1.158 +      <value type="UTF8" field="mode" label="mode" />
   1.159 +    </content_type>
   1.160 +
   1.161 +    <content_type id="VMOperationType" hr_name="VM Operation Type"
   1.162 +                  type="U2" jvm_type="VMOPERATIONTYPE">
   1.163 +      <value type="UTF8" field="type" label="type" />
   1.164 +    </content_type>
   1.165 +
   1.166 +    <content_type id="CompilerPhaseType" hr_name="Compiler Phase Type"
   1.167 +                  type="U1" jvm_type="COMPILERPHASETYPE">
   1.168 +      <value type="UTF8" field="phase" label="phase" />
   1.169 +    </content_type>
   1.170 +
   1.171 +    <content_type id="FlagValueOrigin" hr_name="Flag Value Origin"
   1.172 +                  type="U1" jvm_type="FLAGVALUEORIGIN">
   1.173 +      <value type="UTF8" field="origin" label="origin" />
   1.174 +    </content_type>
   1.175 +
   1.176 +  </content_types>
   1.177 +
   1.178 +
   1.179 +  <primary_types>
   1.180 +    <!--
   1.181 +      - primary_type takes these attributes:
   1.182 +      -   symbol      INTEGER, LONG etc
   1.183 +      -   datatype    The trace datatype, see enum DataType
   1.184 +      -   contenttype Either resolved content type or the semantic meaning
   1.185 +      -   type        The actual type as used in structures etc
   1.186 +      -   sizeop      A function/macro that can be applied on a single
   1.187 +      -               struct value of type "type" and yield the factual byte
   1.188 +      -               size we need to write.  The % is replaced by the value
   1.189 +      -->
   1.190 +
   1.191 +    <!-- SIGNED 64bit -->
   1.192 +    <primary_type symbol="LONG" datatype="LONG" contenttype="NONE"
   1.193 +                  type="s8" sizeop="sizeof(s8)"/>
   1.194 +
   1.195 +    <!-- UNSIGNED 64bit -->
   1.196 +    <primary_type symbol="ULONG" datatype="U8" contenttype="NONE"
   1.197 +                  type="u8" sizeop="sizeof(u8)"/>
   1.198 +
   1.199 +    <!-- SIGNED 32bit -->
   1.200 +    <primary_type symbol="INTEGER" datatype="INT" contenttype="NONE"
   1.201 +                  type="s4" sizeop="sizeof(s4)"/>
   1.202 +
   1.203 +    <!-- UNSIGNED 32bit -->
   1.204 +    <primary_type symbol="UINT" datatype="U4" contenttype="NONE"
   1.205 +                  type="unsigned" sizeop="sizeof(unsigned)"/>
   1.206 +
   1.207 +    <!-- UNSIGNED 16bit -->
   1.208 +    <primary_type symbol="USHORT" datatype="U2" contenttype="NONE"
   1.209 +                  type="u2" sizeop="sizeof(u2)"/>
   1.210 +
   1.211 +    <!--  SIGNED 16bit -->
   1.212 +    <primary_type symbol="SHORT" datatype="SHORT" contenttype="NONE"
   1.213 +                  type="s2" sizeop="sizeof(s2)"/>
   1.214 +
   1.215 +    <!--  SIGNED 8bit -->
   1.216 +    <primary_type symbol="BYTE" datatype="BYTE" contenttype="NONE"
   1.217 +                  type="s1" sizeop="sizeof(s1)"/>
   1.218 +
   1.219 +    <!--  UNSIGNED 8bit -->
   1.220 +    <primary_type symbol="UBYTE" datatype="U1" contenttype="NONE"
   1.221 +                  type="u1" sizeop="sizeof(u1)"/>
   1.222 +
   1.223 +    <!--  float 32bit -->
   1.224 +    <primary_type symbol="FLOAT" datatype="FLOAT" contenttype="NONE"
   1.225 +                  type="float" sizeop="sizeof(float)"/>
   1.226 +
   1.227 +    <!--  float 64bit -->
   1.228 +    <primary_type symbol="DOUBLE" datatype="DOUBLE" contenttype="NONE"
   1.229 +                  type="double" sizeop="sizeof(double)"/>
   1.230 +
   1.231 +    <!-- boolean type (1-byte) -->
   1.232 +    <primary_type symbol="BOOLEAN" datatype="BOOLEAN" contenttype="NONE"
   1.233 +                  type="bool" sizeop="1"/>
   1.234 +
   1.235 +    <!-- 32-bit unsigned integer, SEMANTIC value BYTES -->
   1.236 +    <primary_type symbol="BYTES" datatype="U4" contenttype="BYTES"
   1.237 +                  type="u4" sizeop="sizeof(u4)"/>
   1.238 +
   1.239 +    <primary_type symbol="IOBYTES" datatype="U4" contenttype="BYTES"
   1.240 +                  type="u4" sizeop="sizeof(u4)"/>
   1.241 +
   1.242 +    <!-- 64-bit unsigned integer, SEMANTIC value BYTES -->
   1.243 +    <primary_type symbol="BYTES64" datatype="U8" contenttype="BYTES"
   1.244 +                  type="u8" sizeop="sizeof(u8)"/>
   1.245 +
   1.246 +    <!-- 64-bit unsigned integer, SEMANTIC value ABSOLUTE MILLISECONDS -->
   1.247 +    <primary_type symbol="EPOCHMILLIS" datatype="LONG" contenttype="EPOCHMILLIS"
   1.248 +                  type="s8" sizeop="sizeof(s8)"/>
   1.249 +
   1.250 +    <!-- 64-bit unsigned integer, SEMANTIC value RELATIVE MILLISECONDS -->
   1.251 +    <primary_type symbol="MILLIS" datatype="LONG" contenttype="MILLIS"
   1.252 +                  type="s8" sizeop="sizeof(s8)"/>
   1.253 +
   1.254 +    <!-- 64-bit unsigned integer, SEMANTIC value RELATIVE NANOSECONDS -->
   1.255 +    <primary_type symbol="NANOS" datatype="LONG" contenttype="NANOS"
   1.256 +                  type="s8" sizeop="sizeof(s8)"/>
   1.257 +
   1.258 +    <!-- 64-bit signed integer, SEMANTIC value TICKS -->
   1.259 +    <primary_type symbol="TICKS" datatype="LONG" contenttype="TICKS"
   1.260 +                  type="Ticks" sizeop="sizeof(s8)"/>
   1.261 +
   1.262 +    <!-- 64-bit signed integer, SEMANTIC value TICKS duration -->
   1.263 +    <primary_type symbol="TICKSPAN" datatype="LONG" contenttype="TICKS"
   1.264 +                  type="Tickspan" sizeop="sizeof(s8)"/>
   1.265 +
   1.266 +    <!-- 64-bit unsigned integer, SEMANTIC value ADDRESS (mem loc) -->
   1.267 +    <primary_type symbol="ADDRESS" datatype="U8" contenttype="ADDRESS"
   1.268 +                  type="u8" sizeop="sizeof(u8)"/>
   1.269 +
   1.270 +    <!-- 32-bit float, SEMANTIC value PERCENTAGE (0.0-1.0) -->
   1.271 +    <primary_type symbol="PERCENT" datatype="FLOAT" contenttype="PERCENTAGE"
   1.272 +                  type="float" sizeop="sizeof(float)"/>
   1.273 +
   1.274 +    <!-- UTF-encoded string, max length 64k -->
   1.275 +    <primary_type symbol="UTF8" datatype="UTF8" contenttype="NONE"
   1.276 +                  type="const char *" sizeop="sizeof_utf(%)"/>
   1.277 +
   1.278 +    <!-- UTF-16 encoded (Unicode) string, max length maxjuint -->
   1.279 +    <primary_type symbol="STRING" datatype="STRING" contenttype="NONE"
   1.280 +                  type="TraceUnicodeString*" sizeop="sizeof_unicode(%)"/>
   1.281 +
   1.282 +    <!-- Symbol* constant. Note that this may currently ONLY be used by
   1.283 +          classes, methods fields.  This restriction might be lifted. -->
   1.284 +    <primary_type symbol="SYMBOL" datatype="U8" contenttype="SYMBOL"
   1.285 +                  type="Symbol *" sizeop="sizeof(u8)"/>
   1.286 +
   1.287 +    <!-- A Klass *. The actual class is marked as "used" and will
   1.288 +         eventually be written into the recording constant pool -->
   1.289 +    <primary_type symbol="CLASS" datatype="U8" contenttype="CLASS"
   1.290 +                  type="Klass *" sizeop="sizeof(u8)"/>
   1.291 +
   1.292 +    <!-- A Method *. The method is marked as "used" and will eventually be
   1.293 +         written into the recording constant pool. -->
   1.294 +    <primary_type symbol="METHOD" datatype="U8" contenttype="METHOD"
   1.295 +                  type="Method *" sizeop="sizeof(u8)"/>
   1.296 +
   1.297 +    <!--  The type for stacktraces in the recording. Shoudl not be used by
   1.298 +          events explicitly -->
   1.299 +    <primary_type symbol="STACKTRACE" datatype="U8" contenttype="STACKTRACE"
   1.300 +                  type="u8" sizeop="sizeof(u8)"/>
   1.301 +
   1.302 +    <!-- OS Thread ID -->
   1.303 +    <primary_type symbol="OSTHREAD" datatype="U4" contenttype="OSTHREAD"
   1.304 +                  type="u4" sizeop="sizeof(u4)"/>
   1.305 +
   1.306 +    <!-- VM Thread ID Note: changed from U2 to U8 for hotspot -->
   1.307 +    <primary_type symbol="VMTHREAD" datatype="U8" contenttype="VMTHREAD"
   1.308 +                  type="u8"  sizeop="sizeof(u8)"/>
   1.309 +
   1.310 +    <!-- Java Thread ID -->
   1.311 +    <primary_type symbol="JAVALANGTHREAD" datatype="LONG"
   1.312 +                  contenttype="JAVALANGTHREAD" type="s8"
   1.313 +                  sizeop="sizeof(s8)"/>
   1.314 +
   1.315 +    <!-- Threadgroup THIS TYPE MAY NOT BE USED IN NORMAL EVENTS (ATM). Only
   1.316 +          for thread constant pool // KK TODO: u8 should be ObjectP -->
   1.317 +    <primary_type symbol="THREADGROUP" datatype="U4" contenttype="THREADGROUP"
   1.318 +                  type="u8"
   1.319 +                  sizeop="sizeof(u4)"/>
   1.320 +
   1.321 +    <!-- FRAMETYPE enum -->
   1.322 +    <primary_type symbol="FRAMETYPE" datatype="U1" contenttype="FRAMETYPE"
   1.323 +                  type="u1" sizeop="sizeof(u1)"/>
   1.324 +
   1.325 +    <!-- THREADSTATE enum -->
   1.326 +    <primary_type symbol="THREADSTATE" datatype="U2" contenttype="THREADSTATE"
   1.327 +                  type="u2" sizeop="sizeof(u2)"/>
   1.328 +
   1.329 +    <!-- GCName -->
   1.330 +    <primary_type symbol="GCNAME" datatype="U1" contenttype="GCNAME"
   1.331 +                  type="u1" sizeop="sizeof(u1)" />
   1.332 +
   1.333 +    <!-- GCCAUSE -->
   1.334 +    <primary_type symbol="GCCAUSE" datatype="U2" contenttype="GCCAUSE"
   1.335 +                  type="u2" sizeop="sizeof(u2)" />
   1.336 +
   1.337 +    <!-- GCWHEN -->
   1.338 +    <primary_type symbol="GCWHEN" datatype="U1" contenttype="GCWHEN"
   1.339 +                  type="u1" sizeop="sizeof(u1)" />
   1.340 +
   1.341 +    <!-- G1YCType -->
   1.342 +    <primary_type symbol="G1YCTYPE" datatype="U1" contenttype="G1YCTYPE"
   1.343 +                  type="u1" sizeop="sizeof(u1)" />
   1.344 +
   1.345 +    <!-- GCTHRESHOLDUPDATER -->
   1.346 +    <primary_type symbol="GCTHRESHOLDUPDATER" datatype="U1" contenttype="GCTHRESHOLDUPDATER"
   1.347 +                  type="u1" sizeop="sizeof(u1)" />
   1.348 +
   1.349 +    <!-- REFERENCETYPE -->
   1.350 +    <primary_type symbol="REFERENCETYPE" datatype="U1"
   1.351 +                  contenttype="REFERENCETYPE" type="u1" sizeop="sizeof(u1)" />
   1.352 +
   1.353 +    <!-- METADATATYPE -->
   1.354 +    <primary_type symbol="METADATATYPE" datatype="U1"
   1.355 +                  contenttype="METADATATYPE" type="u1" sizeop="sizeof(u1)" />
   1.356 +
   1.357 +    <!-- METADATAOBJTYPE -->
   1.358 +    <primary_type symbol="METASPACEOBJTYPE" datatype="U1"
   1.359 +                  contenttype="METASPACEOBJTYPE" type="u1" sizeop="sizeof(u1)" />
   1.360 +
   1.361 +    <!-- NARROWOOPMODE -->
   1.362 +    <primary_type symbol="NARROWOOPMODE" datatype="U1"
   1.363 +                  contenttype="NARROWOOPMODE" type="u1" sizeop="sizeof(u1)" />
   1.364 +
   1.365 +    <!-- COMPILERPHASETYPE -->
   1.366 +    <primary_type symbol="COMPILERPHASETYPE" datatype="U1"
   1.367 +                  contenttype="COMPILERPHASETYPE" type="u1" sizeop="sizeof(u1)" />
   1.368 +
   1.369 +    <!-- VMOPERATIONTYPE -->
   1.370 +    <primary_type symbol="VMOPERATIONTYPE" datatype="U2" contenttype="VMOPERATIONTYPE"
   1.371 +                  type="u2" sizeop="sizeof(u2)" />
   1.372 +                  
   1.373 +    <!-- FLAGVALUEORIGIN -->
   1.374 +    <primary_type symbol="FLAGVALUEORIGIN" datatype="U1"
   1.375 +                  contenttype="FLAGVALUEORIGIN" type="u1" sizeop="sizeof(u1)" />
   1.376 +
   1.377 +  </primary_types>
   1.378 +</types>

mercurial