public abstract class GCMapIterator extends Object
GCMapIteratorGroup
Modifier and Type | Field and Description |
---|---|
protected Address |
framePtr
address of stackframe currently being scanned
|
AddressArray |
registerLocations
address where each gpr register was saved by previously scanned stackframe(s)
|
protected RVMThread |
thread
thread whose stack is currently being scanned
|
Constructor and Description |
---|
GCMapIterator(AddressArray registerLocations) |
Modifier and Type | Method and Description |
---|---|
abstract void |
cleanupPointers()
Iteration is complete, release any internal data structures including
locks acquired during setupIterator for jsr maps.
|
abstract Address |
getNextReferenceAddress()
Get address of next object reference held by current stackframe.
|
abstract Address |
getNextReturnAddressAddress()
Get address of next JSR return address held by current stackframe.
|
abstract int |
getType()
Get the type of this iterator (BASELINE, OPT, etc.).
|
void |
newStackWalk(RVMThread thread)
Prepare to scan a thread's stack and saved registers for object references.
|
abstract void |
reset()
Prepare to re-iterate on same stackframe, and to switch between
"reference" iteration and "JSR return address" iteration.
|
abstract void |
setupIterator(CompiledMethod compiledMethod,
Offset instructionOffset,
Address framePtr)
Prepare to iterate over object references and JSR return addresses held by a stackframe.
|
public final AddressArray registerLocations
public GCMapIterator(AddressArray registerLocations)
public void newStackWalk(RVMThread thread)
thread
- Thread whose stack is being scannedpublic abstract void setupIterator(CompiledMethod compiledMethod, Offset instructionOffset, Address framePtr)
compiledMethod
- method running in the stackframeinstructionOffset
- offset of current instruction within that method's codeframePtr
- address of stackframe to be visitedpublic abstract Address getNextReferenceAddress()
Side effect: registerLocations[] updated at end of iteration. TODO: registerLocations[] update should be done via separately called method instead of as side effect.
public abstract Address getNextReturnAddressAddress()
public abstract void reset()
public abstract void cleanupPointers()
public abstract int getType()