Class GCObjectModel
java.lang.Object
com.ibm.j9ddr.vm29.j9.gc.GCBase
com.ibm.j9ddr.vm29.j9.gc.GCObjectModel
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.ibm.j9ddr.vm29.j9.gc.GCArrayObjectModelprotected com.ibm.j9ddr.vm29.j9.gc.GCMixedObjectModel - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionabstract UDATAadjustSizeInBytes(UDATA sizeInBytes) Object size should be at least minimumConsumedSize and 8 byte aligned.static GCObjectModelfrom()Factory method to construct an appropriate object model.abstract U32getAge(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) Returns the age of an object.abstract UDATAgetClassShape(com.ibm.j9ddr.vm29.pointer.generated.J9ClassPointer clazz) Returns the shape of a class.abstract UDATAgetClassShape(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) Returns the shape of an object.abstract UDATAgetConsumedSizeInBytesWithHeader(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) Same as getSizeInBytesWithHeader, except it takes into account object alignment and minimum object sizegetConsumedSizeInSlotsWithHeader(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) Same as getSizeInSlotsWithHeader, except it takes into account object alignment and minimum object sizegetDataSizeInBytes(com.ibm.j9ddr.vm29.pointer.generated.J9IndexableObjectPointer array) Returns the size of data in an indexable object, in bytes, including leaves, excluding the header.abstract VoidPointergetElementAddress(com.ibm.j9ddr.vm29.pointer.generated.J9IndexableObjectPointer indexableObjectPointer, int elementIndex, int elementSize) Returns the address of the element at elementIndex logical offset into indexableObjectPointer, assuming that each element is dataSize bytes.abstract UDATAgetHashcodeOffset(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) abstract UDATAgetHeaderSize(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) Returns the size of an object header, in bytes.abstract longReturns run-time object alignment in bytes.abstract I32getObjectHashCode(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) Determine the basic hash code for the specified object.abstract UDATAgetRememberedBits(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) Returns the collector bits from object's header.abstract longgetScanType(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) abstract UDATAgetSizeInBytesHoleObject(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) Returns the size in bytes of a hole object.abstract UDATAgetSizeInBytesMultiSlotHoleObject(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) Returns the size, in bytes, of a multi-slot hole object.abstract UDATAgetSizeInBytesSingleSlotHoleObject(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) Returns the size, in bytes, of a single slot hole object.abstract UDATAgetSizeInBytesWithHeader(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) Returns the size of an object, in bytes, including the header.abstract UDATAgetSizeInElements(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) Returns the size of an indexable object in elements.getSizeInSlotsWithHeader(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) Returns the size of an object, in slots, including the header.abstract UDATAgetTotalFootprintInBytesWithHeader(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) Get the total footprint of an object, in bytes, including the object header and all data.abstract booleanhasBeenHashed(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) Returns TRUE if an object has been hashed, FALSE otherwise.abstract booleanhasBeenMoved(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) Returns TRUE if an object has been moved after being hashed, FALSE otherwise.booleanhasCorrectDataAddrPointer(com.ibm.j9ddr.vm29.pointer.generated.J9IndexableObjectPointer arrayPtr) Determine the validity of the data address belonging to arrayPtr.abstract booleanisDarkMatterObject(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) Returns TRUE if an object is dark matter, FALSE otherwise.abstract booleanisHoleObject(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) Returns TRUE if an object is a hole, FALSE otherwise.abstract booleanisIndexable(com.ibm.j9ddr.vm29.pointer.generated.J9ClassPointer clazz) Returns TRUE if an class is indexable, FALSE otherwise.abstract booleanisIndexable(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) Returns TRUE if an object is indexable, FALSE otherwise.booleanisInlineContiguousArraylet(com.ibm.j9ddr.vm29.pointer.generated.J9IndexableObjectPointer arrayPtr) abstract booleanisOld(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) Returns TRUE if an object is old, FALSE otherwise.abstract booleanisRemembered(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) Returns TRUE if an object is remembered, FALSE otherwise.abstract booleanisSingleSlotHoleObject(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) Returns TRUE if an object is a single slot hole object, FALSE otherwise.Methods declared in class GCBase
getExtensions, getJavaVM 
- 
Field Details
- 
mixedObjectModel
protected com.ibm.j9ddr.vm29.j9.gc.GCMixedObjectModel mixedObjectModel - 
indexableObjectModel
protected com.ibm.j9ddr.vm29.j9.gc.GCArrayObjectModel indexableObjectModel 
 - 
 - 
Constructor Details
- 
GCObjectModel
- Throws:
 CorruptDataException
 
 - 
 - 
Method Details
- 
from
Factory method to construct an appropriate object model.- Parameters:
 structure- the J9JavaVM structure to use- Returns:
 - an instance of ObjectModel
 - Throws:
 CorruptDataException
 - 
adjustSizeInBytes
 - 
getClassShape
public abstract UDATA getClassShape(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) throws CorruptDataException Returns the shape of an object.- Parameters:
 object- Pointer to object whose shape is required.- Returns:
 - The shape of the object
 - Throws:
 CorruptDataException
 - 
