org.jikesrvm.adaptive
Class OnStackReplacementPlan

java.lang.Object
  extended by org.jikesrvm.adaptive.OnStackReplacementPlan
All Implemented Interfaces:
Constants, HeapLayoutConstants, ThinLockConstants, TIBLayoutConstants, SizeConstants

public class OnStackReplacementPlan
extends Object
implements Constants

A OSR_ControllerOnStackReplacementPlan is scheduled by ControllerThread, and executed by the RecompilationThread.

It has the suspended thread whose activation being replaced, and a compilation plan.

The execution of this plan compiles the method, installs the new code, and reschedule the thread.


Field Summary
private  int CMID
           
private  CompilationPlan compPlan
           
private  byte status
          Status is write-only at the moment, but I suspect it comes in handy for debugging -- RJG
private  RVMThread suspendedThread
           
private  int timeCompleted
           
private  int timeInitiated
           
private  Offset tsFromFPoff
           
private  Offset ypTakenFPoff
           
 
Fields inherited from interface org.jikesrvm.Constants
NOT_REACHED, REFLECTION_FPRS_BITS, REFLECTION_FPRS_MASK, REFLECTION_GPRS_BITS, REFLECTION_GPRS_MASK
 
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.objectmodel.TIBLayoutConstants
IMT_METHOD_SLOTS, NEEDS_DYNAMIC_LINK, TIB_ARRAY_ELEMENT_TIB_INDEX, TIB_DOES_IMPLEMENT_INDEX, TIB_FIRST_SPECIALIZED_METHOD_INDEX, TIB_FIRST_VIRTUAL_METHOD_INDEX, TIB_INTERFACE_DISPATCH_TABLE_INDEX, TIB_SUPERCLASS_IDS_INDEX, TIB_TYPE_INDEX
 
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
 
Constructor Summary
OnStackReplacementPlan(RVMThread thread, CompilationPlan cp, int cmid, int source, Offset tsoff, Offset ypoff, double priority)
           
 
Method Summary
 void execute()
           
 int getTimeCompleted()
           
 int getTimeInitiated()
           
 void setStatus(byte newStatus)
           
 void setTimeCompleted(int t)
           
 void setTimeInitiated(int t)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CMID

private final int CMID

tsFromFPoff

private final Offset tsFromFPoff

ypTakenFPoff

private final Offset ypTakenFPoff

status

private byte status
Status is write-only at the moment, but I suspect it comes in handy for debugging -- RJG


suspendedThread

private final RVMThread suspendedThread

compPlan

private final CompilationPlan compPlan

timeInitiated

private int timeInitiated

timeCompleted

private int timeCompleted
Constructor Detail

OnStackReplacementPlan

public OnStackReplacementPlan(RVMThread thread,
                              CompilationPlan cp,
                              int cmid,
                              int source,
                              Offset tsoff,
                              Offset ypoff,
                              double priority)
Method Detail

getTimeInitiated

public int getTimeInitiated()

setTimeInitiated

public void setTimeInitiated(int t)

getTimeCompleted

public int getTimeCompleted()

setTimeCompleted

public void setTimeCompleted(int t)

setStatus

public void setStatus(byte newStatus)

execute

public void execute()