public class TreadmillDriver extends AbstractDriver
Modifier and Type | Field and Description |
---|---|
protected int |
allTileNum |
private static boolean |
DEBUG |
protected Address |
maxAddr |
protected ShortStream |
objectsStream |
protected ShortStream |
refFromImmortalStream |
protected ShortStream |
rootsStream |
protected Subspace |
subspace |
protected int |
threshold |
protected int |
totalObjects |
protected int |
totalRefFromImmortal |
protected int |
totalRoots |
protected int |
totalUsedSpace |
protected IntStream |
usedSpaceStream |
blockSize, changed, control, CONTROL_BACKGROUND, CONTROL_LINK, CONTROL_SEPARATOR, CONTROL_UNUSED, CONTROL_USED, maxTileNum, mmtkSpace, myClass, name, server, serverSpace, streams
Constructor and Description |
---|
TreadmillDriver(ServerInterpreter server,
String spaceName,
LargeObjectSpace lospace,
int blockSize,
int threshold,
boolean mainSpace)
Create a new driver for this collector
|
Modifier and Type | Method and Description |
---|---|
private ShortStream |
createObjectsStream() |
private ShortStream |
createRefFromImmortalStream() |
private ShortStream |
createRootsStream() |
private IntStream |
createUsedSpaceStream() |
protected String |
getDriverName()
Get the name of this driver type.
|
boolean |
handleReferenceFromImmortalSpace(Address addr)
Handle a direct reference from the immortal space.
|
boolean |
handleRoot(Address addr)
Handle a root address
|
void |
resetData()
Reset the tile stats for all streams, including values used for summaries
|
void |
resetRootsStream()
Reset the roots Stream.
|
void |
scan(Address addr)
Update the tile statistics
In this case, we are accounting for super-page objects, rather than
simply for the objects they contain.
|
protected void |
setupSummaries()
Setup summaries part of the
transmit method. |
void |
transmit(int event)
Transmit the data if this event is of interest to the client
|
addControl, addStream, controlIsBackground, controlIsSeparator, controlIsUnused, controlIsUsed, controlValues, countTileNum, countTileNum, createServerSpace, createSubspace, getControl, getMaxTileNum, getServerSpace, initControl, initControls, isConnected, maxObjectsPerBlock, scan, scan, scan, send, setControl, setRange, setRange, setSpaceInfo, setTilenames
private static final boolean DEBUG
protected IntStream usedSpaceStream
protected ShortStream objectsStream
protected ShortStream rootsStream
protected ShortStream refFromImmortalStream
protected int allTileNum
protected int totalObjects
protected int totalUsedSpace
protected int totalRoots
protected int totalRefFromImmortal
protected int threshold
public TreadmillDriver(ServerInterpreter server, String spaceName, LargeObjectSpace lospace, int blockSize, int threshold, boolean mainSpace)
server
- The name of the GCspy server that owns this spacespaceName
- The name of this driverlospace
- the large object space for this allocatorblockSize
- The tile sizethreshold
- the size threshold of the LOSmainSpace
- Is this the main space?protected String getDriverName()
AbstractDriver
getDriverName
in class AbstractDriver
private IntStream createUsedSpaceStream()
private ShortStream createObjectsStream()
private ShortStream createRootsStream()
private ShortStream createRefFromImmortalStream()
public void resetData()
resetData
in class AbstractDriver
public void scan(Address addr)
scan
in class AbstractDriver
addr
- The address of the superpagepublic void transmit(int event)
transmit
in class AbstractDriver
event
- The event, either BEFORE_COLLECTION, SEMISPACE_COPIED
or AFTER_COLLECTIONprotected void setupSummaries()
transmit
method.Override this method to setup summaries of additional streams in subclasses.
public boolean handleRoot(Address addr)
addr
- Root Addresstrue
if the given Address is in this subspace.public void resetRootsStream()
scan()
.public boolean handleReferenceFromImmortalSpace(Address addr)
handleReferenceFromImmortalSpace
in class AbstractDriver
addr
- The Addresstrue
if the given Address is in this subspace.