getClassShape
public abstract UDATA getClassShape(com.ibm.j9ddr.vm29.pointer.generated.J9ClassPointer clazz) throws CorruptDataException Returns the shape of a class.- Parameters:
 clazz- Pointer to J9ClassPointer whose shape is required.- Returns:
 - The shape of the class
 - Throws:
 CorruptDataException
 - 
isIndexable
public abstract boolean isIndexable(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) throws CorruptDataException Returns TRUE if an object is indexable, FALSE otherwise.- Parameters:
 object- Pointer to an object- Returns:
 - TRUE if an object is indexable, FALSE otherwise
 - Throws:
 CorruptDataException
 - 
isIndexable
public abstract boolean isIndexable(com.ibm.j9ddr.vm29.pointer.generated.J9ClassPointer clazz) throws CorruptDataException Returns TRUE if an class is indexable, FALSE otherwise.- Parameters:
 clazz- Pointer to an J9Class- Returns:
 - TRUE if an class is indexable, FALSE otherwise
 - Throws:
 CorruptDataException
 - 
isHoleObject
public abstract boolean isHoleObject(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) throws CorruptDataException Returns TRUE if an object is a hole, FALSE otherwise.- Parameters:
 object- Pointer to an object- Returns:
 - TRUE if an object is a hole, FALSE otherwise
 - Throws:
 CorruptDataException
 - 
isSingleSlotHoleObject
public abstract boolean isSingleSlotHoleObject(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) throws CorruptDataException Returns TRUE if an object is a single slot hole object, FALSE otherwise.- Parameters:
 object- Pointer to an object- Returns:
 - TRUE if an object is a single slot hole object, FALSE otherwise
 - Throws:
 CorruptDataException
 - 
getSizeInBytesMultiSlotHoleObject
public abstract UDATA getSizeInBytesMultiSlotHoleObject(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) throws CorruptDataException Returns the size, in bytes, of a multi-slot hole object.- Parameters:
 object- Pointer to an object- Returns:
 - The size, in bytes, of a multi-slot hole object
 - Throws:
 CorruptDataException
 - 
getSizeInBytesSingleSlotHoleObject
public abstract UDATA getSizeInBytesSingleSlotHoleObject(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) Returns the size, in bytes, of a single slot hole object.- Parameters:
 object- Pointer to an object- Returns:
 - The size, in bytes, of a single slot hole object
 
 - 
getObjectAlignmentInBytes
public abstract long getObjectAlignmentInBytes()Returns run-time object alignment in bytes.- Returns:
 - The alignment in bytes
 
 - 
getSizeInBytesHoleObject
public abstract UDATA getSizeInBytesHoleObject(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) throws CorruptDataException Returns the size in bytes of a hole object.- Parameters:
 object- Pointer to an object- Returns:
 - The size in bytes of a hole object
 - Throws:
 CorruptDataException
 - 
isDarkMatterObject
public abstract boolean isDarkMatterObject(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) throws CorruptDataException Returns TRUE if an object is dark matter, FALSE otherwise.- Parameters:
 object- Pointer to an object- Returns:
 - TRUE if an object is dark matter, FALSE otherwise
 - Throws:
 CorruptDataException
 - 
getSizeInBytesWithHeader
public abstract UDATA getSizeInBytesWithHeader(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) throws CorruptDataException Returns the size of an object, in bytes, including the header.- Parameters:
 object- Pointer to an object- Returns:
 - The size of an object, in bytes, including the header
 - Throws:
 CorruptDataException
 - 
getTotalFootprintInBytesWithHeader
public abstract UDATA getTotalFootprintInBytesWithHeader(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) throws CorruptDataException Get the total footprint of an object, in bytes, including the object header and all data. If the object has a discontiguous representation, this method should return the size of the root object plus the total of all the discontiguous parts of the object.- Parameters:
 object- Pointer to an object- Returns:
 - the total size of an object, in bytes, including discontiguous parts
 - Throws:
 CorruptDataException
 - 
getConsumedSizeInBytesWithHeader
public abstract UDATA getConsumedSizeInBytesWithHeader(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) throws CorruptDataException Same as getSizeInBytesWithHeader, except it takes into account object alignment and minimum object size- Parameters:
 object- Pointer to an object- Returns:
 - The consumed heap size of an object, in bytes, including the header
 - Throws:
 CorruptDataException
 - 
getSizeInSlotsWithHeader
public UDATA getSizeInSlotsWithHeader(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) throws CorruptDataException Returns the size of an object, in slots, including the header.- Parameters:
 object- Pointer to an object- Returns:
 - The size of an object, in slots, including the header
 - Throws:
 CorruptDataException
 - 
getConsumedSizeInSlotsWithHeader
public UDATA getConsumedSizeInSlotsWithHeader(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) throws CorruptDataException Same as getSizeInSlotsWithHeader, except it takes into account object alignment and minimum object size- Parameters:
 object- Pointer to an object- Returns:
 - The consumed heap size of an object, in slots, including the header
 - Throws:
 CorruptDataException
 - 
