| <?xml version="1.0" encoding="utf-8"?> |
| <!-- |
| Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. |
| DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
| |
| This code is free software; you can redistribute it and/or modify it |
| under the terms of the GNU General Public License version 2 only, as |
| published by the Free Software Foundation. |
| |
| This code is distributed in the hope that it will be useful, but WITHOUT |
| ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| version 2 for more details (a copy is included in the LICENSE file that |
| accompanied this code). |
| |
| You should have received a copy of the GNU General Public License version |
| 2 along with this work; if not, write to the Free Software Foundation, |
| Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
| |
| Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
| or visit www.oracle.com if you need additional information or have any |
| questions. |
| --> |
| |
| <!DOCTYPE types SYSTEM "trace.dtd"> |
| |
| <!-- |
| |
| Content types (complex) should create constant pool data |
| in the recording. |
| Currently at least, there is _NO_ verification that whatever |
| writer you have is actually writing correctly. So BE CAREFUL! |
| |
| Declared with the 'content_type' tag. |
| |
| <type> is the ID type, i.e the integer type that resolves this. Most often |
| U4 or U8, but for example really small number constants, like GCTYPE uses U1. |
| |
| <content-type> is where it gets interesting. 'builtin_type' means we're |
| defining how we resolve one of the trace built-in types (Class, Thread etc), |
| jvm_type means defining a new one for our own use. |
| |
| Example: (GcMode) |
| |
| <content_type id="GCMode" hr_name="GC mode" type="U1" jvm_type="GCMODE"> |
| <value type="STRING" field="desc" description="Description"/> |
| </content_type> |
| |
| This creates a content type CONTENT_TYPE_GCMODE |
| The field type referencing it is u1 (U1), and the constant pool struct has one field, the name. |
| |
| Before we can use it we need also define a primary field data type: |
| |
| <primary_type symbol="GCMODE" datatype="U1" contenttype="NONE" |
| type="u8" sizeop="sizeof(u1)"/> |
| |
| Now we can use the content + data type in declaring event fields. |
| --> |
| |
| <types> |
| <content_types> |
| <content_type id="Thread" hr_name="Thread" |
| type="U8" builtin_type="THREAD"> |
| <value type="STRING" field="osName" label="OS Thread Name"/> |
| <value type="LONG" field="osThreadId" label="OS Thread Id"/> |
| <value type="STRING" field="javaName" label="Java Thread Name"/> |
| <value type="LONG" field="javaThreadId" label="Java Thread Id"/> |
| <value type="THREADGROUP" field="group" label="Java Thread Group"/> |
| </content_type> |
| |
| <content_type id="ThreadGroup" hr_name="Thread Group" |
| type="U8" jvm_type="THREADGROUP"> |
| <value type="THREADGROUP" field="parent" label="Parent"/> |
| <value type="STRING" field="name" label="Name"/> |
| </content_type> |
| |
| <content_type id="Class" hr_name="Java Class" |
| type="U8" builtin_type="CLASS"> |
| <value type="CLASSLOADER" field="classLoader" label="Class Loader"/> |
| <value type="SYMBOL" field="name" label="Name"/> |
| <value type="PACKAGE" field="package" label="Package"/> |
| <value type="INTEGER" field="modifiers" label="Access Modifiers"/> |
| </content_type> |
| |
| <content_type id="ClassLoader" hr_name="Java Class Loader" |
| type="U8" jvm_type="CLASSLOADER"> |
| <value type="CLASS" field="type" label="Type"/> |
| <value type="SYMBOL" field="name" label="Name"/> |
| </content_type> |
| |
| <content_type id="Method" hr_name="Java Method" |
| type="U8" jvm_type="METHOD"> |
| <value type="CLASS" field="type" label="Type"/> |
| <value type="SYMBOL" field="name" label="Name"/> |
| <value type="SYMBOL" field="descriptor" label="Descriptor"/> |
| <value type="INTEGER" field="modifiers" label="Access Modifiers"/> |
| <value type="BOOLEAN" field="hidden" label="Hidden"/> |
| </content_type> |
| |
| <content_type id="Symbol" hr_name="Symbol" |
| type="U8" jvm_type="SYMBOL"> |
| <value type="STRING" field="string" label="String"/> |
| </content_type> |
| |
| <content_type id="ThreadState" hr_name="Java Thread State" |
| type="U8" jvm_type="THREADSTATE"> |
| <value type="STRING" field="name" label="Name"/> |
| </content_type> |
| |
| <content_type id="GCName" hr_name="GC Name" |
| type="U8" jvm_type="GCNAME"> |
| <value type="STRING" field="name" label="Name" /> |
| </content_type> |
| |
| <content_type id="GCCause" hr_name="GC Cause" |
| type="U8" jvm_type="GCCAUSE"> |
| <value type="STRING" field="cause" label="Cause" /> |
| </content_type> |
| |
| <content_type id="GCWhen" hr_name="GC When" |
| type="U8" jvm_type="GCWHEN"> |
| <value type="STRING" field="when" label="When" /> |
| </content_type> |
| |
| <content_type id="G1HeapRegionType" hr_name="G1 Heap Region Type" |
| type="U8" jvm_type="G1HEAPREGIONTYPE"> |
| <value type="STRING" field="type" label="Type" /> |
| </content_type> |
| |
| <content_type id="G1YCType" hr_name="G1 YC Type" |
| type="U8" jvm_type="G1YCTYPE"> |
| <value type="STRING" field="type" label="Type" /> |
| </content_type> |
| |
| <content_type id="GCThresholdUpdater" hr_name="GC Threshold Updater" |
| type="U8" jvm_type="GCTHRESHOLDUPDATER"> |
| <value type="STRING" field="updater" label="Updater" /> |
| </content_type> |
| |
| <content_type id="ReferenceType" hr_name="Reference Type" |
| type="U8" jvm_type="REFERENCETYPE"> |
| <value type="STRING" field="type" label="Type" /> |
| </content_type> |
| |
| <content_type id="MetadataType" hr_name="Metadata Type" |
| type="U8" jvm_type="METADATATYPE"> |
| <value type="STRING" field="type" label="Type" /> |
| </content_type> |
| |
| <content_type id="MetaspaceObjectType" hr_name="Metaspace Object Type" |
| type="U8" jvm_type="METASPACEOBJTYPE"> |
| <value type="STRING" field="type" label="Type" /> |
| </content_type> |
| |
| <content_type id="NarrowOopMode" hr_name="Narrow Oop Mode" |
| type="U8" jvm_type="NARROWOOPMODE"> |
| <value type="STRING" field="mode" label="Mode" /> |
| </content_type> |
| |
| <content_type id="VMOperationType" hr_name="VM Operation Type" |
| type="U8" jvm_type="VMOPERATIONTYPE"> |
| <value type="STRING" field="type" label="Type" /> |
| </content_type> |
| |
| <content_type id="CompilerPhaseType" hr_name="Compiler Phase Type" |
| type="U8" jvm_type="COMPILERPHASETYPE"> |
| <value type="STRING" field="phase" label="Phase" /> |
| </content_type> |
| |
| <content_type id="FlagValueOrigin" hr_name="Flag Value Origin" |
| type="U8" jvm_type="FLAGVALUEORIGIN"> |
| <value type="STRING" field="origin" label="Origin" /> |
| </content_type> |
| |
| <content_type id="CodeBlobType" hr_name="Code Blob Type" |
| type="U8" jvm_type="CODEBLOBTYPE"> |
| <value type="STRING" field="type" label="Type" /> |
| </content_type> |
| |
| <content_type id="InflateCause" hr_name="Inflation Cause" |
| type="U8" jvm_type="INFLATECAUSE"> |
| <value type="STRING" field="cause" label="Cause" /> |
| </content_type> |
| |
| <content_type id="Module" hr_name="Module" |
| type="U8" jvm_type="MODULE"> |
| <value type="SYMBOL" field="name" label="Name"/> |
| <value type="SYMBOL" field="version" label="Version"/> |
| <value type="SYMBOL" field="location" label="Location"/> |
| <value type="CLASSLOADER" field="classLoader" label="Class Loader"/> |
| </content_type> |
| |
| <content_type id="Package" hr_name="Package" |
| type="U8" jvm_type="PACKAGE"> |
| <value type="SYMBOL" field="name" label="Name"/> |
| <value type="MODULE" field="module" label="Module"/> |
| <value type="BOOLEAN" field="exported" label="Exported"/> |
| </content_type> |
| </content_types> |
| |
| |
| <primary_types> |
| <!-- |
| - primary_type takes these attributes: |
| - symbol INTEGER, LONG etc |
| - datatype The trace datatype, see enum DataType |
| - contenttype Either resolved content type or the semantic meaning |
| - type The actual type as used in structures etc |
| - sizeop A function/macro that can be applied on a single |
| - struct value of type "type" and yield the factual byte |
| - size we need to write. The % is replaced by the value |
| --> |
| |
| <!-- SIGNED 64bit --> |
| <primary_type symbol="LONG" datatype="LONG" contenttype="NONE" |
| type="s8" sizeop="sizeof(s8)"/> |
| |
| <!-- UNSIGNED 64bit --> |
| <primary_type symbol="ULONG" datatype="U8" contenttype="NONE" |
| type="u8" sizeop="sizeof(u8)"/> |
| |
| <!-- SIGNED 32bit --> |
| <primary_type symbol="INTEGER" datatype="INT" contenttype="NONE" |
| type="s4" sizeop="sizeof(s4)"/> |
| |
| <!-- UNSIGNED 32bit --> |
| <primary_type symbol="UINT" datatype="U4" contenttype="NONE" |
| type="unsigned" sizeop="sizeof(unsigned)"/> |
| |
| <!-- UNSIGNED 16bit --> |
| <primary_type symbol="USHORT" datatype="U2" contenttype="NONE" |
| type="u2" sizeop="sizeof(u2)"/> |
| |
| <!-- SIGNED 16bit --> |
| <primary_type symbol="SHORT" datatype="SHORT" contenttype="NONE" |
| type="s2" sizeop="sizeof(s2)"/> |
| |
| <!-- SIGNED 8bit --> |
| <primary_type symbol="BYTE" datatype="BYTE" contenttype="NONE" |
| type="s1" sizeop="sizeof(s1)"/> |
| |
| <!-- UNSIGNED 8bit --> |
| <primary_type symbol="UBYTE" datatype="U1" contenttype="NONE" |
| type="u1" sizeop="sizeof(u1)"/> |
| |
| <!-- float 32bit --> |
| <primary_type symbol="FLOAT" datatype="FLOAT" contenttype="NONE" |
| type="float" sizeop="sizeof(float)"/> |
| |
| <!-- float 64bit --> |
| <primary_type symbol="DOUBLE" datatype="DOUBLE" contenttype="NONE" |
| type="double" sizeop="sizeof(double)"/> |
| |
| <!-- boolean type (1-byte) --> |
| <primary_type symbol="BOOLEAN" datatype="BOOLEAN" contenttype="NONE" |
| type="bool" sizeop="1"/> |
| |
| <!-- 32-bit unsigned integer, SEMANTIC value BYTES --> |
| <primary_type symbol="BYTES" datatype="U8" contenttype="BYTES" |
| type="u8" sizeop="sizeof(u8)"/> |
| |
| <primary_type symbol="IOBYTES" datatype="U8" contenttype="BYTES" |
| type="u8" sizeop="sizeof(u8)"/> |
| |
| <!-- 64-bit unsigned integer, SEMANTIC value BYTES --> |
| <primary_type symbol="BYTES64" datatype="U8" contenttype="BYTES" |
| type="u8" sizeop="sizeof(u8)"/> |
| |
| <!-- 64-bit unsigned integer, SEMANTIC value ABSOLUTE MILLISECONDS --> |
| <primary_type symbol="EPOCHMILLIS" datatype="LONG" contenttype="EPOCHMILLIS" |
| type="s8" sizeop="sizeof(s8)"/> |
| |
| <!-- 64-bit unsigned integer, SEMANTIC value RELATIVE MILLISECONDS --> |
| <primary_type symbol="MILLIS" datatype="LONG" contenttype="MILLIS" |
| type="s8" sizeop="sizeof(s8)"/> |
| |
| <!-- 64-bit unsigned integer, SEMANTIC value RELATIVE NANOSECONDS --> |
| <primary_type symbol="NANOS" datatype="LONG" contenttype="NANOS" |
| type="s8" sizeop="sizeof(s8)"/> |
| |
| <!-- 64-bit signed integer, SEMANTIC value TICKS --> |
| <primary_type symbol="TICKS" datatype="LONG" contenttype="TICKS" |
| type="Ticks" sizeop="sizeof(s8)"/> |
| |
| <!-- 64-bit signed integer, SEMANTIC value TICKS duration --> |
| <primary_type symbol="TICKSPAN" datatype="LONG" contenttype="TICKS" |
| type="Tickspan" 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)"/> |
| |
| <!-- 32-bit float, SEMANTIC value PERCENTAGE (0.0-1.0) --> |
| <primary_type symbol="PERCENTAGE" datatype="FLOAT" contenttype="PERCENTAGE" |
| type="float" sizeop="sizeof(float)"/> |
| |
| <!-- STRING is a virtual type - depending on encoding |
| it will have polymorphic content --> |
| <primary_type symbol="STRING" datatype="STRING" contenttype="NONE" |
| type="const char*" sizeop="sizeof_utf(%)"/> |
| |
| <!-- Symbol* constant. Note that this may currently ONLY be used by |
| classes, methods fields. This restriction might be lifted. --> |
| <primary_type symbol="SYMBOL" datatype="U8" contenttype="SYMBOL" |
| type="const Symbol*" sizeop="sizeof(u8)"/> |
| |
| <!-- A Klass *. The actual class is marked as "used" and will |
| eventually be written into the recording constant pool --> |
| <primary_type symbol="CLASS" datatype="U8" contenttype="CLASS" |
| type="const Klass*" sizeop="sizeof(u8)"/> |
| |
| <primary_type symbol="CLASSLOADER" datatype="U8" contenttype="CLASSLOADER" |
| type="const ClassLoaderData*" sizeop="sizeof(u8)"/> |
| |
| <primary_type symbol="MODULE" datatype="U8" contenttype="MODULE" |
| type="const ModuleEntry*" sizeop="sizeof(u8)"/> |
| |
| <primary_type symbol="PACKAGE" datatype="U8" contenttype="PACKAGE" |
| type="const PackageEntry*" sizeop="sizeof(u8)"/> |
| |
| <!-- A Method *. The method is marked as "used" and will eventually be |
| written into the recording constant pool. --> |
| <primary_type symbol="METHOD" datatype="U8" contenttype="METHOD" |
| type="const Method*" sizeop="sizeof(u8)"/> |
| |
| <!-- The type for stacktraces in the recording. Shoudl not be used by |
| events explicitly --> |
| <primary_type symbol="STACKTRACE" datatype="U8" contenttype="STACKTRACE" |
| type="u8" sizeop="sizeof(u8)"/> |
| |
| <!-- Thread ID --> |
| <primary_type symbol="THREAD" datatype="U8" contenttype="THREAD" |
| type="u8" sizeop="sizeof(u8)"/> |
| |
| <!-- Threadgroup THIS TYPE MAY NOT BE USED IN NORMAL EVENTS (ATM). Only |
| for thread constant pool // KK TODO: u8 should be ObjectP --> |
| <primary_type symbol="THREADGROUP" datatype="U8" contenttype="THREADGROUP" |
| type="u8" sizeop="sizeof(u8)"/> |
| |
| <!-- FRAMETYPE enum --> |
| <primary_type symbol="FRAMETYPE" datatype="U8" contenttype="FRAMETYPE" |
| type="u8" sizeop="sizeof(u8)"/> |
| |
| <!-- THREADSTATE enum --> |
| <primary_type symbol="THREADSTATE" datatype="U8" contenttype="THREADSTATE" |
| type="u8" sizeop="sizeof(u8)"/> |
| |
| <!-- GCName --> |
| <primary_type symbol="GCNAME" datatype="U8" contenttype="GCNAME" |
| type="u8" sizeop="sizeof(u8)" /> |
| |
| <!-- GCCAUSE --> |
| <primary_type symbol="GCCAUSE" datatype="U8" contenttype="GCCAUSE" |
| type="u8" sizeop="sizeof(u8)" /> |
| |
| <!-- GCWHEN --> |
| <primary_type symbol="GCWHEN" datatype="U8" contenttype="GCWHEN" |
| type="u8" sizeop="sizeof(u8)" /> |
| |
| <!-- G1HEAPREGIONTYPE --> |
| <primary_type symbol="G1HEAPREGIONTYPE" datatype="U8" contenttype="G1HEAPREGIONTYPE" |
| type="u8" sizeop="sizeof(u8)" /> |
| |
| <!-- G1YCType --> |
| <primary_type symbol="G1YCTYPE" datatype="U8" contenttype="G1YCTYPE" |
| type="u8" sizeop="sizeof(u8)" /> |
| |
| <!-- GCTHRESHOLDUPDATER --> |
| <primary_type symbol="GCTHRESHOLDUPDATER" datatype="U8" contenttype="GCTHRESHOLDUPDATER" |
| type="u8" sizeop="sizeof(u8)" /> |
| |
| <!-- REFERENCETYPE --> |
| <primary_type symbol="REFERENCETYPE" datatype="U8" contenttype="REFERENCETYPE" |
| type="u8" sizeop="sizeof(u8)" /> |
| |
| <!-- METADATATYPE --> |
| <primary_type symbol="METADATATYPE" datatype="U8" contenttype="METADATATYPE" |
| type="u8" sizeop="sizeof(u8)" /> |
| |
| <!-- METADATAOBJTYPE --> |
| <primary_type symbol="METASPACEOBJTYPE" datatype="U8" contenttype="METASPACEOBJTYPE" |
| type="u8" sizeop="sizeof(u8)" /> |
| |
| <!-- NARROWOOPMODE --> |
| <primary_type symbol="NARROWOOPMODE" datatype="U8" contenttype="NARROWOOPMODE" |
| type="u8" sizeop="sizeof(u8)" /> |
| |
| <!-- COMPILERPHASETYPE --> |
| <primary_type symbol="COMPILERPHASETYPE" datatype="U8" contenttype="COMPILERPHASETYPE" |
| type="u8" sizeop="sizeof(u8)" /> |
| |
| <!-- VMOPERATIONTYPE --> |
| <primary_type symbol="VMOPERATIONTYPE" datatype="U8" contenttype="VMOPERATIONTYPE" |
| type="u8" sizeop="sizeof(u8)" /> |
| |
| <!-- FLAGVALUEORIGIN --> |
| <primary_type symbol="FLAGVALUEORIGIN" datatype="U8" contenttype="FLAGVALUEORIGIN" |
| type="u8" sizeop="sizeof(u8)" /> |
| |
| <!-- CODEBLOBTYPE --> |
| <primary_type symbol="CODEBLOBTYPE" datatype="U8" contenttype="CODEBLOBTYPE" |
| type="u8" sizeop="sizeof(u8)" /> |
| |
| <!-- INFLATECAUSE --> |
| <primary_type symbol="INFLATECAUSE" datatype="U8" contenttype="INFLATECAUSE" |
| type="u8" sizeop="sizeof(u8)" /> |
| </primary_types> |
| </types> |