public final class JNICompiledMethod extends CompiledMethod
Exception delivery should never see Native C frames, or the Java to C transition frame. Native C code is redispatched during exception handling to either process/handle and clear the exception or to return to Java leaving the exception pending. If it returns to the transition frame with a pending exception. JNI causes an athrow to happen as if it was called at the call site of the call to the native method.
| Modifier and Type | Field and Description |
|---|---|
private static ExceptionDeliverer |
deliverer
Architecture specific deliverer of exceptions
|
BASELINE, cmid, compilationTime, instructions, JNI, method, NATIVE_METHOD_LINE_NUMBER, NUM_COMPILER_TYPES, OPT, osrJTOCoffset, TRAP| Constructor and Description |
|---|
JNICompiledMethod(int id,
RVMMethod m) |
| Modifier and Type | Method and Description |
|---|---|
int |
findCatchBlockForInstruction(Offset instructionOffset,
RVMType exceptionType)
Find "catch" block for a machine instruction of
this method that might be guarded
against specified class of exceptions by a "try" block.
|
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() |
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 |
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.
|
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, size, upprivate static final ExceptionDeliverer deliverer
public JNICompiledMethod(int id, RVMMethod m)
public int getCompilerType()
CompiledMethodgetCompilerType in class CompiledMethodpublic String getCompilerName()
getCompilerName in class CompiledMethodpublic ExceptionDeliverer getExceptionDeliverer()
getExceptionDeliverer in class CompiledMethodpublic void getDynamicLink(DynamicLink dynamicLink, Offset instructionOffset)
CompiledMethodNotes:
getDynamicLink in class CompiledMethoddynamicLink - place to put return informationinstructionOffset - offset of machine instruction from start of
this method, in bytespublic boolean isWithinUninterruptibleCode(Offset instructionOffset)
CompiledMethodisWithinUninterruptibleCode in class CompiledMethodinstructionOffset - of addr from start of instructions in bytestrue if the IP is within an Uninterruptible method, false otherwise.public int findLineNumberForInstruction(Offset instructionOffset)
CompiledMethodUsage 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 CompiledMethodinstructionOffset - of machine instruction from start of this method, in bytespublic int findCatchBlockForInstruction(Offset instructionOffset, RVMType exceptionType)
CompiledMethodNotes:
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".
findCatchBlockForInstruction in class CompiledMethodinstructionOffset - offset of machine instruction from start of this method, in bytesexceptionType - type of exception being thrown - something like "NullPointerException"public void printStackTrace(Offset instructionOffset, PrintLN out)
CompiledMethodprintStackTrace in class CompiledMethodinstructionOffset - offset of machine instruction from start of methodout - the PrintLN to print the stack trace to.public void set(StackBrowser browser, Offset instr)
CompiledMethodset in class CompiledMethodbrowser - the browserinstr - the offset of the instruction