IBM User Guide for Java V7 on Windows > Troubleshooting and support > Using diagnostic tools > Using Heapdump
Portable Heap Dump (PHD) file format
A PHD Heapdump file contains a header, plus a number of records that describe objects, arrays, and classes.
This description of the PHD Heapdump file format includes references to primitive numbers, which are listed here with lengths:
- "byte": 1 byte in length.
- "short": 2 byte in length.
- "int": 4 byte in length.
- "long": 8 byte in length.
- "word": 4 bytes in length on 32-bit platforms, or 8 bytes on 64-bit platforms.
The general structure of a PHD file consists of these elements:
- The UTF string portable heap dump.
- An "int" containing the PHD version number.
- An "int" containing flags:
- A value of 1 indicates that the "word" length is 64-bit.
- A value of 2 indicates that all the objects in the dump are hashed. This flag is set for Heapdumps that use 16-bit hashcodes, that is, IBM SDK for Java™ 5.0 or 6 with an IBM J9 2.3, 2.4, or 2.5 virtual machine (VM). This flag is not set for IBM SDK for Java 6 when the product includes the IBM J9 2.6 virtual machine. These Heapdumps use 32-bit hashcodes that are only created when used. For example, these hashcodes are created when the APIs Object.hashCode() or Object.toString() are called in a Java application. If this flag is not set, the presence of a hashcode is indicated by the hashcode flag on the individual PHD records.
- A value of 4 indicates that the dump is from an IBM J9 VM.
- A "byte" containing a tag that indicates the start of the header. The tag value is 1.
- A number of header records. These records are preceded by a one-byte header tag. The header record tags have a different range of values from the body, or object record tags. The end of the header is indicated by the end of header tag. Header records are optional.
- header tag 1. Not used in Heapdumps generated by the IBM J9 VM.
- header tag 2. Indicates the end of the header.
- header tag 3. Not used in Heapdumps generated by the IBM J9 VM.
- header tag 4. This tag is a UTF string that indicates the JVM version. The string has a variable length.
- A "byte" containing the "start of dump" body tag, with a tag value of 2.
- A number of dump records. These records are preceded by a 1 byte tag. The possible record types are:
- Short object record. Indicated by having the 0x80 bit of the tag set.
- Medium object record. Indicated by having the 0x40 bit of the tag set, and the top bit with a value of 0.
- Primitive array record. Indicated by having the 0x20 bit of the tag set. All other tag values have the top 3 bits with a value of 0.
- Long object record. Indicated by having a tag value of 4.
- Object array record. Indicated by having a tag value of 5.
- Class record. Indicated by having a tag value of 6.
- Long primitive array record. Indicated by having a tag value of 7.
- Object array record (revised). Indicated by having a tag value of 8.
See later sections for more information about these record types.
- A "byte" containing a tag that indicates the end of the Heapdump. This tag has a value of 3.
The current PHD version is 5, which can be found in the following releases:
- IBM SDK for Java 5.0 service refresh 9 and later (APAR IZ34218)
- IBM SDK for Java 6 with one of the following IBM J9 virtual machine levels 2.4, 2.5, or 2.6.
PHD version 4 is found in IBM SDK for Java 5.0 service refresh 8 and earlier. These versions use an IBM J9 2.3 virtual machine.
- PHD object records
PHD files can contain short, medium, and long object records, depending on the number of object references in the Heapdump.- PHD array records
PHD array records can cover primitive arrays and object arrays.- PHD class records
The PHD class record encodes a class object.
Parent: Using Heapdump
Error 404 - Not Found Error 404 - Not Found
The document you are looking for may have been removed or re-named. Please contact the web site owner for further assistance.