org.jikesrvm.osr.ia32
Class OptExecutionStateExtractor
java.lang.Object
org.jikesrvm.osr.ExecutionStateExtractor
org.jikesrvm.osr.ia32.OptExecutionStateExtractor
- All Implemented Interfaces:
- ClassLoaderConstants, PhysicalRegisterConstants, Constants, HeapLayoutConstants, ArchConstants, RegisterConstants, StackframeLayoutConstants, TrapConstants, ThinLockConstants, TIBLayoutConstants, OSRConstants, SizeConstants
- Direct Known Subclasses:
- ArchitectureSpecificOpt.OptExecutionStateExtractor
public abstract class OptExecutionStateExtractor
- extends ExecutionStateExtractor
- implements Constants, ArchConstants, OSRConstants, PhysicalRegisterConstants
OptExecutionStateExtractor is a subclass of ExecutionStateExtractor.
It extracts the execution state from an optimized activation.
Fields inherited from interface org.jikesrvm.objectmodel.ThinLockConstants |
TL_DEDICATED_U16_OFFSET, TL_DEDICATED_U16_SHIFT, TL_LOCK_COUNT_MASK, TL_LOCK_COUNT_SHIFT, TL_LOCK_COUNT_UNIT, TL_LOCK_ID_MASK, TL_LOCK_ID_SHIFT, TL_NUM_BITS_RC, TL_NUM_BITS_STAT, TL_NUM_BITS_TID, TL_STAT_BIASABLE, TL_STAT_FAT, TL_STAT_MASK, TL_STAT_SHIFT, TL_STAT_THIN, TL_THREAD_ID_MASK, TL_THREAD_ID_SHIFT, TL_UNLOCK_MASK |
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 |
Fields inherited from interface org.jikesrvm.HeapLayoutConstants |
BAD_MAP_COMPRESSION, BOOT_IMAGE_CODE_END, BOOT_IMAGE_CODE_SIZE, BOOT_IMAGE_CODE_START, BOOT_IMAGE_DATA_END, BOOT_IMAGE_DATA_SIZE, BOOT_IMAGE_DATA_START, BOOT_IMAGE_END, BOOT_IMAGE_RMAP_END, BOOT_IMAGE_RMAP_START, MAX_BOOT_IMAGE_RMAP_SIZE, MAXIMUM_MAPPABLE |
Fields inherited from interface org.jikesrvm.ia32.StackframeLayoutConstants |
BYTES_IN_STACKSLOT, FPU_STATE_SIZE, INVISIBLE_METHOD_ID, LOG_BYTES_IN_STACKSLOT, STACK_SIZE_BOOT, STACK_SIZE_COLLECTOR, STACK_SIZE_DLOPEN, STACK_SIZE_GCDISABLED, STACK_SIZE_GROW, STACK_SIZE_GUARD, STACK_SIZE_JNINATIVE_GROW, STACK_SIZE_MAX, STACK_SIZE_NORMAL, STACK_SIZE_SYSCALL, STACKFRAME_ALIGNMENT, STACKFRAME_BODY_OFFSET, STACKFRAME_FRAME_POINTER_OFFSET, STACKFRAME_HEADER_SIZE, STACKFRAME_METHOD_ID_OFFSET, STACKFRAME_RETURN_ADDRESS_OFFSET, STACKFRAME_SENTINEL_FP, XMM_STATE_SIZE |
Fields inherited from interface org.jikesrvm.osr.OSRConstants |
ACONST, BCI_MASK, BCI_SHIFT, CLEANREFS, DOUBLE, FLOAT, GETREFAT, HIGH_64BIT, ICONST, IEI_MASK, IEI_SHIFT, INT, INVALID_BCI, INVALID_IEI, KIND_MASK, KIND_SHIFT, LCONST, LOCAL, LONG, NEXT_BIT, NO_OSR_ENTRY, NUM_MASK, NUM_SHIFT, OFFSET_MASK, OFFSET_SHIFT, OSRI_MASK, OSRI_SHIFT, PHYREG, PSEUDO_CheckCast, PSEUDO_InvokeCompiledMethod, PSEUDO_InvokeStatic, PSEUDO_LoadDoubleConst, PSEUDO_LoadFloatConst, PSEUDO_LoadIntConst, PSEUDO_LoadLongConst, PSEUDO_LoadRetAddrConst, PSEUDO_LoadWordConst, PSEUDO_ParamInitEnd, REF, RET_ADDR, ReturnAddressTypeCode, SPILL, STACK, TCODE_MASK, TCODE_SHIFT, VTYPE_MASK, VTYPE_SHIFT, WORD, WordTypeCode |
Fields inherited from interface org.jikesrvm.classloader.ClassLoaderConstants |
ACC_ABSTRACT, ACC_ANNOTATION, ACC_ENUM, ACC_FINAL, ACC_INTERFACE, ACC_NATIVE, ACC_PRIVATE, ACC_PROTECTED, ACC_PUBLIC, ACC_STATIC, ACC_STRICT, ACC_SUPER, ACC_SYNCHRONIZED, ACC_SYNTHETIC, ACC_TRANSIENT, ACC_VOLATILE, APPLICABLE_TO_CLASSES, APPLICABLE_TO_FIELDS, APPLICABLE_TO_METHODS, ArrayTypeCode, BooleanTypeCode, BRIDGE, ByteTypeCode, CharTypeCode, CLASS_INITIALIZED, CLASS_INITIALIZER_FAILED, CLASS_INITIALIZING, CLASS_INSTANTIATED, CLASS_LOADED, CLASS_RESOLVED, CLASS_VACANT, ClassTypeCode, CP_CLASS, CP_DOUBLE, CP_FLOAT, CP_INT, CP_LONG, CP_MEMBER, CP_STRING, CP_UTF, DoubleTypeCode, FloatTypeCode, IntTypeCode, LongTypeCode, ShortTypeCode, TAG_DOUBLE, TAG_FIELDREF, TAG_FLOAT, TAG_INT, TAG_INTERFACE_METHODREF, TAG_LONG, TAG_MEMBERNAME_AND_DESCRIPTOR, TAG_METHODREF, TAG_STRING, TAG_TYPEREF, TAG_UNUSED, TAG_UTF, VARARGS, VoidTypeCode |
Fields inherited from interface org.jikesrvm.compilers.opt.regalloc.ia32.PhysicalRegisterConstants |
AF, C0, C1, C2, C3, CF, CONDITION_VALUE, DOUBLE_REG, DOUBLE_VALUE, FIRST_DOUBLE, FIRST_INT, FIRST_SPECIAL, FLOAT_VALUE, INT_REG, INT_VALUE, NUM_SPECIALS, NUMBER_TYPE, OF, PF, SF, SPECIAL_REG, ST0, ST1, ZF |
Fields inherited from interface org.jikesrvm.ia32.RegisterConstants |
ALL_FPRS, ALL_GPRS, EAX, EBP, EBX, ECX, EDI, EDX, ESI, ESP, FP0, FP1, FP2, FP3, FP4, FP5, FP6, FP7, INSTRUCTION_WIDTH, LG_INSTRUCTION_WIDTH, MM0, MM1, MM10, MM11, MM12, MM13, MM14, MM15, MM2, MM3, MM4, MM5, MM6, MM7, MM8, MM9, NATIVE_NONVOLATILE_FPRS, NATIVE_NONVOLATILE_GPRS, NATIVE_PARAMETER_FPRS, NATIVE_PARAMETER_GPRS, NATIVE_VOLATILE_FPRS, NATIVE_VOLATILE_GPRS, NONVOLATILE_FPRS, NONVOLATILE_GPRS, NUM_FPRS, NUM_GPRS, NUM_NONVOLATILE_FPRS, NUM_NONVOLATILE_GPRS, NUM_PARAMETER_FPRS, NUM_PARAMETER_GPRS, NUM_RETURN_FPRS, NUM_RETURN_GPRS, NUM_VOLATILE_FPRS, NUM_VOLATILE_GPRS, PARAMETER_FPRS, PARAMETER_GPRS, R0, R1, R10, R11, R12, R13, R14, R15, R2, R3, R4, R5, R6, R7, R8, R9, RETURN_FPRS, RETURN_GPRS, STACK_POINTER, THREAD_REGISTER, VOLATILE_FPRS, VOLATILE_GPRS, XMM0, XMM1, XMM10, XMM11, XMM12, XMM13, XMM14, XMM15, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7, XMM8, XMM9 |
Method Summary |
private static void |
dumpRegisterContent(WordArray gprs)
|
private static void |
dumpStackContent(byte[] stack,
Offset fpOffset)
|
ExecutionState |
extractState(RVMThread thread,
Offset osrFPoff,
Offset methFPoff,
int cmid)
Returns a VM scope descriptor (ExecutionState) for a compiled method
on the top of a thread stack, (or a list of descriptors for an inlined
method). |
private static double |
getDoubleFrom(int vtype,
int value,
byte[] stack,
Offset fpOffset,
TempRegisters registers)
|
private ExecutionState |
getExecStateSequence(RVMThread thread,
byte[] stack,
Offset ipOffset,
Offset fpOffset,
int cmid,
Offset tsFPOffset,
TempRegisters registers,
EncodedOSRMap osrmap)
|
private static int |
getIntBitsFrom(int vtype,
int value,
byte[] stack,
Offset fpOffset,
TempRegisters registers)
auxillary functions to get value from different places. |
private static long |
getLongBitsFrom(int vtypeHigh,
int valueHigh,
int vtypeLow,
int valueLow,
byte[] stack,
Offset fpOffset,
TempRegisters registers)
|
private static Object |
getObjectFrom(int vtype,
int value,
byte[] stack,
Offset fpOffset,
TempRegisters registers)
|
private void |
restoreValuesFromOptSaveVolatile(byte[] stack,
Offset osrFPoff,
TempRegisters registers,
int regmap,
CompiledMethod cm)
|
private static void |
walkOnStack(byte[] stack,
Offset fpOffset)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OptExecutionStateExtractor
public OptExecutionStateExtractor()
extractState
public ExecutionState extractState(RVMThread thread,
Offset osrFPoff,
Offset methFPoff,
int cmid)
- Description copied from class:
ExecutionStateExtractor
- Returns a VM scope descriptor (ExecutionState) for a compiled method
on the top of a thread stack, (or a list of descriptors for an inlined
method).
- Specified by:
extractState
in class ExecutionStateExtractor
- Parameters:
thread
- a suspended RVM threadosrFPoff
- the frame pointer offset of the threadSwitchFrom methodmethFPoff
- the frame pointer offset of the real method where
yield point was taken. tsFrom is the callee of ypTakencmid
- the compiled method id of ypTaken
restoreValuesFromOptSaveVolatile
private void restoreValuesFromOptSaveVolatile(byte[] stack,
Offset osrFPoff,
TempRegisters registers,
int regmap,
CompiledMethod cm)
getExecStateSequence
private ExecutionState getExecStateSequence(RVMThread thread,
byte[] stack,
Offset ipOffset,
Offset fpOffset,
int cmid,
Offset tsFPOffset,
TempRegisters registers,
EncodedOSRMap osrmap)
getIntBitsFrom
private static int getIntBitsFrom(int vtype,
int value,
byte[] stack,
Offset fpOffset,
TempRegisters registers)
- auxillary functions to get value from different places.
getLongBitsFrom
private static long getLongBitsFrom(int vtypeHigh,
int valueHigh,
int vtypeLow,
int valueLow,
byte[] stack,
Offset fpOffset,
TempRegisters registers)
getDoubleFrom
private static double getDoubleFrom(int vtype,
int value,
byte[] stack,
Offset fpOffset,
TempRegisters registers)
getObjectFrom
private static Object getObjectFrom(int vtype,
int value,
byte[] stack,
Offset fpOffset,
TempRegisters registers)
dumpStackContent
private static void dumpStackContent(byte[] stack,
Offset fpOffset)
dumpRegisterContent
private static void dumpRegisterContent(WordArray gprs)
walkOnStack
private static void walkOnStack(byte[] stack,
Offset fpOffset)