public class ObjectHeader extends Object
Modifier and Type | Field and Description |
---|---|
(package private) static int |
AVAILABLE_LOCAL_BITS
number of header bits we may use
|
static int |
GC_HEADER_WORDS_REQUIRED |
static int |
GLOBAL_GC_BITS_REQUIRED |
static int |
LOCAL_GC_BITS_REQUIRED |
private static byte |
MARK_AND_FORWARDING_MASK |
private static int |
MARK_BASE |
static byte |
MARK_BASE_VALUE |
private static byte |
MARK_INCREMENT |
static byte |
MARK_MASK |
(package private) static int |
MAX_MARKCOUNT_BITS |
(package private) static byte |
NEW_OBJECT_MARK |
static byte |
PINNED_BIT |
static int |
PINNED_BIT_NUMBER |
static byte |
STRADDLE_BIT |
private static int |
STRADDLE_BIT_NUMBER |
Constructor and Description |
---|
ObjectHeader() |
Modifier and Type | Method and Description |
---|---|
(package private) static byte |
deltaMarkState(byte state,
boolean increment)
Return the mark state incremented or decremented by one.
|
(package private) static boolean |
isMatureObject(ObjectReference object) |
(package private) static boolean |
isNewObject(ObjectReference object) |
(package private) static boolean |
isPinnedObject(ObjectReference object) |
(package private) static boolean |
isStraddlingObject(ObjectReference object) |
(package private) static void |
markAsStraddling(ObjectReference object) |
static void |
pinObject(ObjectReference object) |
(package private) static void |
returnToPriorStateAndEnsureUnlogged(ObjectReference object,
byte status) |
(package private) static void |
setMarkStateUnlogAndUnlock(ObjectReference object,
byte gcByte,
byte markState) |
(package private) static byte |
testAndMark(ObjectReference object,
byte markState)
Non-atomically test and set the mark bit of an object.
|
(package private) static boolean |
testMarkState(byte gcByte,
byte value) |
(package private) static boolean |
testMarkState(ObjectReference object,
byte value)
Return
true if the mark count for an object has the given value. |
(package private) static void |
writeMarkState(ObjectReference object,
byte markState,
boolean straddle)
Write the allocState into the mark state fields of an object non-atomically.
|
static final int AVAILABLE_LOCAL_BITS
public static final int LOCAL_GC_BITS_REQUIRED
public static final int GLOBAL_GC_BITS_REQUIRED
public static final int GC_HEADER_WORDS_REQUIRED
static final byte NEW_OBJECT_MARK
public static final int PINNED_BIT_NUMBER
public static final byte PINNED_BIT
private static final int STRADDLE_BIT_NUMBER
public static final byte STRADDLE_BIT
private static final int MARK_BASE
static final int MAX_MARKCOUNT_BITS
private static final byte MARK_INCREMENT
public static final byte MARK_MASK
private static final byte MARK_AND_FORWARDING_MASK
public static final byte MARK_BASE_VALUE
public ObjectHeader()
static byte testAndMark(ObjectReference object, byte markState)
object
- The object whose mark bit is to be writtenmarkState
- The value to which the mark bits will be setstatic void setMarkStateUnlogAndUnlock(ObjectReference object, byte gcByte, byte markState)
static boolean testMarkState(ObjectReference object, byte value)
true
if the mark count for an object has the given value.object
- The object whose mark bit is to be testedvalue
- The value against which the mark bit will be testedtrue
if the mark bit for the object has the given value.static boolean testMarkState(byte gcByte, byte value)
static boolean isNewObject(ObjectReference object)
static boolean isMatureObject(ObjectReference object)
static void markAsStraddling(ObjectReference object)
static boolean isStraddlingObject(ObjectReference object)
public static void pinObject(ObjectReference object)
static boolean isPinnedObject(ObjectReference object)
static void writeMarkState(ObjectReference object, byte markState, boolean straddle)
object
- The object whose mark state is to be writtenmarkState
- TODO: what am I?straddle
- TODO: what am I?static void returnToPriorStateAndEnsureUnlogged(ObjectReference object, byte status)
static byte deltaMarkState(byte state, boolean increment)
state
- the mark stateincrement
- If true
, then return the incremented value else return the decremented value