Module openj9.dtfj

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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void 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 Detail

      • 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 object
        classAddress - 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 code
        refs - the enumeration of object references
        instanceSize - 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 array
        classAddress - the address of the class object for the objects in the array
        flags - flags associated with the object (currently unused)
        hashCode - the object's hash code
        refs - the enumeration of object references
        length - 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 object
        superAddress - the address of the superclass object
        name - the name of the class
        instanceSize - the size of each instance (object) of this class
        flags - flags associated with the object (currently unused)
        hashCode - the object's hash code
        refs - 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 array
        type - 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 array
        flags - flags associated with the object (currently unused)
        hashCode - the object's hash code
        instanceSize - will be set for primitive arrays with a version 6 PHD, otherwise == PHDJavaObject.UNSPECIFIED_INSTANCE_SIZE
        Throws:
        Exception