public class GenCopyCollector extends GenCollector
GenCopy
two-generational copying collector.
Specifically, this class defines semantics specific to the collection of
the mature generation (GenCollector
defines nursery semantics).
In particular the mature space allocator is defined (for collection-time
allocation into the mature space), and the mature space per-collector thread
collection time semantics are defined.
Modifier and Type | Field and Description |
---|---|
private CopyLocal |
mature
The allocator for the mature space
|
private GenCopyMatureTraceLocal |
matureTrace
The trace object for full-heap collections
|
arrayRemset, los, modbuf, nurseryTrace, remset
sanityLocal
group
log
Constructor and Description |
---|
GenCopyCollector()
Constructor
|
Modifier and Type | Method and Description |
---|---|
Address |
allocCopy(ObjectReference original,
int bytes,
int align,
int offset,
int allocator)
Allocate space for copying an object (this method does not
copy the object, it only allocates space)
|
void |
collectionPhase(short phaseId,
boolean primary)
Perform a (local, i.e.per-collector) collection phase.
|
TraceLocal |
getFullHeapTrace() |
private static GenCopy |
global() |
void |
postCopy(ObjectReference object,
ObjectReference typeRef,
int bytes,
int allocator)
Perform any post-copy actions.
|
protected void |
showMature()
Show the status of the mature allocator.
|
getCurrentTrace
collect, concurrentCollect, concurrentCollectionPhase
parallelWorkerCount, parallelWorkerOrdinal, park, rendezvous, run
copyCheckAllocator, getId, getLog, initCollector
private final GenCopyMatureTraceLocal matureTrace
public GenCopyCollector()
public Address allocCopy(ObjectReference original, int bytes, int align, int offset, int allocator)
allocCopy
in class CollectorContext
original
- The object that is being copied.bytes
- The size of the space to be allocated (in bytes)align
- Required alignment for the copyoffset
- Offset associated with the alignment.allocator
- The allocator associated with this requestpublic final void postCopy(ObjectReference object, ObjectReference typeRef, int bytes, int allocator)
In this case we clear any bits used for this object's GC metadata.
postCopy
in class CollectorContext
object
- The newly allocated object.typeRef
- the type reference for the instance being created.bytes
- The size of the space to be allocated (in bytes).allocator
- The allocator statically assigned to this allocation.public void collectionPhase(short phaseId, boolean primary)
collectionPhase
in class GenCollector
phaseId
- The unique phase identifierprimary
- Should this thread be used to execute any single-threaded
local operations?protected final void showMature()
public final TraceLocal getFullHeapTrace()
getFullHeapTrace
in class GenCollector