org.openjdk.jol.info
Class GraphLayout

java.lang.Object
  extended by org.openjdk.jol.info.GraphLayout

public class GraphLayout
extends Object

Holds the object graph layout info.


Constructor Summary
GraphLayout(Object root)
           
 
Method Summary
 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 root)
          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
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphLayout

public GraphLayout(Object root)
Method Detail

parseInstance

public static GraphLayout parseInstance(Object root)
Parse the object graph starting from the given instance.

Parameters:
root - root instance to start from
Returns:
object graph

getClassSizes

public Multiset<Class<?>> getClassSizes()
Answer the class sizes.

Returns:
class sizes multiset

getClassCounts

public Multiset<Class<?>> getClassCounts()
Answer the class counts

Returns:
class counts multiset

getClasses

public Set<Class<?>> getClasses()
Answer the set of observed classes

Returns:
observed classes set

totalCount

public long totalCount()
Answer the total instance count

Returns:
total instance count

totalSize

public long totalSize()
Answer the total instance footprint

Returns:
total instance footprint, bytes

startAddress

public long startAddress()
Answer the starting address of observed memory chunk

Returns:
starting address

endAddress

public long endAddress()
Answer the ending address of observed memory chunk

Returns:
ending address

addresses

public SortedSet<Long> addresses()
Answer the set of addresses for the discovered objects

Returns:
sorted set of addresses
See Also:
record(long)

record

public GraphPathRecord record(long address)
Get the object descriptor for the given address

Parameters:
address - address
Returns:
object descriptor

toFootprint

public String toFootprint()
Get the stringly representation of footprint table

Returns:
footprint table

toPrintable

public String toPrintable()
Get the stringly representation of object graph

Returns:
linearized text form of object graph

toImage

public void toImage(String fileName)
             throws IOException
Put the graphical representation of object graph into the file.

Parameters:
fileName - filename
Throws:
IOException


Copyright © 2013. All Rights Reserved.