public final class OptCompiledMethod extends CompiledMethod
NOTE: OptCompiledMethod live as long as their corresponding compiled machine code. Therefore, they should only contain state that is really required to be persistent. Anything transitory should be stored on the IR object.
Modifier and Type | Field and Description |
---|---|
private OptMachineCodeMap |
_mcMap
The primary machine code maps
|
private EncodedOSRMap |
_osrMap |
private static RVMThread.SoftHandshakeVisitor |
codePatchSyncRequestVisitor |
private int[] |
eTable
The encoded exception tables (null if there are none)
|
private static ExceptionDeliverer |
exceptionDeliverer |
private char |
exceptionObjectOffset
unsigned offset (off the framepointer) of caught exception
object in bytes
|
private byte |
firstNonvolatileFPR
first saved nonvolatile floating point register (-1 if no
nonvolatile FPRs)
|
private byte |
firstNonvolatileGPR
first saved nonvolatile integer register (-1 if no nonvolatile
GPRs)
|
private boolean |
instrumented
is the current method executing with instrumentation
|
private char |
nonvolatileOffset
unsigned offset (off the framepointer) of nonvolatile save area
in bytes
|
private byte |
optLevel
opt level at which the method was compiled
|
private int[] |
patchMap |
private char |
stackFrameFixedSize
size of the fixed portion of the stackframe
|
private boolean |
volatilesSaved
were the volatile registers saved?
|
BASELINE, cmid, compilationTime, instructions, JNI, method, NATIVE_METHOD_LINE_NUMBER, NUM_COMPILER_TYPES, OPT, osrJTOCoffset, TRAP
Constructor and Description |
---|
OptCompiledMethod(int id,
RVMMethod m) |
Modifier and Type | Method and Description |
---|---|
void |
applyCodePatches(CompiledMethod cm)
Applies the code patches to the INSTRUCTION array of cm.
|
void |
createCodePatchMaps(IR ir)
Create the code patching maps from the IR for the method
|
void |
createFinalExceptionTable(IR ir)
Create the final exception table from the IR for the method.
|
void |
createFinalMCMap(IR ir,
int machineCodeLength)
Create the final machine code map for the compiled method.
|
void |
createFinalOSRMap(IR ir) |
private void |
dealWithPossibleRemovalOfCatchBlockByTheOptCompiler(Offset instructionOffset,
RVMType exceptionType,
int catchOffset) |
int |
findCatchBlockForInstruction(Offset instructionOffset,
RVMType exceptionType)
Find "catch" block for a machine instruction of this 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.
|
ExceptionDeliverer |
getExceptionDeliverer() |
int |
getFirstNonVolatileFPR() |
int |
getFirstNonVolatileGPR() |
int |
getFrameFixedSize() |
OptMachineCodeMap |
getMCMap() |
int |
getNumberOfNonvolatileFPRs() |
int |
getNumberOfNonvolatileGPRs() |
int |
getOptLevel() |
EncodedOSRMap |
getOSRMap() |
int |
getUnsignedExceptionOffset() |
int |
getUnsignedNonVolatileOffset() |
boolean |
isInstrumentedMethod() |
boolean |
isSaveVolatile() |
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() |
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.
|
void |
setFirstNonVolatileFPR(int x) |
void |
setFirstNonVolatileGPR(int x) |
void |
setFrameFixedSize(int x) |
void |
setInstrumentedMethod(boolean _instrumented) |
void |
setNumberOfNonvolatileFPRs(short n) |
void |
setNumberOfNonvolatileGPRs(short n) |
void |
setOptLevel(int x) |
void |
setSaveVolatile(boolean sv) |
void |
setUnsignedExceptionOffset(int x) |
void |
setUnsignedNonVolatileOffset(int x) |
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 static final ExceptionDeliverer exceptionDeliverer
private EncodedOSRMap _osrMap
private OptMachineCodeMap _mcMap
private int[] eTable
private int[] patchMap
private char nonvolatileOffset
private char exceptionObjectOffset
private char stackFrameFixedSize
private byte firstNonvolatileGPR
private byte firstNonvolatileFPR
private byte optLevel
private boolean volatilesSaved
private boolean instrumented
private static RVMThread.SoftHandshakeVisitor codePatchSyncRequestVisitor
public OptCompiledMethod(int id, RVMMethod m)
public int getCompilerType()
CompiledMethod
getCompilerType
in class CompiledMethod
CompiledMethod.OPT
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 machine instruction from start of this method, in bytesexceptionType
- type of exception being thrown - something like "NullPointerException"private void dealWithPossibleRemovalOfCatchBlockByTheOptCompiler(Offset instructionOffset, RVMType exceptionType, int catchOffset)
public void getDynamicLink(DynamicLink dynamicLink, Offset instructionOffset)
getDynamicLink
in class CompiledMethod
dynamicLink
- place to put return informationinstructionOffset
- offset of machine instruction that issued
the callpublic 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 findLineNumberForInstruction(Offset instructionOffset)
findLineNumberForInstruction
in class CompiledMethod
instructionOffset
- of machine instruction from start of this method, in bytespublic 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 int size()
size
in class CompiledMethod
public void createFinalOSRMap(IR ir)
public EncodedOSRMap getOSRMap()
public int getUnsignedNonVolatileOffset()
public int getUnsignedExceptionOffset()
public int getFirstNonVolatileGPR()
public int getFirstNonVolatileFPR()
public int getOptLevel()
public boolean isSaveVolatile()
public boolean isInstrumentedMethod()
public int getFrameFixedSize()
public void setUnsignedNonVolatileOffset(int x)
public void setUnsignedExceptionOffset(int x)
public void setFirstNonVolatileGPR(int x)
public void setFirstNonVolatileFPR(int x)
public void setOptLevel(int x)
public void setSaveVolatile(boolean sv)
public void setInstrumentedMethod(boolean _instrumented)
public void setFrameFixedSize(int x)
public int getNumberOfNonvolatileGPRs()
public int getNumberOfNonvolatileFPRs()
public void setNumberOfNonvolatileGPRs(short n)
public void setNumberOfNonvolatileFPRs(short n)
public void printExceptionTable()
public OptMachineCodeMap getMCMap()
public void createFinalMCMap(IR ir, int machineCodeLength)
ir
- the irmachineCodeLength
- the number of machine code instructions.public void createFinalExceptionTable(IR ir)
ir
- the irpublic void createCodePatchMaps(IR ir)
ir
- the irpublic void applyCodePatches(CompiledMethod cm)
cm
- the method which will be patched