public final class SanityChecker extends Object
Modifier and Type | Field and Description |
---|---|
static int |
ALIVE |
Trace |
checkTrace |
(package private) SanityTraceLocal |
checkTraceLocal |
static long |
danglingReferenceCount |
static int |
DEAD |
static long |
liveObjectCount |
static int |
LOG_SANITY_DATA_SIZE |
static long |
nullReferenceCount |
private boolean |
preGCSanity |
static long |
referenceCount |
static long |
rootReferenceCount |
Trace |
rootTrace |
private SanityDataTable |
sanityTable |
private SanityLinearScan |
scanner |
static int |
UNSURE |
Constructor and Description |
---|
SanityChecker() |
Modifier and Type | Method and Description |
---|---|
boolean |
collectionPhase(int phaseId)
Perform any sanity checking collection phases.
|
static void |
dumpObjectInformation(ObjectReference object)
Print out object information (used for warning and error messages)
|
void |
processObject(TraceLocal trace,
ObjectReference object,
boolean root)
Process an object during sanity checking, validating data,
incrementing counters and enqueuing if this is the first
visit to the object.
|
void |
scanProcessObject(ObjectReference object)
Process an object during a linear scan of the heap.
|
public static long referenceCount
public static long rootReferenceCount
public static long danglingReferenceCount
public static long nullReferenceCount
public static long liveObjectCount
public static final int DEAD
public static final int ALIVE
public static final int UNSURE
public static final int LOG_SANITY_DATA_SIZE
public Trace checkTrace
private final SanityDataTable sanityTable
private boolean preGCSanity
final SanityTraceLocal checkTraceLocal
private final SanityLinearScan scanner
public SanityChecker()
public boolean collectionPhase(int phaseId)
phaseId
- The id to procestrue
if the phase was handled.public void scanProcessObject(ObjectReference object)
object
- The object being scanned.public void processObject(TraceLocal trace, ObjectReference object, boolean root)
trace
- the trace to use for processingobject
- The object to mark.root
- true
If the object is a root.public static void dumpObjectInformation(ObjectReference object)
object
- The object to dump info for.