- java.lang.Object
-
- com.ibm.j9ddr.vm29.j9.gc.GCHeapMap
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GCHeapMap.MarkedObject
-
Field Summary
Fields Modifier and Type Field Description protected VoidPointer
_heapBase
protected com.ibm.j9ddr.vm29.pointer.generated.MM_HeapMapPointer
_heapMap
protected UDATA
_heapMapBitMask
protected UDATAPointer
_heapMapBits
protected UDATA
_heapMapBitShift
protected UDATA
_heapMapIndexShift
protected VoidPointer
_heapTop
protected UDATA
_maxOffset
static long
BITS_IN_BYTES
static long
J9BITS_BITS_IN_SLOT
static UDATA
J9MODRON_HEAP_BYTES_PER_HEAPMAP_BIT
static UDATA
J9MODRON_HEAP_BYTES_PER_HEAPMAP_BYTE
static UDATA
J9MODRON_HEAP_BYTES_PER_HEAPMAP_SLOT
static UDATA
J9MODRON_HEAP_SLOTS_PER_HEAPMAP_SLOT
-
Constructor Summary
Constructors Constructor Description GCHeapMap(com.ibm.j9ddr.vm29.pointer.generated.MM_HeapMapPointer heapMap)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GCHeapMap
from()
static GCHeapMap
fromHeapMap(com.ibm.j9ddr.vm29.pointer.generated.MM_HeapMapPointer heapMap)
VoidPointer
getHeapBase()
com.ibm.j9ddr.vm29.pointer.generated.MM_HeapMapPointer
getHeapMap()
UDATAPointer
getHeapMapBits()
VoidPointer
getHeapTop()
int
getObjectGrain()
int
getPageSize(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object)
UDATA[]
getSlotIndexAndMask(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object)
Return the index into the heap map bits array and the bitmask to use.boolean
isBitSet(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer address)
Check if a bit is set in the GCHeapMapprotected boolean
isBitSetNoCheck(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object)
Check if a bit is set without checking the pointer.boolean
isMarked(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer address)
Check if a bit is set in the GCHeapMap.GCHeapMap.MarkedObject
queryObject(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object)
Query the mark map to see if the specified object is found.GCHeapMap.MarkedObject[]
queryRange(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer base, com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer top)
Query the mark map to see what objects are marked within the specified range.
-
-
-
Field Detail
-
J9BITS_BITS_IN_SLOT
public static final long J9BITS_BITS_IN_SLOT
-
BITS_IN_BYTES
public static final long BITS_IN_BYTES
- See Also:
- Constant Field Values
-
J9MODRON_HEAP_SLOTS_PER_HEAPMAP_SLOT
public static final UDATA J9MODRON_HEAP_SLOTS_PER_HEAPMAP_SLOT
-
J9MODRON_HEAP_BYTES_PER_HEAPMAP_BIT
public static final UDATA J9MODRON_HEAP_BYTES_PER_HEAPMAP_BIT
-
J9MODRON_HEAP_BYTES_PER_HEAPMAP_BYTE
public static final UDATA J9MODRON_HEAP_BYTES_PER_HEAPMAP_BYTE
-
J9MODRON_HEAP_BYTES_PER_HEAPMAP_SLOT
public static final UDATA J9MODRON_HEAP_BYTES_PER_HEAPMAP_SLOT
-
_heapMap
protected com.ibm.j9ddr.vm29.pointer.generated.MM_HeapMapPointer _heapMap
-
_heapBase
protected VoidPointer _heapBase
-
_heapTop
protected VoidPointer _heapTop
-
_heapMapBits
protected UDATAPointer _heapMapBits
-
_maxOffset
protected UDATA _maxOffset
-
_heapMapIndexShift
protected UDATA _heapMapIndexShift
-
_heapMapBitMask
protected UDATA _heapMapBitMask
-
_heapMapBitShift
protected UDATA _heapMapBitShift
-
-
Constructor Detail
-
GCHeapMap
public GCHeapMap(com.ibm.j9ddr.vm29.pointer.generated.MM_HeapMapPointer heapMap) throws CorruptDataException
- Throws:
CorruptDataException
-
-
Method Detail
-
from
public static GCHeapMap from() throws CorruptDataException
- Throws:
CorruptDataException
-
fromHeapMap
public static GCHeapMap fromHeapMap(com.ibm.j9ddr.vm29.pointer.generated.MM_HeapMapPointer heapMap) throws CorruptDataException
- Throws:
CorruptDataException
-
getHeapMap
public com.ibm.j9ddr.vm29.pointer.generated.MM_HeapMapPointer getHeapMap()
-
getHeapBase
public VoidPointer getHeapBase()
-
getHeapMapBits
public UDATAPointer getHeapMapBits()
-
getHeapTop
public VoidPointer getHeapTop()
-
getObjectGrain
public int getObjectGrain()
-
getPageSize
public int getPageSize(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object)
-
getSlotIndexAndMask
public UDATA[] getSlotIndexAndMask(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object)
Return the index into the heap map bits array and the bitmask to use.- Parameters:
object
-- Returns:
- an array containing the slot index and bit mask
-
isBitSet
public boolean isBitSet(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer address) throws CorruptDataException
Check if a bit is set in the GCHeapMap- Parameters:
address
- Must be a pointer into the heap. The pointer must point to committed heap memory.- Returns:
- True if the bit is set. False otherwise.
- Throws:
CorruptDataException
-
isMarked
public boolean isMarked(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer address) throws CorruptDataException
Check if a bit is set in the GCHeapMap. Differs from isBitSet(J9Object) in that it will return true if the address is not in the heap.- Parameters:
address
- An address. If the address is not in the Heap, will return True.- Returns:
- True if the bit is set. True if the address of the object is not in the heap. False otherwise.
- Throws:
CorruptDataException
-
isBitSetNoCheck
protected boolean isBitSetNoCheck(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) throws CorruptDataException
Check if a bit is set without checking the pointer. Will throw an exception if the pointer is forces HeapMap to read from uncommitted memory.- Parameters:
object
-- Throws:
CorruptDataException
-
queryObject
public GCHeapMap.MarkedObject queryObject(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) throws CorruptDataException
Query the mark map to see if the specified object is found. If so return a MarkedObject describing it, otherwise null.- Parameters:
object
- The object to query- Returns:
- A MarkedObject, or null
- Throws:
CorruptDataException
-
queryRange
public GCHeapMap.MarkedObject[] queryRange(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer base, com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer top) throws CorruptDataException
Query the mark map to see what objects are marked within the specified range. Return an array of MarkedObject records describing each entry found.- Parameters:
base
- Bottom of the range to query (inclusive)top
- Top of the range to query (exclusive)- Returns:
- A MarkedObject[] containing the results
- Throws:
CorruptDataException
-
-