|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mmtk.utility.SimpleHashtable org.mmtk.utility.sanitychecker.SanityDataTable
public final class SanityDataTable
This class implements a simple hashtable to store and retrieve per object information for sanity checking.
This class is not thread safe.
Field Summary | |
---|---|
private static int |
NORMAL_RC_BITS
The number of bits for the normal reference count |
private static int |
NORMAL_RC_INC
The increment to use for normal increments |
private static int |
NORMAL_RC_MASK
The mask for the normal reference count |
private static int |
ROOT_RC_INC
The increment to use for root increments |
private static int |
ROOT_RC_SHIFT
The shift for the root reference count |
Constructor Summary | |
---|---|
SanityDataTable(RawPageSpace rps,
int logSize)
Create a new data table of a specified size. |
Method Summary | |
---|---|
void |
forwardTable(TraceLocal trace)
Forward data table using the supplied trace. |
Address |
getEntry(ObjectReference object,
boolean create)
Get an entry for an object. |
static int |
getNormalRC(Address entry)
Given an address of an entry, read the reference count, excluding root references. |
static ObjectReference |
getObjectReference(Address entry)
Given an address of an entry, read the reference component. |
static int |
getRC(Address entry)
Given an address of an entry, read the total reference count. |
static int |
getRootRC(Address entry)
Given an address of an entry, read the root reference count. |
static boolean |
incRC(Address entry,
boolean root)
Increment the data word for an object. |
void |
pushNotInOther(SanityDataTable other,
ObjectReferenceDeque deque)
Push any entries that are only in this table, and not the passed table. |
Methods inherited from class org.mmtk.utility.SimpleHashtable |
---|
acquireTable, contains, getEntry, getFirst, getKey, getNext, getPayloadAddress, getPayloadAddress, isValid, releaseTable, replaceKey |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final int NORMAL_RC_BITS
private static final int NORMAL_RC_MASK
private static final int ROOT_RC_SHIFT
private static final int NORMAL_RC_INC
private static final int ROOT_RC_INC
Constructor Detail |
---|
public SanityDataTable(RawPageSpace rps, int logSize)
rps
- The space to acquire the data structure from.logSize
- The log of the number of table entries.Method Detail |
---|
public static boolean incRC(Address entry, boolean root)
entry
- The table entry.root
- True if this is a root reference.
public void pushNotInOther(SanityDataTable other, ObjectReferenceDeque deque)
other
- The table to use for comparison.deque
- The buffer to push results onto.public static int getNormalRC(Address entry)
entry
- The entry
public static int getRootRC(Address entry)
entry
- The entry
public static int getRC(Address entry)
entry
- The entry
public static ObjectReference getObjectReference(Address entry)
entry
- The entry
public void forwardTable(TraceLocal trace)
trace
- The trace to use.public Address getEntry(ObjectReference object, boolean create)
object
- The object to find an entry for.create
- Create an entry if none exists?
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |