tracetypes.xml revision 4141
0N/A<?
xml version="1.0" encoding="utf-8"?>
0N/A Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 0N/A DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A This code is free software; you can redistribute it and/or modify it 0N/A under the terms of the GNU General Public License version 2 only, as 0N/A published by the Free Software Foundation. 0N/A This code is distributed in the hope that it will be useful, but WITHOUT 0N/A ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A version 2 for more details (a copy is included in the LICENSE file that 0N/A accompanied this code). 0N/A You should have received a copy of the GNU General Public License version 0N/A 2 along with this work; if not, write to the Free Software Foundation, 0N/A Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 0N/A Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/AContent types (complex) should create constant pool data 0N/ACurrently at least, there is _NO_ verification that whatever 0N/Awriter you have is actually writing correctly. So BE CAREFUL! 0N/ADeclared with the 'content_type' tag. 0N/A<type> is the ID type, i.e the integer type that resolves this. Most often 0N/AU4 or U8, but for example really small number constants, like GCTYPE uses U1. 0N/A<content-type> is where it gets interesting. 'builtin_type' means we're 0N/Adefining how we resolve one of the trace built-in types (Class, Thread etc), 0N/Ajvm_type means defining a new one for our own use. 0N/A<content_type id="GCMode" hr_name="GC mode" type="U1" jvm_type="GCMODE"> 0N/A <value type="UTF8" field="desc" description="Description"/> 0N/AThis creates a content type CONTENT_TYPE_GCMODE 0N/AThe field type referencing it is u1 (U1), and the constant pool struct has one field, the name. 0N/ABefore we can use it we need also define a primary field data type: 0N/A<primary_type symbol="GCMODE" datatype="U1" contenttype="NONE" 0N/A type="u8" sizeop="sizeof(u1)"/> 0N/ANow we can use the content + data type in declaring event fields. 0N/ARemember however, that for us to be able to resolve the value later we must also add 0N/Acreating the constant pool data in VM_JFRCheckpoint::write_checkpoint 0N/A w->be_uint(CONTENT_TYPE_GCMODE); 0N/A w->be_uint(MM_GC_MODE_UNINITIALIZED); 0N/A for (i = 0; i < MM_GC_MODE_UNINITIALIZED; i++) { 0N/A w->write_utf8(gcModeGetName(i)); 0N/A <
content_type id="Thread" hr_name="Thread" 0N/A type="U4" builtin_type="OSTHREAD">
0N/A <
value type="UTF8" field="name" label="Thread name"/>
0N/A <
content_type id="VMThread" hr_name="VM Thread" 0N/A type="U8" jvm_type="VMTHREAD">
0N/A <
value type="OSTHREAD" field="thread" label="VM Thread"/>
0N/A <!-- The first argument ("JavaThread") is misleading, it's really a 0N/A being "JavaThread" so it shouldn't be changed. 0N/A <
content_type id="JavaThread" hr_name="Java thread" 0N/A type="U8" builtin_type="JAVALANGTHREAD">
0N/A <
value type="OSTHREAD" field="thread" label="OS Thread ID"/>
0N/A <
value type="BYTES64" field="allocInsideTla" 0N/A label="Allocated bytes inside TLAs"/>
0N/A <
value type="BYTES64" field="allocOutsideTla" 0N/A label="Allocated bytes outside TLAs"/>
0N/A <
value type="THREADGROUP" field="group" label="Java Thread Group"/>
0N/A <
content_type id="ThreadGroup" hr_name="Thread group" 0N/A type="U4" jvm_type="THREADGROUP">
0N/A <
value type="THREADGROUP" field="parent" label="Parent"/>
0N/A <
value type="UTF8" field="name" label="Name"/>
0N/A <
content_type id="StackTrace" hr_name="Stacktrace" 0N/A type="U8" builtin_type="STACKTRACE">
0N/A <
structarray type="StackFrame" field="frames" label="Stack frames"/>
0N/A <
content_type id="Class" hr_name="Java class" 0N/A type="U8" builtin_type="CLASS">
0N/A <
value type="CLASS" field="loaderClass" label="ClassLoader"/>
0N/A <
value type="SYMBOL" field="name" label="Name"/>
0N/A <
value type="SHORT" field="modifiers" label="Access modifiers"/>
0N/A <
content_type id="Method" hr_name="Java method" 0N/A type="U8" jvm_type="METHOD">
0N/A <
value type="CLASS" field="class" label="Class"/>
0N/A <
value type="SYMBOL" field="name" label="Name"/>
0N/A <
value type="SYMBOL" field="signature" label="Signature"/>
0N/A <
value type="SHORT" field="modifiers" label="Access modifiers"/>
0N/A <
content_type id="UTFConstant" hr_name="UTF constant" 0N/A type="U8" jvm_type="SYMBOL">
0N/A <
value type="UTF8" field="utf8" label="UTF8 data"/>
0N/A <
content_type id="ThreadState" hr_name="Java Thread State" 0N/A type="U2" jvm_type="THREADSTATE">
0N/A <
value type="UTF8" field="name" label="Name"/>
0N/A <
content_type id="FrameType" hr_name="Frame type" 0N/A type="U1" jvm_type="FRAMETYPE">
0N/A <
value type="UTF8" field="desc" label="Description"/>
0N/A <
struct_type id="StackFrame">
0N/A <
value type="METHOD" field="method" label="Java Method"/>
0N/A <
value type="INTEGER" field="line" label="Line number"/>
0N/A <
value type="FRAMETYPE" field="type" label="Frame type"/>
0N/A <
content_type id="GCName" hr_name="GC Name" 0N/A type="U1" jvm_type="GCNAME">
0N/A <
value type="UTF8" field="name" label="name" />
0N/A <
content_type id="GCCause" hr_name="GC Cause" 0N/A type="U2" jvm_type="GCCAUSE">
0N/A <
value type="UTF8" field="cause" label="cause" />
0N/A <
content_type id="GCWhen" hr_name="GC When" 0N/A type="U1" jvm_type="GCWHEN">
0N/A <
value type="UTF8" field="when" label="when" />
0N/A <
content_type id="G1YCType" hr_name="G1 YC Type" 0N/A type="U1" jvm_type="G1YCTYPE">
0N/A <
value type="UTF8" field="type" label="type" />
0N/A <
content_type id="ReferenceType" hr_name="Reference Type" 0N/A type="U1" jvm_type="REFERENCETYPE">
0N/A <
value type="UTF8" field="type" label="type" />
0N/A <
content_type id="NARROW_OOP_MODE" hr_name="Narrow Oop Mode" 0N/A type="U1" jvm_type="NARROWOOPMODE">
0N/A <
value type="UTF8" field="mode" label="mode" />
0N/A <
content_type id="VMOperationType" hr_name="VM Operation Type" 0N/A type="U2" jvm_type="VMOPERATIONTYPE">
0N/A <
value type="UTF8" field="type" label="type" />
0N/A <
content_type id="CompilerPhaseType" hr_name="Compiler Phase Type" 0N/A type="U1" jvm_type="COMPILERPHASETYPE">
0N/A <
value type="UTF8" field="phase" label="phase" />
0N/A - primary_type takes these attributes: 0N/A - symbol INTEGER, LONG etc 0N/A - datatype The trace datatype, see enum DataType 0N/A - contenttype Either resolved content type or the semantic meaning 0N/A - type The actual type as used in structures etc 0N/A - struct value of type "type" and yield the factual byte 0N/A - size we need to write. The % is replaced by the value 0N/A <!-- SIGNED 64bit --> 0N/A <
primary_type symbol="LONG" datatype="LONG" contenttype="NONE" 0N/A type="s8" sizeop="sizeof(s8)"/>
0N/A <!-- UNSIGNED 64bit --> 0N/A <
primary_type symbol="ULONG" datatype="U8" contenttype="NONE" 0N/A type="u8" sizeop="sizeof(u8)"/>
0N/A <!-- SIGNED 32bit --> 0N/A <
primary_type symbol="INTEGER" datatype="INT" contenttype="NONE" 0N/A type="s4" sizeop="sizeof(s4)"/>
0N/A <!-- UNSIGNED 32bit --> 0N/A <
primary_type symbol="UINT" datatype="U4" contenttype="NONE" 0N/A type="unsigned" sizeop="sizeof(unsigned)"/>
0N/A <!-- UNSIGNED 16bit --> 0N/A <
primary_type symbol="USHORT" datatype="U2" contenttype="NONE" 0N/A type="u2" sizeop="sizeof(u2)"/>
0N/A <!-- SIGNED 16bit --> 0N/A <
primary_type symbol="SHORT" datatype="SHORT" contenttype="NONE" 0N/A type="s2" sizeop="sizeof(s2)"/>
0N/A <!-- SIGNED 8bit --> 0N/A <
primary_type symbol="BYTE" datatype="BYTE" contenttype="NONE" 0N/A type="s1" sizeop="sizeof(s1)"/>
0N/A <!-- UNSIGNED 8bit --> 0N/A <
primary_type symbol="UBYTE" datatype="U1" contenttype="NONE" 0N/A type="u1" sizeop="sizeof(u1)"/>
0N/A <!-- float 32bit --> 0N/A <
primary_type symbol="FLOAT" datatype="FLOAT" contenttype="NONE" 0N/A type="float" sizeop="sizeof(float)"/>
0N/A <!-- float 64bit --> 0N/A <
primary_type symbol="DOUBLE" datatype="DOUBLE" contenttype="NONE" 0N/A type="double" sizeop="sizeof(double)"/>
0N/A <!-- boolean type (1-byte) --> 0N/A <
primary_type symbol="BOOLEAN" datatype="BOOLEAN" contenttype="NONE" 0N/A type="bool" sizeop="1"/>
0N/A <!-- 32-bit unsigned integer, SEMANTIC value BYTES --> 0N/A <
primary_type symbol="BYTES" datatype="U4" contenttype="BYTES" 0N/A type="u4" sizeop="sizeof(u4)"/>
0N/A <
primary_type symbol="IOBYTES" datatype="U4" contenttype="BYTES" 0N/A type="u4" sizeop="sizeof(u4)"/>
0N/A <!-- 64-bit unsigned integer, SEMANTIC value BYTES --> 0N/A <
primary_type symbol="BYTES64" datatype="U8" contenttype="BYTES" 0N/A type="u8" sizeop="sizeof(u8)"/>
0N/A <!-- 64-bit unsigned integer, SEMANTIC value ABSOLUTE MILLISECONDS --> 0N/A <
primary_type symbol="EPOCHMILLIS" datatype="LONG" contenttype="EPOCHMILLIS" 0N/A 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 unsigned integer, SEMANTIC value RELATIVE TICKS --> <
primary_type symbol="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)"/>
<!-- 32-bit float, SEMANTIC value PERCENTAGE (0.0-1.0) --> <
primary_type symbol="PERCENT" datatype="FLOAT" contenttype="PERCENTAGE" type="float" sizeop="sizeof(float)"/>
<!-- UTF-encoded string, max length 64k --> <
primary_type symbol="UTF8" datatype="UTF8" 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="Symbol *" sizeop="sizeof(u8)"/>
<!-- A klassOop *. 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="klassOop" sizeop="sizeof(u8)"/>
<!-- A methodOop *. 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="methodOop" sizeop="sizeof(u8)"/>
<!-- The type for stacktraces in the recording. Shoudl not be used by <
primary_type symbol="STACKTRACE" datatype="U8" contenttype="STACKTRACE" type="u8" sizeop="sizeof(u8)"/>
<
primary_type symbol="OSTHREAD" datatype="U4" contenttype="OSTHREAD" type="u4" sizeop="sizeof(u4)"/>
<!-- VM Thread ID Note: changed from U2 to U8 for hotspot --> <
primary_type symbol="VMTHREAD" datatype="U8" contenttype="VMTHREAD" type="u8" sizeop="sizeof(u8)"/>
<
primary_type symbol="JAVALANGTHREAD" datatype="LONG" contenttype="JAVALANGTHREAD" type="s8" <!-- 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="U4" contenttype="THREADGROUP" <
primary_type symbol="FRAMETYPE" datatype="U1" contenttype="FRAMETYPE" type="u1" sizeop="sizeof(u1)"/>
<!-- THREADSTATE enum --> <
primary_type symbol="THREADSTATE" datatype="U2" contenttype="THREADSTATE" type="u2" sizeop="sizeof(u2)"/>
<
primary_type symbol="GCNAME" datatype="U1" contenttype="GCNAME" type="u1" sizeop="sizeof(u1)" />
<
primary_type symbol="GCCAUSE" datatype="U2" contenttype="GCCAUSE" type="u2" sizeop="sizeof(u2)" />
<
primary_type symbol="GCWHEN" datatype="U1" contenttype="GCWHEN" type="u1" sizeop="sizeof(u1)" />
<
primary_type symbol="G1YCTYPE" datatype="U1" contenttype="G1YCTYPE" type="u1" sizeop="sizeof(u1)" />
<
primary_type symbol="REFERENCETYPE" datatype="U1" contenttype="REFERENCETYPE" type="u1" sizeop="sizeof(u1)" />
<
primary_type symbol="NARROWOOPMODE" datatype="U1" contenttype="NARROWOOPMODE" type="u1" sizeop="sizeof(u1)" />
<!-- COMPILERPHASETYPE --> <
primary_type symbol="COMPILERPHASETYPE" datatype="U1" contenttype="COMPILERPHASETYPE" type="u1" sizeop="sizeof(u1)" />
<
primary_type symbol="VMOPERATIONTYPE" datatype="U2" contenttype="VMOPERATIONTYPE" type="u2" sizeop="sizeof(u2)" />