public final class SanityDataTable extends SimpleHashtable
This class is not thread safe.
| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
SanityDataTable(RawPageSpace rps,
int logSize)
Create a new data table of a specified size.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
acquireTable, contains, getEntry, getFirst, getKey, getNext, getPayloadAddress, getPayloadAddress, isValid, releaseTable, replaceKeyprivate 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
public SanityDataTable(RawPageSpace rps, int logSize)
rps - The space to acquire the data structure from.logSize - The log of the number of table entries.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 entrypublic static int getRootRC(Address entry)
entry - The entrypublic static int getRC(Address entry)
entry - The entrypublic static ObjectReference getObjectReference(Address entry)
entry - The entrypublic 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?