public final class BaselineCompiledMethod extends CompiledMethod
Modifier and Type | Field and Description |
---|---|
private byte[] |
bytecodeMap
Encoded representation of bytecode index to offset in code array
map.
|
private short |
emptyStackOffset
Offset into stack frame when operand stack is empty
|
private int[] |
eTable
Exception table, null if not present.
|
private static ExceptionDeliverer |
exceptionDeliverer
Baseline exception deliverer object
|
private boolean |
hasCounters
Does the baseline compiled method have a counters array?
|
private byte |
lastFixedStackRegister
PPC only: last general purpose register holding part of the operand stack
|
private byte |
lastFloatStackRegister
PPC only: last floating point register holding part of the operand stack
|
private short[] |
localFixedLocations
PPC only: location of general purpose local variables, positive
values are register numbers, negative are stack offsets
|
private short[] |
localFloatLocations
PPC only: location of floating point local variables, positive
values are register numbers, negative are stack offsets
|
private char |
lockOffset
The lock acquisition offset for synchronized methods.
|
ReferenceMaps |
referenceMaps
Stack-slot reference maps for the compiled method.
|
BASELINE, cmid, compilationTime, instructions, JNI, method, NATIVE_METHOD_LINE_NUMBER, NUM_COMPILER_TYPES, OPT, osrJTOCoffset, TRAP
Constructor and Description |
---|
BaselineCompiledMethod(int id,
RVMMethod m) |
Modifier and Type | Method and Description |
---|---|
void |
compile()
Compile method
|
void |
encodeMappingInfo(ReferenceMaps referenceMaps,
int[] bcMap)
Encode/compress the bytecode map, reference (GC) map and exception table
|
int |
findBytecodeIndexForInstruction(Offset instructionOffset)
Find bytecode index corresponding to one of this method's
machine instructions.
|
int |
findCatchBlockForInstruction(Offset instructionOffset,
RVMType exceptionType)
Find a catch block within the compiled method
|
int |
findLineNumberForInstruction(Offset instructionOffset)
Find source line number corresponding to one of this method's
machine instructions.
|
String |
getCompilerName() |
int |
getCompilerType()
Identify the compiler that produced this compiled method.
|
void |
getDynamicLink(DynamicLink dynamicLink,
Offset instructionOffset)
Fetch symbolic reference to a method that's called by one of
this method's instructions.
|
int |
getEmptyStackOffset() |
ExceptionDeliverer |
getExceptionDeliverer() |
short |
getFloatLocalLocation(int localIndex)
Location of local floating point variable.
|
short |
getFloatStackLocation(int stackIndex) |
short |
getGeneralLocalLocation(int localIndex)
Location of local general purpose variable.
|
short |
getGeneralStackLocation(int stackIndex) |
int |
getLastFixedStackRegister() |
int |
getLastFloatStackRegister() |
Offset |
getLockAcquisitionOffset() |
boolean |
hasCounterArray() |
boolean |
isWithinUninterruptibleCode(Offset instructionOffset)
Return whether or not the given address (which is purported to be inside
of the compiled method's code array) corresponds to an uninterruptible context.
|
void |
printExceptionTable()
Print the eTable
|
void |
printStackTrace(Offset instructionOffset,
PrintLN out)
Print this compiled method's portion of a stack trace
|
void |
set(StackBrowser browser,
Offset instr)
Set the stack browser to the innermost logical stack frame of this method.
|
(package private) void |
setHasCounterArray()
Set the method has a counters array
|
void |
setLockAcquisitionOffset(int off)
Sets the lock acquisition offset for synchronized methods.
|
int |
size() |
boolean |
up(StackBrowser browser)
Advance the StackBrowser up one internal stack frame, if possible
|
clearActiveOnStack, codeArrayForOffset, compileComplete, compilerTypeToString, containsReturnAddress, getCompilationTime, getEntryCodeArray, getId, getInstructionAddress, getInstructionOffset, getInstructionOffset, getMethod, getOsrJTOCoffset, getSamplesReset, hasBridgeFromNativeAnnotation, isActiveOnStack, isCompiled, isInvalid, isObsolete, isOutdated, isSpecialForOSR, numberOfInstructions, setActiveOnStack, setCompilationTime, setInvalid, setObsolete, setOutdated, setSamplesReset, setSpecialForOSR
private boolean hasCounters
private char lockOffset
private static final ExceptionDeliverer exceptionDeliverer
public ReferenceMaps referenceMaps
private byte[] bytecodeMap
private int[] eTable
private final short emptyStackOffset
private byte lastFixedStackRegister
private byte lastFloatStackRegister
private final short[] localFixedLocations
private final short[] localFloatLocations
public BaselineCompiledMethod(int id, RVMMethod m)
public int getEmptyStackOffset()
public short getGeneralLocalLocation(int localIndex)
e.g. to load int: load at BaselineCompilerImpl.locationToOffset(location) - BYTES_IN_INT
e.g. to load long: load at BaselineCompilerImpl.locationToOffset(location) - BYTES_IN_LONG
localIndex
- the index for the local general purpose variablepublic short getFloatLocalLocation(int localIndex)
e.g. to load float: load at BaselineCompilerImpl.locationToOffset(location) - BYTES_IN_FLOAT
e.g. to load double: load at BaselineCompilerImpl.locationToOffset(location) - BYTES_IN_DOUBLE
localIndex
- the index for the local general purpose variablepublic short getGeneralStackLocation(int stackIndex)
public short getFloatStackLocation(int stackIndex)
public int getLastFixedStackRegister()
public int getLastFloatStackRegister()
public void compile()
public int getCompilerType()
CompiledMethod
getCompilerType
in class CompiledMethod
public String getCompilerName()
getCompilerName
in class CompiledMethod
public ExceptionDeliverer getExceptionDeliverer()
getExceptionDeliverer
in class CompiledMethod
public int findCatchBlockForInstruction(Offset instructionOffset, RVMType exceptionType)
findCatchBlockForInstruction
in class CompiledMethod
instructionOffset
- offset of faulting instruction in compiled codeexceptionType
- the type of the thrown exceptionpublic void getDynamicLink(DynamicLink dynamicLink, Offset instructionOffset)
CompiledMethod
Notes:
getDynamicLink
in class CompiledMethod
dynamicLink
- place to put return informationinstructionOffset
- offset of machine instruction from start of
this method, in bytespublic int findLineNumberForInstruction(Offset instructionOffset)
CompiledMethod
Usage note: "instructionOffset" must point to the instruction following the actual instruction whose line number is sought. This allows us to properly handle the case where the only address we have to work with is a return address (ie. from a stackframe) or an exception address (ie. from a null pointer dereference, array bounds check, or divide by zero) on a machine architecture with variable length instructions. In such situations we'd have no idea how far to back up the instruction pointer to point to the "call site" or "exception site".
findLineNumberForInstruction
in class CompiledMethod
instructionOffset
- the instruction's offset in the code for the methodpublic boolean isWithinUninterruptibleCode(Offset instructionOffset)
CompiledMethod
isWithinUninterruptibleCode
in class CompiledMethod
instructionOffset
- of addr from start of instructions in bytestrue
if the IP is within an Uninterruptible method, false
otherwise.public int findBytecodeIndexForInstruction(Offset instructionOffset)
instructionOffset
- instruction offset to map to a bytecode index.public void set(StackBrowser browser, Offset instr)
CompiledMethod
set
in class CompiledMethod
browser
- the browserinstr
- the offset of the instructionpublic boolean up(StackBrowser browser)
CompiledMethod
up
in class CompiledMethod
browser
- the browser to advancepublic void printStackTrace(Offset instructionOffset, PrintLN out)
CompiledMethod
printStackTrace
in class CompiledMethod
instructionOffset
- offset of machine instruction from start of methodout
- the PrintLN to print the stack trace to.public void printExceptionTable()
public void setLockAcquisitionOffset(int off)
off
- new offsetpublic Offset getLockAcquisitionOffset()
void setHasCounterArray()
public boolean hasCounterArray()
public void encodeMappingInfo(ReferenceMaps referenceMaps, int[] bcMap)
referenceMaps
- to encodebcMap
- unencoded bytecode to code array offset mappublic int size()
size
in class CompiledMethod