Package org.eclipse.mat.snapshot
Class MultiplePathsFromGCRootsClassRecord
java.lang.Object
org.eclipse.mat.snapshot.MultiplePathsFromGCRootsClassRecord
Holds one level of multiple paths from Garbage Collection roots
merged by class.
-
Constructor Summary
ConstructorDescriptionMultiplePathsFromGCRootsClassRecord
(IClass clazz, int level, boolean fromRoots, ISnapshot snapshot) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPath
(int[] path) This method is used only when the record is built.getClazz()
Returns a Comparator ordering the records descending by the total size of referenced objects.int
getCount()
Get the number of paths going through this objectint
Get the number of distinct objects of this classint
getLevel()
List<int[]>
getPaths()
Get all the paths going through the object (getObjectId())long
Get the total net heap size of all referenced objects (see getReferencedObjects())int[]
Get the "end" objects for each path.boolean
Go down to the next level
-
Constructor Details
-
Method Details
-
nextLevel
Go down to the next level- Returns:
- an array of records from the next level
- Throws:
SnapshotException
-
addPath
public void addPath(int[] path) This method is used only when the record is built. Adds one path to the set of paths- Parameters:
path
-
-
getPaths
Get all the paths going through the object (getObjectId())- Returns:
- List<int[]> each element in the list is an int[] representing a path
-
getCount
public int getCount()Get the number of paths going through this object -
getDistinctCount
public int getDistinctCount()Get the number of distinct objects of this class -
getReferencedHeapSize
Get the total net heap size of all referenced objects (see getReferencedObjects())- Returns:
- - the total heap size of all referenced objects
- Throws:
SnapshotException
-
getReferencedObjects
public int[] getReferencedObjects()Get the "end" objects for each path. This is equal to getting all the paths and looking at their element [0]- Returns:
- - an array with all the objects at the end of the paths
-
getComparatorByNumberOfReferencedObjects
public static Comparator<MultiplePathsFromGCRootsClassRecord> getComparatorByNumberOfReferencedObjects() -
getComparatorByReferencedHeapSize
Returns a Comparator ordering the records descending by the total size of referenced objects. -
getClazz
-
isFromRoots
public boolean isFromRoots() -
getLevel
public int getLevel()
-