public class GraphLayout extends Object
Constructor and Description |
---|
GraphLayout(Object... roots) |
Modifier and Type | Method and Description |
---|---|
GraphLayout |
add(GraphLayout another)
Add another layout data to the current one.
|
SortedSet<Long> |
addresses()
Answer the set of addresses for the discovered objects
|
long |
endAddress()
Answer the ending address of observed memory chunk
|
Multiset<Class<?>> |
getClassCounts()
Answer the class counts
|
Set<Class<?>> |
getClasses()
Answer the set of observed classes
|
Multiset<Class<?>> |
getClassSizes()
Answer the class sizes.
|
static GraphLayout |
parseInstance(Object... roots)
Parse the object graph starting from the given instance.
|
GraphPathRecord |
record(long address)
Get the object descriptor for the given address
|
long |
startAddress()
Answer the starting address of observed memory chunk
|
GraphLayout |
subtract(GraphLayout another)
Subtract another layout data from the current one.
|
String |
toFootprint()
Get the stringly representation of footprint table
|
void |
toImage(String fileName)
Put the graphical representation of object graph into the file.
|
String |
toPrintable()
Get the stringly representation of object graph
|
long |
totalCount()
Answer the total instance count
|
long |
totalSize()
Answer the total instance footprint
|
public GraphLayout(Object... roots)
public static GraphLayout parseInstance(Object... roots)
roots
- root instances to start frompublic GraphLayout subtract(GraphLayout another)
another
- data objectpublic GraphLayout add(GraphLayout another)
another
- data objectpublic Multiset<Class<?>> getClassSizes()
public Multiset<Class<?>> getClassCounts()
public Set<Class<?>> getClasses()
public long totalCount()
public long totalSize()
public long startAddress()
public long endAddress()
public SortedSet<Long> addresses()
record(long)
public GraphPathRecord record(long address)
address
- addresspublic String toFootprint()
public String toPrintable()
public void toImage(String fileName) throws IOException
fileName
- filenameIOException
- when I/O failsCopyright © 2020. All rights reserved.