Interface PortableHeapDumpListener
public interface PortableHeapDumpListener
This interface is used to parse a heapdump in Phd format. It provides info about the
contents of a heapdump in the form of callbacks with one call per object. Note that wherever
an array of references appears that null references are not included.
Any exceptions thrown by the listener will be propagated back through the parse call.
Note: This interface was changed on 12 Oct 2005 to provide the ability to enumerate the references rather than returning an array of longs. This has been done for performance reasons after it was found that certain heapdumps contain huge object arrays.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
classDump
(long address, long superAddress, String name, int instanceSize, int flags, int hashCode, LongEnumeration refs) This call represents a class object.void
objectArrayDump
(long address, long classAddress, int flags, int hashCode, LongEnumeration refs, int length, long instanceSize) This call represents an array of objects.void
objectDump
(long address, long classAddress, int flags, int hashCode, LongEnumeration refs, long instanceSize) This call represents a normal object.void
primitiveArrayDump
(long address, int type, int length, int flags, int hashCode, long instanceSize) This call represents a primitive array.
-
Method Details
-
objectDump
void objectDump(long address, long classAddress, int flags, int hashCode, LongEnumeration refs, long instanceSize) throws Exception This call represents a normal object.- Parameters:
address
- the address of the objectclassAddress
- the address of the object's class object (which is dumped via classDump)flags
- flags associated with the object (currently unused)hashCode
- the object's hash coderefs
- the enumeration of object referencesinstanceSize
- the instance size == PHDJavaObject.UNSPECIFIED_INSTANCE_SIZE- Throws:
Exception
-
objectArrayDump
void objectArrayDump(long address, long classAddress, int flags, int hashCode, LongEnumeration refs, int length, long instanceSize) throws Exception This call represents an array of objects.- Parameters:
address
- the address of the arrayclassAddress
- the address of the class object for the objects in the arrayflags
- flags associated with the object (currently unused)hashCode
- the object's hash coderefs
- the enumeration of object referenceslength
- the true length of the array in terms of number of references. This includes null refs and so may be greater than refs.length.instanceSize
- will be set for all object arrays with a version 6 PHD, otherwise == PHDJavaObject.UNSPECIFIED_INSTANCE_SIZE- Throws:
Exception
-
classDump
void classDump(long address, long superAddress, String name, int instanceSize, int flags, int hashCode, LongEnumeration refs) throws Exception This call represents a class object.- Parameters:
address
- the address of the class objectsuperAddress
- the address of the superclass objectname
- the name of the classinstanceSize
- the size of each instance (object) of this classflags
- flags associated with the object (currently unused)hashCode
- the object's hash coderefs
- the enumeration of this class's static references.- Throws:
Exception
-
primitiveArrayDump
void primitiveArrayDump(long address, int type, int length, int flags, int hashCode, long instanceSize) throws Exception This call represents a primitive array.- Parameters:
address
- the address of the arraytype
- the type of the array elements as follows:Value Array type 0 bool 1 char 2 float 3 double 4 byte 5 short 6 int 7 long length
- the number of elements in the arrayflags
- flags associated with the object (currently unused)hashCode
- the object's hash codeinstanceSize
- will be set for primitive arrays with a version 6 PHD, otherwise == PHDJavaObject.UNSPECIFIED_INSTANCE_SIZE- Throws:
Exception
-