public final class TraceGenerator extends Object
Modifier and Type | Field and Description |
---|---|
private static Word |
agePropagate |
private static int |
ALLOC_BOOT |
private static int |
ALLOCATORS |
private static Word |
lastGC |
static boolean |
MERLIN_ANALYSIS
Type of lifetime analysis to be used
|
private static ObjectReferenceArray |
objectLinks |
private static TraceBuffer |
trace |
private static boolean |
traceBusy |
private static SortTODSharedDeque |
tracePool |
private static SortTODObjectReferenceStack |
worklist |
private static SortTODSharedDeque |
workListPool |
Constructor and Description |
---|
TraceGenerator() |
Modifier and Type | Method and Description |
---|---|
static void |
addTraceObject(ObjectReference ref,
int linkSpace)
Add a newly allocated object into the linked list of objects in a region.
|
static void |
boot(Address bootStart)
Add the information in the bootImage to the trace.
|
private static void |
computeTransitiveClosure()
This finds all object death times by computing the (limited)
transitive closure of the dead objects.
|
private static void |
findDeaths()
This computes and adds to the trace buffer the unreachable time for
all of the objects that are _provably_ unreachable.
|
private static TraceLocal |
getTraceLocal() |
static void |
init(SortTODSharedDeque worklist_,
SortTODSharedDeque trace_)
This is called at "build-time" and passes the necessary build image
objects to the trace processor.
|
static void |
notifyExit(int value)
This is called immediately before Jikes terminates.
|
static void |
postCollection()
Do the work necessary following each garbage collection.
|
static void |
processPointerUpdate(boolean isScalar,
ObjectReference src,
Address slot,
ObjectReference tgt)
Do any tracing work required at each a pointer store operation.
|
static void |
propagateDeathTime(ObjectReference ref)
This propagates the death time being computed to the object passed as an
address.
|
static void |
rootEnumerate(ObjectReference obj)
This method is called for each root-referenced object at every Merlin
root enumeration.
|
static void |
traceAlloc(boolean isImmortal,
ObjectReference ref,
ObjectReference typeRef,
int bytes)
Do any tracing work required at each object allocation.
|
public static final boolean MERLIN_ANALYSIS
private static final int ALLOC_BOOT
private static final int ALLOCATORS
private static SortTODSharedDeque tracePool
private static TraceBuffer trace
private static boolean traceBusy
private static ObjectReferenceArray objectLinks
private static SortTODSharedDeque workListPool
private static SortTODObjectReferenceStack worklist
private static Word agePropagate
public TraceGenerator()
public static void init(SortTODSharedDeque worklist_, SortTODSharedDeque trace_)
worklist_
- The dequeue that serves as the worklist for
death time propagationtrace_
- The dequeue used to store and then output the tracepublic static void notifyExit(int value)
value
- The integer value for the reason Jikes is terminatingpublic static void addTraceObject(ObjectReference ref, int linkSpace)
ref
- The address of the object to be added to the linked listlinkSpace
- The region to which the object should be addedpublic static void postCollection()
public static void boot(Address bootStart)
bootStart
- The address at which the bootimage startspublic static void processPointerUpdate(boolean isScalar, ObjectReference src, Address slot, ObjectReference tgt)
isScalar
- If this is a pointer store to a scalar objectsrc
- The address of the source objectslot
- The address within src
into which
tgt
will be storedtgt
- The target of the pointer storepublic static void traceAlloc(boolean isImmortal, ObjectReference ref, ObjectReference typeRef, int bytes)
isImmortal
- whether the allocation goes to an immortal spaceref
- The address of the object just allocated.typeRef
- the type reference for the instance being createdbytes
- The size of the object being allocatedprivate static void findDeaths()
public static void rootEnumerate(ObjectReference obj)
obj
- The root-referenced objectpublic static void propagateDeathTime(ObjectReference ref)
ref
- The address of the object to examineprivate static void computeTransitiveClosure()
private static TraceLocal getTraceLocal()