|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.mmtk.plan.refcount.RCHeader
public class RCHeader
| Field Summary | |
|---|---|
static int |
AVAILABLE_BITS
|
static Word |
BEING_LOGGED
|
static int |
BITS_USED
|
static int |
DEC_ALIVE
|
static int |
DEC_KILL
|
static int |
GC_HEADER_WORDS_REQUIRED
|
static int |
GLOBAL_GC_BITS_REQUIRED
|
static Word |
INCREMENT
|
static Word |
INCREMENT_LIMIT
|
static int |
INCREMENT_SHIFT
|
static Word |
LIVE_THRESHOLD
|
static int |
LOCAL_GC_BITS_REQUIRED
|
static int |
LOG_BIT
Object Logging (applies to *all* objects) |
static Word |
LOGGED
|
static Word |
LOGGING_MASK
|
static int |
MARK_BIT
|
static Word |
MARK_BIT_MASK
|
static Offset |
RC_HEADER_OFFSET
RC header word |
static int |
RESERVED_ALIGN_BIT
|
static Word |
UNLOGGED
|
| Constructor Summary | |
|---|---|
RCHeader()
|
|
| Method Summary | |
|---|---|
static boolean |
attemptToLog(ObjectReference object)
Attempt to log object for coalescing RC. |
static void |
clearMarked(ObjectReference object)
Has this object been marked by the most recent backup trace. |
static int |
decRC(ObjectReference object)
Decrement the reference count of an object. |
static int |
getRC(ObjectReference object)
Return the reference count for the object. |
static void |
incRC(ObjectReference object)
Increment the reference count of an object. |
static void |
initializeHeader(ObjectReference object,
boolean initialInc)
Perform any required initialization of the GC portion of the header. |
private static boolean |
isHeaderMarked(Word header)
Has this object been marked by the most recent backup trace. |
static boolean |
isLiveRC(ObjectReference object)
Return true if given object is live |
static boolean |
isMarked(ObjectReference object)
Has this object been marked by the most recent backup trace. |
static boolean |
logRequired(ObjectReference object)
Return true if object is yet to be logged (for
coalescing RC). |
static void |
makeLogged(ObjectReference object)
Signify completion of logging object. |
static void |
makeUnlogged(ObjectReference object)
Change object's state to UNLOGGED. |
static boolean |
testAndMark(ObjectReference object)
Attempt to atomically mark this object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int LOCAL_GC_BITS_REQUIRED
public static final int GLOBAL_GC_BITS_REQUIRED
public static final int GC_HEADER_WORDS_REQUIRED
public static final int LOG_BIT
public static final Word LOGGED
public static final Word UNLOGGED
public static final Word BEING_LOGGED
public static final Word LOGGING_MASK
public static final Offset RC_HEADER_OFFSET
public static final int RESERVED_ALIGN_BIT
public static final int MARK_BIT
public static final Word MARK_BIT_MASK
public static final int BITS_USED
public static final int INCREMENT_SHIFT
public static final Word INCREMENT
public static final int AVAILABLE_BITS
public static final Word INCREMENT_LIMIT
public static final Word LIVE_THRESHOLD
public static final int DEC_KILL
public static final int DEC_ALIVE
| Constructor Detail |
|---|
public RCHeader()
| Method Detail |
|---|
public static boolean logRequired(ObjectReference object)
object is yet to be logged (for
coalescing RC).
object - The object in question
true if object needs to be logged.public static boolean attemptToLog(ObjectReference object)
object for coalescing RC. This is
used to handle a race to log the object, and returns
true if we are to log the object and
false if we lost the race to log the object.
If this method returns true, it leaves the object
in the BEING_LOGGED state. It is the responsibility
of the caller to change the object to LOGGED once
the logging is complete.
object - The object in question
true if the race to log
objectwas won.makeLogged(ObjectReference)public static void makeLogged(ObjectReference object)
object.
object is left in the LOGGED state.
object - The object whose state is to be changed.attemptToLog(ObjectReference)public static void makeUnlogged(ObjectReference object)
object's state to UNLOGGED.
object - The object whose state is to be changed.public static boolean isMarked(ObjectReference object)
public static void clearMarked(ObjectReference object)
private static boolean isHeaderMarked(Word header)
public static boolean testAndMark(ObjectReference object)
public static void initializeHeader(ObjectReference object,
boolean initialInc)
object - the objectinitialInc - start with a reference count of 1 (0 if false)public static boolean isLiveRC(ObjectReference object)
object - The object whose liveness is to be tested
public static int getRC(ObjectReference object)
object - The object whose liveness is to be tested
public static void incRC(ObjectReference object)
object - The object whose reference count is to be incremented.public static int decRC(ObjectReference object)
DEC_KILL if the count went to zero,
DEC_ALIVE if the count did not go to zero.
object - The object whose RC is to be decremented.
DEC_KILL if the count went to zero,
DEC_ALIVE if the count did not go to zero.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||