|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mmtk.plan.TransitiveClosure org.mmtk.plan.TraceLocal org.mmtk.plan.semispace.SSTraceLocal org.mmtk.plan.semispace.gctrace.GCTraceTraceLocal
public final class GCTraceTraceLocal
This plan has been modified slightly to perform the processing necessary for GC trace generation. To maximize performance, it attempts to remain as faithful as possible to semiSpace/Plan.java.
The generated trace format is as follows: B 345678 12 (Object 345678 was created in the boot image with a size of 12 bytes) U 59843 234 47298 (Update object 59843 at the slot at offset 234 to refer to 47298) S 1233 12345 (Update static slot 1233 to refer to 12345) T 4567 78924 (The TIB of 4567 is set to refer to 78924) D 342789 (Object 342789 became unreachable) A 6860 24 346648 3 (Object 6860 was allocated, requiring 24 bytes, with fp 346648 on thread 3; this allocation has perfect knowledge) a 6884 24 346640 5 (Object 6864 was allocated, requiring 24 bytes, with fp 346640 on thread 5; this allocation DOES NOT have perfect knowledge) I 6860 24 346648 3 (Object 6860 was allocated into immortal space, requiring 24 bytes, with fp 346648 on thread 3; this allocation has perfect knowledge) i 6884 24 346640 5 (Object 6864 was allocated into immortal space, requiring 24 bytes, with fp 346640 on thread 5; this allocation DOES NOT have perfect knowledge) 48954->[345]LObject;:blah()V:23 Ljava/lang/Foo; (Citation for: a) where the was allocated, fp of 48954, at the method with ID 345 -- or void Object.blah() -- and bytecode with offset 23; b) the object allocated is of type java.lang.Foo) D 342789 361460 (Object 342789 became unreachable after 361460 was allocated)This class implements a simple semi-space collector. See the Jones & Lins GC book, section 2.2 for an overview of the basic algorithm. This implementation also includes a large object space (LOS), and an uncollected "immortal" space.
All plans make a clear distinction between global and thread-local activities. Global activities must be synchronized, whereas no synchronization is required for thread-local activities. Instances of Plan map 1:1 to "kernel threads" (aka CPUs). Thus instance methods allow fast, unsychronized access to Plan utilities such as allocation and collection. Each instance rests on static resources (such as memory and virtual memory resources) which are "global" and therefore "static" members of Plan. This mapping of threads to instances is crucial to understanding the correctness and performance properties of this plan.
Field Summary |
---|
Fields inherited from class org.mmtk.plan.TraceLocal |
---|
rootLocations, values |
Fields inherited from class org.mmtk.plan.TransitiveClosure |
---|
specializedScan |
Constructor Summary | |
---|---|
GCTraceTraceLocal(Trace trace)
Constructor |
Method Summary | |
---|---|
ObjectReference |
getForwardedReference(ObjectReference object)
If the referenced object has moved, return the new location. |
boolean |
isLive(ObjectReference object)
Is the specified object live? |
boolean |
isReachable(ObjectReference object)
Return true if obj is a reachable object. |
ObjectReference |
traceObject(ObjectReference object)
Trace a reference during GC. |
boolean |
willNotMoveInCurrentCollection(ObjectReference object)
Is this object guaranteed not to move during the collection. |
Methods inherited from class org.mmtk.plan.TransitiveClosure |
---|
getSpecializedScanClass, registerSpecializedScan |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GCTraceTraceLocal(Trace trace)
trace
- The global trace to use.Method Detail |
---|
public ObjectReference traceObject(ObjectReference object)
traceObject
in class SSTraceLocal
object
- The object reference to be traced. In certain
cases, this should NOT be an interior pointer.
public ObjectReference getForwardedReference(ObjectReference object)
TraceLocal
getForwardedReference
in class TraceLocal
object
- The object which may have been forwarded.
object
.public boolean isLive(ObjectReference object)
SSTraceLocal
isLive
in class SSTraceLocal
object
- The object.
true
if the object is live.public boolean isReachable(ObjectReference object)
obj
is a reachable object.
isReachable
in class TraceLocal
object
- The object in question
obj
is a reachable object;
unreachable objects may still be live, howeverpublic boolean willNotMoveInCurrentCollection(ObjectReference object)
willNotMoveInCurrentCollection
in class SSTraceLocal
object
- The object to check.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |