< prev index next >
src/hotspot/share/trace/tracetypes.xml
Print this page
rev 49619 : JEP 328 : Flight Recorder open source preview
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2018, 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.
@@ -21,41 +21,28 @@
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.
+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.
-
+<type> is the ID type (u8), i.e the integer type that resolves this.
<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 id="GCMode" hr_name="GC mode" type="U8" jvm_type="GCMODE">
+ <value type="STRING" field="name" 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.
-
+The field type referencing it is u8, 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)"/>
-
+<primary_type symbol="GCMODE" datatype="U8" contenttype="NONE"
+ type="u8" sizeop="sizeof(u8)"/>
Now we can use the content + data type in declaring event fields.
-->
<types>
<content_types>
@@ -194,10 +181,67 @@
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_type id="StackTrace" hr_name="Stacktrace"
+ type="U8" builtin_type="STACKTRACE">
+ <value type="BOOLEAN" field="truncated" label="Truncated"/>
+ <structarray type="StackFrame" field="frames" label="Stack Frames"/>
+ </content_type>
+
+ <content_type id="FrameType" hr_name="Frame type"
+ type="U8" jvm_type="FRAMETYPE">
+ <value type="STRING" field="description" label="Description"/>
+ </content_type>
+
+ <content_type id="OldObjectRootSystem" hr_name="GC Root System" type="U8" jvm_type="OLDOBJECTROOTSYSTEM">
+ <value type="STRING" field="system" label="System"/>
+ </content_type>
+
+ <content_type id="OldObjectRootType" hr_name="GC Root Type" type="U8" jvm_type="OLDOBJECTROOTTYPE">
+ <value type="STRING" field="type" label="Type"/>
+ </content_type>
+
+ <content_type id="OldObjectGcRoot" hr_name="GC Root" type="U8" jvm_type="OLDOBJECTGCROOT">
+ <value type="STRING" field="description" label="Root Description" description="Root information"/>
+ <value type="OLDOBJECTROOTSYSTEM" field="system" label="System" description="The subsystem of origin for the root"/>
+ <value type="OLDOBJECTROOTTYPE" field="type" label="Type" description="The root type"/>
+ </content_type>
+
+ <content_type id="OldObjectArray" hr_name="Old Object Array" type="U8" jvm_type="OLDOBJECTARRAY">
+ <value type="INTEGER" field="size" label="Array Size" description="Size of array"/>
+ <value type="INTEGER" field="index" label="Index" description="Index in the array"/>
+ </content_type>
+
+ <content_type id="OldObjectField" hr_name="Old Object Field" type="U8" jvm_type="OLDOBJECTFIELD">
+ <value type="STRING" field="name" label="Field" description="Name of field"/>
+ <value type="SHORT" field="modifiers" label="Field Modifiers" description="Field modifiers"/>
+ </content_type>
+
+ <content_type id="OldObject" hr_name="Old Object" type="U8" jvm_type="OLDOBJECT">
+ <value type="ADDRESS" field="address" label="Memory Address"/>
+ <value type="CLASS" field="type" label="Java Class"/>
+ <value type="STRING" field="description" label="Object Description" description="Object description"/>
+ <value type="REFERENCE" field="referrer" label="Referrer Object" description="Object referencing this object"/>
+ </content_type>
+
+ <content_type id="Reference" hr_name="Reference" type="U8" jvm_type="REFERENCE">
+ <value type="OLDOBJECTARRAY" field="array" label="Array Information" description="Array or null if it is not an array"/>
+ <value type="OLDOBJECTFIELD" field="field" label="Field Information" description="Field or null if it is an array"/>
+ <value type="OLDOBJECT" field="object" label="Object" description="Object holder for this reference"/>
+ <value type="INTEGER" field="skip" label="Skip value" description="The object is this many hops away"/>
+ </content_type>
+
+ <struct_type id="StackFrame">
+ <value type="METHOD" field="method" label="Java Method"/>
+ <value type="INTEGER" field="lineNumber" label="Line Number"/>
+ <value type="INTEGER" field="bytecodeIndex" label="Bytecode Index"/>
+ <value type="FRAMETYPE" field="type" label="Frame Type"/>
+ </struct_type>
+
</content_types>
<primary_types>
<!--
@@ -320,25 +364,21 @@
<!-- 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
+ <!-- The type for stacktraces in the recording. Should 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 -->
+ <!-- Threadgroup. Only for thread constant pool -->
<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 -->
@@ -402,7 +442,17 @@
type="u8" sizeop="sizeof(u8)" />
<!-- INFLATECAUSE -->
<primary_type symbol="INFLATECAUSE" datatype="U8" contenttype="INFLATECAUSE"
type="u8" sizeop="sizeof(u8)" />
+
+ <!-- THESE TYPES MAY NOT BE USED IN NORMAL EVENTS -->
+ <primary_type symbol="OLDOBJECTROOTSYSTEM" datatype="U8" contenttype="OLDOBJECTROOTSYSTEM" type="u8" sizeop="sizeof(u8)"/>
+ <primary_type symbol="OLDOBJECTROOTTYPE" datatype="U8" contenttype="OLDOBJECTROOTTYPE" type="u8" sizeop="sizeof(u8)"/>
+ <primary_type symbol="OLDOBJECTGCROOT" datatype="U8" contenttype="OLDOBJECTGCROOT" type="u8" sizeop="sizeof(u8)"/>
+ <primary_type symbol="OLDOBJECTARRAY" datatype="U8" contenttype="OLDOBJECTARRAY" type="u8" sizeop="sizeof(u8)"/>
+ <primary_type symbol="OLDOBJECTFIELD" datatype="U8" contenttype="OLDOBJECTFIELD" type="u8" sizeop="sizeof(u8)"/>
+ <primary_type symbol="OLDOBJECT" datatype="U8" contenttype="OLDOBJECT" type="u8" sizeop="sizeof(u8)"/>
+ <primary_type symbol="REFERENCE" datatype="U8" contenttype="REFERENCE" type="u8" sizeop="sizeof(u8)"/>
+
</primary_types>
</types>
< prev index next >