public final class GCMapIteratorGroup extends Object
The group contains a GCMapIterator for each type of stack frame that may be found while scanning a stack during garbage collection, including frames for baseline compiled methods, OPT compiled methods, and frames for transitions from Java into JNI native code. These iterators are responsible for reporting the location of references in the stack or register save areas.
GCMapIterator
,
CompiledMethod
,
CollectorThread
Modifier and Type | Field and Description |
---|---|
private GCMapIterator |
baselineIterator
iterator for baseline compiled frames
|
private GCMapIterator |
hardwareTrapIterator
iterator for HardwareTrap stackframes
|
private GCMapIterator |
jniIterator
iterator for JNI Java -> C stackframes
|
private GCMapIterator |
optIterator
iterator for opt compiled frames
|
private AddressArray |
registerLocations
current location (memory address) of each gpr register
|
Constructor and Description |
---|
GCMapIteratorGroup() |
Modifier and Type | Method and Description |
---|---|
GCMapIterator |
getJniIterator()
get the GCMapIterator used for scanning JNI native stack frames.
|
void |
newStackWalk(RVMThread thread,
Address registerLocation)
Prepare to scan a thread's stack for object references.
|
GCMapIterator |
selectIterator(CompiledMethod compiledMethod)
Select iterator for scanning for object references in a stackframe.
|
private final AddressArray registerLocations
private final GCMapIterator baselineIterator
private final GCMapIterator optIterator
private final GCMapIterator hardwareTrapIterator
private final GCMapIterator jniIterator
public GCMapIteratorGroup()
public void newStackWalk(RVMThread thread, Address registerLocation)
Assumption: the thread is currently suspended, ie. its saved gprs[] contain the thread's full register state.
Side effect: registerLocations[] initialized with pointers to the thread's saved gprs[] (in thread.contextRegisters.gprs)
thread
- Thread whose registers and stack are to be scannedregisterLocation
- start address of the memory location where
register contents are savedpublic GCMapIterator selectIterator(CompiledMethod compiledMethod)
compiledMethod
- CompiledMethod for the method executing
in the stack framepublic GCMapIterator getJniIterator()