Class LinearDumper
java.lang.Object
com.ibm.j9ddr.vm29.tools.ddrinteractive.LinearDumper
- All Implemented Interfaces:
IClassWalkCallbacks
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Private class used to store the regions.static class
Nested classes/interfaces declared in interface com.ibm.j9ddr.vm29.tools.ddrinteractive.IClassWalkCallbacks
IClassWalkCallbacks.SlotType
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addRegion
(StructurePointer clazz, IClassWalkCallbacks.SlotType type, AbstractPointer slotPtr, String slotName, long length, boolean computePadding) void
addSection
(StructurePointer clazz, AbstractPointer address, long length, String name, boolean computePadding) It is a high level section of an object walked.void
addSlot
(StructurePointer clazz, IClassWalkCallbacks.SlotType type, AbstractPointer slotPtr, String slotName) The information of one slot is sent back.void
addSlot
(StructurePointer clazz, IClassWalkCallbacks.SlotType type, AbstractPointer slotPtr, String slotName, String additionalInfo) The information of one slot is sent back.void
gatherLayoutInfo
(PrintStream out, ClassWalker classWalker, long nestingThreshold) Prints a class in a linear way to the PrintStreamgetAllRegions
(ClassWalker classWalker) Returns a tree of regions and slots.static void
printAllRegions
(PrintStream out, StructurePointer clazz, long nestingThreshold, LinearDumper.J9ClassRegionNode regionNode, int nesting)
-
Constructor Details
-
LinearDumper
public LinearDumper()
-
-
Method Details
-
addSlot
public void addSlot(StructurePointer clazz, IClassWalkCallbacks.SlotType type, AbstractPointer slotPtr, String slotName) throws CorruptDataException Description copied from interface:IClassWalkCallbacks
The information of one slot is sent back.- Specified by:
addSlot
in interfaceIClassWalkCallbacks
- Parameters:
clazz
- the object walkedtype
- the type of the slot, it is a com.ibm.j9ddr.vm29.tools.ddrinteractive.TypeslotPtr
- an AbstractPointer of the slot currently walkedslotName
-- Throws:
CorruptDataException
-
addSlot
public void addSlot(StructurePointer clazz, IClassWalkCallbacks.SlotType type, AbstractPointer slotPtr, String slotName, String additionalInfo) throws CorruptDataException Description copied from interface:IClassWalkCallbacks
The information of one slot is sent back.- Specified by:
addSlot
in interfaceIClassWalkCallbacks
- Parameters:
clazz
- the object walkedtype
- the type of the slot, it is a com.ibm.j9ddr.vm29.tools.ddrinteractive.TypeslotPtr
- an AbstractPointer of the slot currently walkedslotName
-additionalInfo
-- Throws:
CorruptDataException
-
addRegion
public void addRegion(StructurePointer clazz, IClassWalkCallbacks.SlotType type, AbstractPointer slotPtr, String slotName, long length, boolean computePadding) throws CorruptDataException - Throws:
CorruptDataException
-
addSection
public void addSection(StructurePointer clazz, AbstractPointer address, long length, String name, boolean computePadding) throws CorruptDataException Description copied from interface:IClassWalkCallbacks
It is a high level section of an object walked. If two sections have the same address, they will be nested- Specified by:
addSection
in interfaceIClassWalkCallbacks
- Parameters:
clazz
- the object walkedaddress
- starting address of the sectionlength
- length of the sectionname
-computePadding
- If true, compute the padding before and after this section- Throws:
CorruptDataException
-
getAllRegions
public LinearDumper.J9ClassRegionNode getAllRegions(ClassWalker classWalker) throws CorruptDataException Returns a tree of regions and slots. Each slot is under a region. The root element is always null.- Parameters:
classWalker
-- Returns:
- J9ClassRegionNode tree of J9ClassRegion
- Throws:
CorruptDataException
-
gatherLayoutInfo
public void gatherLayoutInfo(PrintStream out, ClassWalker classWalker, long nestingThreshold) throws CorruptDataException Prints a class in a linear way to the PrintStream- Parameters:
out
-classWalker
- an instance of a IClassWalkernestingThreshold
- the level of detail. Level 1 prints the sections and the sizes. Level 2 prints more details.- Throws:
CorruptDataException
-
printAllRegions
public static void printAllRegions(PrintStream out, StructurePointer clazz, long nestingThreshold, LinearDumper.J9ClassRegionNode regionNode, int nesting) throws CorruptDataException - Throws:
CorruptDataException
-