|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mmtk.plan.refcount.RCHeader
public class RCHeader
Field Summary | |
---|---|
static Word |
BEING_LOGGED
|
static int |
BITS_USED
Current not using any bits for cycle detection, etc |
static int |
DEC_ALIVE
|
static int |
DEC_KILL
|
static Word |
DOUBLE_INCREMENT
|
static int |
GC_HEADER_WORDS_REQUIRED
|
static int |
GLOBAL_GC_BITS_REQUIRED
|
static int |
INC_NEW
|
static int |
INC_OLD
|
static Word |
INCREMENT
|
static int |
INCREMENT_SHIFT
|
static Word |
LIVE_THRESHOLD
|
static int |
LOCAL_GC_BITS_REQUIRED
|
static int |
LOG_BIT
|
static Word |
LOGGED
|
static Word |
LOGGING_MASK
|
static int |
MARK_BIT
The mark bit used for backup tracing. |
static Word |
MARK_BIT_MASK
|
static int |
NEW_BIT
The bit used for newly allocated objects. |
static Word |
NEW_BIT_MASK
|
static Word |
READ_MASK
|
static Word |
refSticky
|
static int |
refStickyValue
|
static Word |
UNLOGGED
|
static Word |
WRITE_MASK
|
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 int |
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. |
static int |
initRC(ObjectReference object)
Initialize the reference count of an object. |
private static boolean |
isHeaderMarked(Word header)
Has this object been marked by the most recent backup trace. |
private static boolean |
isHeaderNew(Word header)
Has this object been marked as new. |
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 |
isNew(ObjectReference object)
Has this object been marked as new. |
private static boolean |
isStuck(Word value)
Has this object been stuck |
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 int |
remainRC(ObjectReference object)
Retain the reference count of an object. |
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 int MARK_BIT
public static final Word MARK_BIT_MASK
public static final int NEW_BIT
public static final Word NEW_BIT_MASK
public static final int BITS_USED
public static final int INCREMENT_SHIFT
public static final Word INCREMENT
public static final Word DOUBLE_INCREMENT
public static final Word LIVE_THRESHOLD
public static final int DEC_KILL
public static final int DEC_ALIVE
public static final int INC_OLD
public static final int INC_NEW
public static final Word refSticky
public static final int refStickyValue
public static final Word WRITE_MASK
public static final Word READ_MASK
Constructor Detail |
---|
public RCHeader()
Method Detail |
---|
public static boolean logRequired(ObjectReference object)
true
if 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
object
was 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)
true
if the mark was performed.
public static boolean isNew(ObjectReference object)
private static boolean isHeaderNew(Word header)
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)
true
if given object is live
object
- The object whose liveness is to be tested
true
if the object is alivepublic static int getRC(ObjectReference object)
object
- The object whose liveness is to be tested
true
if the object is alivepublic static int incRC(ObjectReference object)
INC_OLD
if the object is not new,
INC_NEW
if the object is new.
object
- The object whose RC is to be incremented.
INC_OLD
if the object is not new,
INC_NEW
if the object is new.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.public static int initRC(ObjectReference object)
INC_OLD
if the object is not new,
INC_NEW
if the object is new.
object
- The object whose RC is to be initialized.
INC_OLD
if the object is not new,
INC_NEW
if the object is new.public static int remainRC(ObjectReference object)
INC_OLD
if the object is not new,
INC_NEW
if the object is new.
object
- The object whose RC is to be retained.
INC_OLD
if the object is not new,
INC_NEW
if the object is new.private static boolean isStuck(Word value)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |