Class XClassLoaderHistogramRecord

  • All Implemented Interfaces:
    java.io.Serializable

    public final class XClassLoaderHistogramRecord
    extends ClassLoaderHistogramRecord
    Accumulated data about a class loader, including classes and shallow and retained sizes.
    See Also:
    Serialized Form
    • Constructor Detail

      • XClassLoaderHistogramRecord

        public XClassLoaderHistogramRecord​(java.lang.String label,
                                           int classLoaderId,
                                           java.util.ArrayList<ClassHistogramRecord> classHistogramRecords,
                                           long numberOfObjects,
                                           long usedHeapSize,
                                           long retainedHeapSize)
        Create record for the class loader based on the records for the classes
        Parameters:
        label - for display
        classLoaderId - the object id of the class loader
        classHistogramRecords - summary of all the classes loaded by the class loader
        numberOfObjects - the total number of objects
        usedHeapSize - the total shallow size of the loader, classes and objects
        retainedHeapSize - the total retained size of the loader, classes and objects
    • Method Detail

      • calculateRetainedSize

        public long calculateRetainedSize​(ISnapshot snapshot,
                                          boolean calculateIfNotAvailable,
                                          boolean approximation,
                                          IProgressListener listener)
                                   throws SnapshotException
        Description copied from class: ClassLoaderHistogramRecord
        Find out the retained size
        Overrides:
        calculateRetainedSize in class ClassLoaderHistogramRecord
        Parameters:
        snapshot - the snapshot
        calculateIfNotAvailable - whether to calculate the size if not already available
        approximation - whether to use an approximation to the retained size (sum of the individual retained sizes)
        listener - to report progress and errors
        Returns:
        the retained size, negated if approximate, and 0 if unavailable
        Throws:
        SnapshotException