public final class JNIGCMapIterator extends GCMapIterator
JNICompiler
Modifier and Type | Field and Description |
---|---|
(package private) int |
jniFramePtr |
(package private) int |
jniNextRef |
(package private) AddressArray |
jniRefs |
framePtr, registerLocations, thread
Constructor and Description |
---|
JNIGCMapIterator(AddressArray registerLocations) |
Modifier and Type | Method and Description |
---|---|
void |
cleanupPointers()
Iteration is complete, release any internal data structures including
locks acquired during setupIterator for jsr maps.
|
Address |
getNextReferenceAddress()
Get address of next object reference held by current stackframe.
|
Address |
getNextReturnAddressAddress()
Get address of next JSR return address held by current stackframe.
|
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.
|
void |
reset()
Prepare to re-iterate on same stackframe, and to switch between
"reference" iteration and "JSR return address" iteration.
|
void |
setupIterator(CompiledMethod compiledMethod,
Offset instructionOffset,
Address framePtr)
Prepare to iterate over object references and JSR return addresses held by a stackframe.
|
AddressArray jniRefs
int jniNextRef
int jniFramePtr
public JNIGCMapIterator(AddressArray registerLocations)
public void newStackWalk(RVMThread thread)
GCMapIterator
newStackWalk
in class GCMapIterator
thread
- Thread whose stack is being scannedpublic void setupIterator(CompiledMethod compiledMethod, Offset instructionOffset, Address framePtr)
GCMapIterator
setupIterator
in class GCMapIterator
compiledMethod
- method running in the stackframeinstructionOffset
- offset of current instruction within that method's codeframePtr
- address of stackframe to be visitedpublic Address getNextReferenceAddress()
GCMapIterator
Side effect: registerLocations[] updated at end of iteration. TODO: registerLocations[] update should be done via separately called method instead of as side effect.
getNextReferenceAddress
in class GCMapIterator
public Address getNextReturnAddressAddress()
GCMapIterator
getNextReturnAddressAddress
in class GCMapIterator
public void reset()
GCMapIterator
reset
in class GCMapIterator
public void cleanupPointers()
GCMapIterator
cleanupPointers
in class GCMapIterator
public int getType()
GCMapIterator
getType
in class GCMapIterator