Class PortableHeapDumpFormatter

java.lang.Object
com.ibm.jvm.dtfjview.heapdump.HeapDumpFormatter
com.ibm.jvm.dtfjview.heapdump.portable.PortableHeapDumpFormatter

public class PortableHeapDumpFormatter extends HeapDumpFormatter
A formatter for Portable heap dumps (PHDs). Format documented here: http://w3.hursley.ibm.com/~dgriff/newphd.html
  • Field Details

  • Constructor Details

  • Method Details

    • addClass

      public void addClass(long address, String name, long superClassAddress, int size, long instanceSize, int hashCode, ReferenceIterator references) throws IOException
      Description copied from class: HeapDumpFormatter
      Adds a class to the heapdump.
      Specified by:
      addClass in class HeapDumpFormatter
      Parameters:
      address - Address of class
      name - Name of class
      superClassAddress - Address of superclass
      size - Size of class, bytes
      instanceSize - Size of objects of this class
      hashCode - Hashcode
      references - Iterator of Long addresses (some of which may be null)
      Throws:
      IOException
    • addObject

      public void addObject(long address, long classAddress, String className, int size, int hashCode, ReferenceIterator references) throws IOException
      Description copied from class: HeapDumpFormatter
      Adds an object to the heapdump.
      Specified by:
      addObject in class HeapDumpFormatter
      Parameters:
      address - Address of object
      classAddress - Address of class of object
      className - Name of class of object
      size - Size of object, bytes
      hashCode - Hashcode of object
      references - Iterator of Long addresses (some of which may be null)
      Throws:
      IOException
    • addObjectArray

      public void addObjectArray(long address, long arrayClassAddress, String arrayClassName, long elementClassAddress, String elementClassName, long size, int numberOfElements, int hashCode, ReferenceIterator references) throws IOException
      Description copied from class: HeapDumpFormatter
      Adds an object array to the heapdump.
      Specified by:
      addObjectArray in class HeapDumpFormatter
      Parameters:
      address - Address of object
      arrayClassAddress - Address of class of array object
      arrayClassName - Name of class of array object
      elementClassAddress - Address of class of elements
      elementClassName - Name of class of elements
      size - Size of object, bytes Since version 6 PHD, instance size is in the PHD and can be larger than max signed int so pass as a long
      numberOfElements - number of elements in the array
      hashCode - Hashcode of object
      references - Iterator of Long addresses (some of which may be null)
      Throws:
      IOException
    • addPrimitiveArray

      public void addPrimitiveArray(long address, long arrayClassAddress, int type, long size, int hashCode, int numberOfElements) throws IOException, IllegalArgumentException
      Description copied from class: HeapDumpFormatter
      Adds a primitive array object to the heapdump Type code is: 0 - bool, 1 - char, 2 - float, 3 - double, 4 - byte, 5 - short, 6 - int, 7 - long
      Specified by:
      addPrimitiveArray in class HeapDumpFormatter
      Parameters:
      address - Address of object
      arrayClassAddress - Address of primitive array class
      type - Type code - see above
      size - Size of object, bytes. Since version 6 PHD, instance size is in the PHD and can be larger than max signed int so pass as a long
      hashCode - Hashcode of object
      numberOfElements - Number of elements in the array
      Throws:
      IOException
      IllegalArgumentException - if invalid type is supplied
    • close

      public void close() throws IOException
      Description copied from class: HeapDumpFormatter
      Closes the heapdump
      Specified by:
      close in class HeapDumpFormatter
      Throws:
      IOException