Heap Dumping
XML Schema
Below is the XML schema for heap dumps.
<?xml version='1.0' encoding='UTF-8'?>
<!--
Schema
Copyright 2012 IS2T. All rights reserved.
IS2T PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- root element: heap -->
<xs:element name="heap">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="class"/>
<xs:element ref="object"/>
<xs:element ref="array"/>
<xs:element ref="stringLiteral"/>
</xs:choice>
</xs:complexType>
</xs:element>
|
<!-- class element -->
<xs:element name="class">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="field"/>
</xs:choice>
<xs:attribute name="name" type="xs:string" use = "required"/>
<xs:attribute name="id" type="xs:string" use = "required"/>
<xs:attribute name="superclass" type="xs:string"/>
</xs:complexType>
</xs:element>
|
<!-- object element-->
<xs:element name="object">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="field"/>
</xs:choice>
<xs:attribute name="id" type="xs:string" use = "required"/>
<xs:attribute name="class" type="xs:string" use = "required"/>
<xs:attribute name="createdAt" type="xs:string" use = "optional"/>
<xs:attribute name="createdInThread" type="xs:string" use = "optional"/>
<xs:attribute name="createdInMethod" type="xs:string"/>
<xs:attribute name="tag" type="xs:string" use = "required"/>
</xs:complexType>
</xs:element>
|
<!-- array element-->
<xs:element name="array" type = "arrayTypeWithAttribute"/>
<!-- stringLiteral element-->
<xs:element name="stringLiteral">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs ="4" maxOccurs="4" ref="field "/>
</xs:sequence>
<xs:attribute name="id" type="xs:string" use = "required"/>
<xs:attribute name="class" type="xs:string" use = "required"/>
</xs:complexType>
</xs:element>
|
<!-- field element: child of class, object and stringLiteral-->
<xs:element name="field">
<xs:complexType>
<xs:attribute name="name" type="xs:string" use = "required"/>
<xs:attribute name="id" type="xs:string" use = "optional"/>
<xs:attribute name="value" type="xs:string" use = "optional"/>
<xs:attribute name="type" type="xs:string" use = "optional"/>
</xs:complexType>
</xs:element>
<xs:simpleType name = "arrayType">
<xs:list itemType="xs:integer"/>
</xs:simpleType>
<!-- complex type "arrayTypeWithAttribute". type of array element-->
<xs:complexType name = "arrayTypeWithAttribute">
<xs:simpleContent>
<xs:extension base="arrayType">
<xs:attribute name="id" type="xs:string" use = "required"/>
<xs:attribute name="class" type="xs:string" use = "required"/>
<xs:attribute name="createdAt" type="xs:string" use = "optional"/>
<xs:attribute name="createdInThread" type="xs:string" use = "optional"/>
<xs:attribute name="createdInMethod" type="xs:string" use = "optional"/>
<xs:attribute name="length" type="xs:string" use = "required"/>
<xs:attribute name="elementsType" type="xs:string" use = "optional"/>
<xs:attribute name="type" type="xs:string" use = "optional"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:schema>
|
File Specification
Types referenced in heap dumps are represented in the internal classfile
format (Internal classfile Format for Types). Fully qualified names
are names separated by the / separator (For example, a/b/C
).
Type = <BaseType> | <ClassType> | <ArrayType>
BaseType: B(byte), C(char), D(double), F(float), I(int), J(long), S(short), Z(boolean),
ClassType: L<ClassName>;
ArrayType: [<Type>
Tags used in the heap dumps are described in the table below.
Tags |
Attributes |
Description |
|
The root element. |
|
|
Element that references a Java class. |
|
|
Class type ( |
|
|
Unique identifier of the class. |
|
|
Identifier of the superclass of this class. |
|
|
Element that references a Java object. |
|
|
Unique identifier of this object. |
|
|
Fully qualified name of the class of this object. |
|
|
Element that references a Java array. |
|
|
Unique identifier of this array. |
|
|
Fully qualified name of the class of this array. |
|
|
Type of the elements of this array. |
|
|
Array length. |
|
|
Element that references a |
|
|
Unique identifier of this object. |
|
|
Id of |
|
|
Element that references the field of an object or a class. |
|
|
Name of this field. |
|
|
Object or Array identifier, if it holds a reference. |
|
|
Type of this field, if it holds a base type. |
|
|
Value of this field, if it holds a base type. |