java.lang.Object
com.ibm.j9ddr.vm29.j9.gc.GCHeapMap
- Direct Known Subclasses:
GCMarkMap
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected VoidPointer
protected com.ibm.j9ddr.vm29.pointer.generated.MM_HeapMapPointer
protected UDATA
protected UDATAPointer
protected UDATA
protected UDATA
protected VoidPointer
protected UDATA
static final long
static final long
static final UDATA
static final UDATA
static final UDATA
static final UDATA
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic GCHeapMap
from()
static GCHeapMap
fromHeapMap
(com.ibm.j9ddr.vm29.pointer.generated.MM_HeapMapPointer heapMap) com.ibm.j9ddr.vm29.pointer.generated.MM_HeapMapPointer
int
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.queryObject
(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) Query the mark map to see if the specified object is found.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 Details
-
J9BITS_BITS_IN_SLOT
public static final long J9BITS_BITS_IN_SLOT -
BITS_IN_BYTES
public static final long BITS_IN_BYTES- See Also:
-
J9MODRON_HEAP_SLOTS_PER_HEAPMAP_SLOT
-
J9MODRON_HEAP_BYTES_PER_HEAPMAP_BIT
-
J9MODRON_HEAP_BYTES_PER_HEAPMAP_BYTE
-
J9MODRON_HEAP_BYTES_PER_HEAPMAP_SLOT
-
_heapMap
protected com.ibm.j9ddr.vm29.pointer.generated.MM_HeapMapPointer _heapMap -
_heapBase
-
_heapTop
-
_heapMapBits
-
_maxOffset
-
_heapMapIndexShift
-
_heapMapBitMask
-
_heapMapBitShift
-
-
Constructor Details
-
GCHeapMap
public GCHeapMap(com.ibm.j9ddr.vm29.pointer.generated.MM_HeapMapPointer heapMap) throws CorruptDataException - Throws:
CorruptDataException
-
-
Method Details
-
from
- 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
-
getHeapMapBits
-
getHeapTop
-
getObjectGrain
public int getObjectGrain() -
getPageSize
public int getPageSize(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) -
getSlotIndexAndMask
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
-