getAge
public abstract U32 getAge(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) throws CorruptDataException Returns the age of an object.- Parameters:
 object- Pointer to an object- Returns:
 - The age of the object
 - Throws:
 CorruptDataException
 - 
isRemembered
public abstract boolean isRemembered(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) throws CorruptDataException Returns TRUE if an object is remembered, FALSE otherwise.- Parameters:
 object- Pointer to an object- Returns:
 - TRUE if an object is remembered, FALSE otherwise
 - Throws:
 CorruptDataException
 - 
getRememberedBits
public abstract UDATA getRememberedBits(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) throws CorruptDataException Returns the collector bits from object's header.- Parameters:
 object- Pointer to an object- Returns:
 - collector bits
 - Throws:
 CorruptDataException
 - 
isOld
public abstract boolean isOld(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) throws CorruptDataException Returns TRUE if an object is old, FALSE otherwise.- Parameters:
 object- Pointer to an object- Returns:
 - TRUE if an object is in the old area, FALSE otherwise
 - Throws:
 CorruptDataException
 - 
getSizeInElements
public abstract UDATA getSizeInElements(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) throws IllegalArgumentException, CorruptDataException Returns the size of an indexable object in elements.- Parameters:
 array- Pointer to the indexable object whose size is required- Returns:
 - Size of object in elements
 - Throws:
 IllegalArgumentException- if the object is not an arrayCorruptDataException
 - 
getScanType
public abstract long getScanType(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) throws CorruptDataException - Throws:
 CorruptDataException
 - 
hasBeenHashed
public abstract boolean hasBeenHashed(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) throws CorruptDataException Returns TRUE if an object has been hashed, FALSE otherwise.- Parameters:
 object- Pointer to an object- Returns:
 - TRUE if an object has been hashed, FALSE otherwise
 - Throws:
 CorruptDataException
 - 
hasBeenMoved
public abstract boolean hasBeenMoved(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) throws CorruptDataException Returns TRUE if an object has been moved after being hashed, FALSE otherwise.- Parameters:
 object- Pointer to an object- Returns:
 - TRUE if an object has been moved after being hashed, FALSE otherwise
 - Throws:
 CorruptDataException
 - 
getObjectHashCode
public abstract I32 getObjectHashCode(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) throws CorruptDataException Determine the basic hash code for the specified object.- Parameters:
 object- [in] the object to be hashed- Returns:
 - the persistent, basic hash code for the object
 - Throws:
 CorruptDataException
 - 
getHashcodeOffset
public abstract UDATA getHashcodeOffset(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) throws CorruptDataException - Throws:
 CorruptDataException
 - 
getDataSizeInBytes
public UDATA getDataSizeInBytes(com.ibm.j9ddr.vm29.pointer.generated.J9IndexableObjectPointer array) throws CorruptDataException Returns the size of data in an indexable object, in bytes, including leaves, excluding the header.- Parameters:
 array- Pointer to the indexable object whose size is required- Returns:
 - The size of an object in bytes excluding the header
 - Throws:
 CorruptDataException
 - 
getHeaderSize
public abstract UDATA getHeaderSize(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer object) throws CorruptDataException Returns the size of an object header, in bytes.- Parameters:
 object- Pointer to an object- Returns:
 - The size of an object header, in bytes.
 - Throws:
 CorruptDataException
 - 
getElementAddress
public abstract VoidPointer getElementAddress(com.ibm.j9ddr.vm29.pointer.generated.J9IndexableObjectPointer indexableObjectPointer, int elementIndex, int elementSize) throws CorruptDataException Returns the address of the element at elementIndex logical offset into indexableObjectPointer, assuming that each element is dataSize bytes.- Parameters:
 indexableObjectPointer- The array from which we should look-up the addresselementIndex- The logical index number of the element within the arrayelementSize- The size, in bytes, of a single element of the array- Returns:
 - A pointer to the element
 - Throws:
 CorruptDataException
 - 
isInlineContiguousArraylet
public boolean isInlineContiguousArraylet(com.ibm.j9ddr.vm29.pointer.generated.J9IndexableObjectPointer arrayPtr) throws CorruptDataException - Parameters:
 arrayPtr- array object we are checking for isInlineContiguousArraylet- Throws:
 CorruptDataException- If there's a problem accessing the layout of the indexable object
 - 
hasCorrectDataAddrPointer
public boolean hasCorrectDataAddrPointer(com.ibm.j9ddr.vm29.pointer.generated.J9IndexableObjectPointer arrayPtr) throws CorruptDataException Determine the validity of the data address belonging to arrayPtr.- Parameters:
 arrayPtr- array object who's data address validity we are checking- Returns:
 - true if the data address of arrayPtr is valid, false otherwise
 - Throws:
 CorruptDataException- if there's a problem accessing the indexable object dataAddr field
 
 -