public final class BaselineGCMapIterator extends GCMapIterator
An Instance of this class will iterate through a particular reference map of a method returning the offsets of any references that are part of the input parameters, local variables, and java stack for the stack frame.
Modifier and Type | Field and Description |
---|---|
private int |
bridgeParameterIndex
current parameter being mapped (-1 == "this")
|
private int |
bridgeParameterInitialIndex
first parameter to be mapped (-1 == "this")
|
private boolean |
bridgeParameterMappingRequired
have all bridge parameters been mapped yet?
|
private TypeReference[] |
bridgeParameterTypes
parameter types passed by that method
|
private int |
bridgeRegisterIndex
gpr register it lives in
|
private Address |
bridgeRegisterLocation
memory address at which that register was saved
|
private boolean |
bridgeRegistersLocationUpdated
have the register location been updated
|
private boolean |
bridgeSpilledParameterMappingRequired
do we need to map spilled params (baseline compiler = no, opt = yes)
|
private int |
bridgeSpilledParamInitialOffset
starting offset to stack location for param0
|
private Address |
bridgeSpilledParamLocation
current spilled param location
|
private MethodReference |
bridgeTarget
method to be invoked via dynamic bridge (null: current frame is not a dynamic bridge)
|
private boolean |
counterArrayBase
have we reported the base ptr of the edge counter array?
|
private BaselineCompiledMethod |
currentCompiledMethod
Compiled method for the frame
|
private NormalMethod |
currentMethod
Compiled method for the frame
|
private int |
currentNumLocals |
private DynamicLink |
dynamicLink
place to keep info returned by CompiledMethod.getDynamicLink
|
private boolean |
finishedWithRegularMap
have we processed all the values in the regular map yet?
|
private int |
mapId
id of current map out of all maps
|
private int |
mapIndex
Current index in current map
|
private ReferenceMaps |
maps
set of maps for this method
|
private static boolean |
TRACE_ALL |
private static boolean |
TRACE_DL |
framePtr, registerLocations, thread
Constructor and Description |
---|
BaselineGCMapIterator(AddressArray registerLocations)
Constructs a BaselineGCMapIterator for IA32.
|
Modifier and Type | Method and Description |
---|---|
void |
cleanupPointers()
Cleanup pointers - used with method maps to release data structures early
... they may be in temporary storage i.e. storage only used during garbage
collection
|
short |
convertIndexToLocation(int index)
Converts a biased index from a local area into an offset in the stack.
|
private int |
convertIndexToOffset(int index) |
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 |
getStackDepth() |
int |
getType()
Get the type of this iterator (BASELINE, OPT, etc.).
|
void |
reset()
Reset iteration to initial state.
|
void |
setupIterator(CompiledMethod compiledMethod,
Offset instructionOffset,
Address fp)
Set the iterator to scan the map at the machine instruction offset
provided.
|
newStackWalk
private static final boolean TRACE_ALL
private static final boolean TRACE_DL
private NormalMethod currentMethod
private BaselineCompiledMethod currentCompiledMethod
private int currentNumLocals
private int mapIndex
private int mapId
private ReferenceMaps maps
private boolean counterArrayBase
private final DynamicLink dynamicLink
private MethodReference bridgeTarget
private TypeReference[] bridgeParameterTypes
private boolean bridgeParameterMappingRequired
private boolean bridgeSpilledParameterMappingRequired
private boolean bridgeRegistersLocationUpdated
private boolean finishedWithRegularMap
private int bridgeParameterInitialIndex
private int bridgeParameterIndex
private int bridgeRegisterIndex
private Address bridgeRegisterLocation
private Address bridgeSpilledParamLocation
private int bridgeSpilledParamInitialOffset
public BaselineGCMapIterator(AddressArray registerLocations)
Note: the location array for registers needs to be remembered. It also needs to be updated with the location of any saved registers. The locations are kept as addresses within the stack. This information is not used by this iterator but must be updated for the other types of iterators (e.g. iterators for the opt compiler built frames).
registerLocations
- locations of saved registerspublic void setupIterator(CompiledMethod compiledMethod, Offset instructionOffset, Address fp)
setupIterator
in class GCMapIterator
compiledMethod
- identifies the method and classinstructionOffset
- identifies the map to be scanned.fp
- identifies a specific occurrence of this method and allows for
processing instance specific information i.e JSR return address
valuespublic void reset()
reset
in class GCMapIterator
public short convertIndexToLocation(int index)
index
- index in the local area (biased : local0 has index 1)private int convertIndexToOffset(int index)
public 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 cleanupPointers()
cleanupPointers
in class GCMapIterator
public int getType()
GCMapIterator
getType
in class GCMapIterator
public int getStackDepth()