|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.compilers.common.CompiledMethod org.jikesrvm.compilers.opt.runtimesupport.OptCompiledMethod
public final class OptCompiledMethod
An implementation of CompiledMethod for the OPT compiler.
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.
Field Summary | |
---|---|
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 ArchitectureSpecificOpt.OptExceptionDeliverer |
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? |
Fields inherited from class org.jikesrvm.compilers.common.CompiledMethod |
---|
BASELINE, cmid, compilationTime, instructions, JNI, method, NUM_COMPILER_TYPES, OPT, osrJTOCoffset, TRAP |
Constructor Summary | |
---|---|
OptCompiledMethod(int id,
RVMMethod m)
|
Method Summary | |
---|---|
void |
applyCodePatches(CompiledMethod cm)
Apply 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)
|
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()
Get handler to deal with stack unwinding and exception delivery for this compiled method's stackframes. |
int |
getFirstNonVolatileFPR()
|
int |
getFirstNonVolatileGPR()
|
int |
getFrameFixedSize()
|
OptMachineCodeMap |
getMCMap()
|
int |
getNumberOfNonvolatileFPRs()
Return the number of non-volatile FPRs used by this method. |
int |
getNumberOfNonvolatileGPRs()
Return the number of non-volatile GPRs used by this method. |
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()
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 |
void |
setFirstNonVolatileFPR(int x)
|
void |
setFirstNonVolatileGPR(int x)
|
void |
setFrameFixedSize(int x)
|
void |
setInstrumentedMethod(boolean _instrumented)
|
void |
setNumberOfNonvolatileFPRs(short n)
Set the number of non-volatile FPRs used by this method. |
void |
setNumberOfNonvolatileGPRs(short n)
Set the number of non-volatile GPRs used by this method. |
void |
setOptLevel(int x)
|
void |
setSaveVolatile(boolean sv)
|
void |
setUnsignedExceptionOffset(int x)
|
void |
setUnsignedNonVolatileOffset(int x)
|
int |
size()
Return the number of bytes used to encode the compiler-specific mapping information for this compiled method. |
boolean |
up(StackBrowser browser)
Advance the StackBrowser up one internal stack frame, if possible |
Methods inherited from class org.jikesrvm.compilers.common.CompiledMethod |
---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final ArchitectureSpecificOpt.OptExceptionDeliverer 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
Constructor Detail |
---|
public OptCompiledMethod(int id, RVMMethod m)
Method Detail |
---|
public int getCompilerType()
CompiledMethod
getCompilerType
in class CompiledMethod
CompiledMethod.OPT
public String getCompilerName()
getCompilerName
in class CompiledMethod
public ExceptionDeliverer getExceptionDeliverer()
CompiledMethod
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"
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 bytes
true
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 bytes
public void set(StackBrowser browser, Offset instr)
CompiledMethod
set
in class CompiledMethod
public boolean up(StackBrowser browser)
CompiledMethod
up
in class CompiledMethod
public 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()
CompiledMethod
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)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |