org.jikesrvm.compilers.common
Class HardwareTrapCompiledMethod

java.lang.Object
  extended by org.jikesrvm.compilers.common.CompiledMethod
      extended by org.jikesrvm.compilers.common.HardwareTrapCompiledMethod
All Implemented Interfaces:
SizeConstants

final class HardwareTrapCompiledMethod
extends CompiledMethod

Information associated with artificial stackframe inserted by hardware trap handler.


Field Summary
 
Fields inherited from class org.jikesrvm.compilers.common.CompiledMethod
BASELINE, cmid, compilationTime, instructions, JNI, method, NUM_COMPILER_TYPES, OPT, osrJTOCoffset, TRAP
 
Fields inherited from interface org.jikesrvm.SizeConstants
BITS_IN_ADDRESS, BITS_IN_BOOLEAN, BITS_IN_BYTE, BITS_IN_CHAR, BITS_IN_DOUBLE, BITS_IN_EXTENT, BITS_IN_FLOAT, BITS_IN_INT, BITS_IN_LONG, BITS_IN_OFFSET, BITS_IN_PAGE, BITS_IN_SHORT, BITS_IN_WORD, BYTES_IN_ADDRESS, BYTES_IN_BOOLEAN, BYTES_IN_BYTE, BYTES_IN_CHAR, BYTES_IN_DOUBLE, BYTES_IN_EXTENT, BYTES_IN_FLOAT, BYTES_IN_INT, BYTES_IN_LONG, BYTES_IN_OFFSET, BYTES_IN_PAGE, BYTES_IN_SHORT, BYTES_IN_WORD, LOG_BITS_IN_ADDRESS, LOG_BITS_IN_BOOLEAN, LOG_BITS_IN_BYTE, LOG_BITS_IN_CHAR, LOG_BITS_IN_DOUBLE, LOG_BITS_IN_EXTENT, LOG_BITS_IN_FLOAT, LOG_BITS_IN_INT, LOG_BITS_IN_LONG, LOG_BITS_IN_OFFSET, LOG_BITS_IN_PAGE, LOG_BITS_IN_SHORT, LOG_BITS_IN_WORD, LOG_BYTES_IN_ADDRESS, LOG_BYTES_IN_BOOLEAN, LOG_BYTES_IN_BYTE, LOG_BYTES_IN_CHAR, LOG_BYTES_IN_DOUBLE, LOG_BYTES_IN_EXTENT, LOG_BYTES_IN_FLOAT, LOG_BYTES_IN_INT, LOG_BYTES_IN_LONG, LOG_BYTES_IN_OFFSET, LOG_BYTES_IN_PAGE, LOG_BYTES_IN_SHORT, LOG_BYTES_IN_WORD
 
Constructor Summary
HardwareTrapCompiledMethod(int id, RVMMethod m)
           
 
Method Summary
 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.
 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.
 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
 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, findLineNumberForInstruction, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HardwareTrapCompiledMethod

public HardwareTrapCompiledMethod(int id,
                                  RVMMethod m)
Method Detail

getCompilerType

public int getCompilerType()
Description copied from class: CompiledMethod
Identify the compiler that produced this compiled method.

Specified by:
getCompilerType in class CompiledMethod
Returns:
one of TRAP, BASELINE, OPT, or JNI. Note: use this instead of "instanceof" when GC is disabled (i.e. during GC)

getCompilerName

public String getCompilerName()
Specified by:
getCompilerName in class CompiledMethod
Returns:
Name of the compiler that produced this compiled method.

getExceptionDeliverer

public ExceptionDeliverer getExceptionDeliverer()
Description copied from class: CompiledMethod
Get handler to deal with stack unwinding and exception delivery for this compiled method's stackframes.

Specified by:
getExceptionDeliverer in class CompiledMethod

findCatchBlockForInstruction

public int findCatchBlockForInstruction(Offset instructionOffset,
                                        RVMType exceptionType)
Description copied from class: CompiledMethod
Find "catch" block for a machine instruction of this method that might be guarded against specified class of exceptions by a "try" block.

Notes:

Specified by:
findCatchBlockForInstruction in class CompiledMethod
Parameters:
instructionOffset - offset of machine instruction from start of this method, in bytes
exceptionType - type of exception being thrown - something like "NullPointerException"
Returns:
offset of machine instruction for catch block (-1 --> no catch block)

getDynamicLink

public void getDynamicLink(DynamicLink dynamicLink,
                           Offset instructionOffset)
Description copied from class: CompiledMethod
Fetch symbolic reference to a method that's called by one of this method's instructions.

Notes:


isWithinUninterruptibleCode

public boolean isWithinUninterruptibleCode(Offset instructionOffset)
Description copied from class: CompiledMethod
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.

Specified by:
isWithinUninterruptibleCode in class CompiledMethod
Parameters:
instructionOffset - of addr from start of instructions in bytes
Returns:
true if the IP is within an Uninterruptible method, false otherwise.

printStackTrace

public void printStackTrace(Offset instructionOffset,
                            PrintLN out)
Description copied from class: CompiledMethod
Print this compiled method's portion of a stack trace

Specified by:
printStackTrace in class CompiledMethod
Parameters:
instructionOffset - offset of machine instruction from start of method
out - the PrintLN to print the stack trace to.

set

public void set(StackBrowser browser,
                Offset instr)
Description copied from class: CompiledMethod
Set the stack browser to the innermost logical stack frame of this method

Specified by:
set in class CompiledMethod

up

public boolean up(StackBrowser browser)
Description copied from class: CompiledMethod
Advance the StackBrowser up one internal stack frame, if possible

Overrides:
up in class CompiledMethod