|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.adaptive.controller.ControllerPlan
public final class ControllerPlan
An instance of this class describes a compilation decision made by the controller.
Constraints: Given the plan list of a method:
status states:
UNINITIALIZED -> IN_PROGRESS -> COMPLETED -> OUTDATED \ \--> ABORTED_COMPILATION_ERROR (never recompile method)
Field Summary | |
---|---|
static byte |
ABORTED_COMPILATION_ERROR
Compilation for the method was begun, but failed in an error |
private int |
CMID
The compiled method ID for this plan |
static byte |
COMPLETED
The plan was successfully completed, i.e., the method was recompiled |
private CompilationPlan |
compPlan
The associate compilation plan |
private double |
expectedCompilationTime
The compilation time we were expecting |
private double |
expectedSpeedup
The speedup we were expecting |
static byte |
IN_PROGRESS
The compilation is still in progress |
static byte |
OSR_BASE_2_OPT
The compilation plan is for a promotion from BASE to OPT |
static byte |
OUTDATED
The compilation completed, but a new plan for the same method also completed, so this is not the most recent completed plan |
private LinkedList<ControllerPlan> |
planList
The list that we are onstatus of this plan |
private int |
prevCMID
The compiled method ID for the previous plan for this method |
private double |
priority
The priority associated with this plan |
private byte |
status
The status of this plan |
private int |
timeCompleted
The time compilation end |
private int |
timeCreated
The time we created this plan |
private int |
timeInitiated
The time compilation began |
static byte |
UNINITIALIZED
The plan was created, but the setStatus method was never called |
static byte |
UNKNOWN
This is used by clients to initialize local variables for Java semantics |
Constructor Summary | |
---|---|
ControllerPlan(CompilationPlan compPlan,
int timeCreated,
int prevCMID,
double expectedSpeedup,
double expectedCompilationTime,
double priority)
Construct a controller plan |
Method Summary | |
---|---|
CompiledMethod |
doRecompile()
This method will recompile the method designated by the controller plan getCompPlan() . |
boolean |
execute()
Execute the plan. |
int |
getCMID()
CMID (compiled method id) associated with the code produced by executing this plan |
CompilationPlan |
getCompPlan()
The compilation plan |
double |
getExpectedCompilationTime()
The expected compilation time for this method |
double |
getExpectedSpeedup()
The expected speedup for this method due to this recompilation |
int |
getPrevCMID()
CMID (compiled method id) associated with the *PREVIOUS* compiled version of this method |
double |
getPriority()
The priority (how important is it that this plan be executed) |
byte |
getStatus()
Status of this compilation plan, choose from the values above |
String |
getStatusString()
|
int |
getTimeCompleted()
The time (according to the controller clock) compilation of this plan completed. |
int |
getTimeCreated()
The time this plan was created |
int |
getTimeInitiated()
The time (according to the controller clock) compilation of this plan began. |
void |
setCMID(int x)
|
void |
setPlanList(LinkedList<ControllerPlan> list)
List of plans for a source method |
void |
setStatus(byte newStatus)
|
void |
setTimeCompleted(int t)
|
void |
setTimeInitiated(int t)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final byte UNINITIALIZED
public static final byte COMPLETED
public static final byte ABORTED_COMPILATION_ERROR
public static final byte IN_PROGRESS
public static final byte OUTDATED
public static final byte OSR_BASE_2_OPT
public static final byte UNKNOWN
private CompilationPlan compPlan
private int timeCreated
private int timeInitiated
private int timeCompleted
private double expectedSpeedup
private double expectedCompilationTime
private double priority
private int CMID
private int prevCMID
private byte status
private LinkedList<ControllerPlan> planList
Constructor Detail |
---|
public ControllerPlan(CompilationPlan compPlan, int timeCreated, int prevCMID, double expectedSpeedup, double expectedCompilationTime, double priority)
compPlan
- The compilation plantimeCreated
- The "time" this plan was createdprevCMID
- The previous compiled method IDexpectedSpeedup
- Expected recompilation benefitexpectedCompilationTime
- Expected recompilation costpriority
- How important is executing this plan?Method Detail |
---|
public boolean execute()
true
on success, false
on failurepublic CompiledMethod doRecompile()
getCompPlan()
. It also
public CompilationPlan getCompPlan()
public double getExpectedSpeedup()
public double getExpectedCompilationTime()
public double getPriority()
public int getTimeCreated()
public int getTimeInitiated()
public void setTimeInitiated(int t)
public int getTimeCompleted()
public void setTimeCompleted(int t)
public int getCMID()
public void setCMID(int x)
public int getPrevCMID()
public byte getStatus()
public void setStatus(byte newStatus)
public void setPlanList(LinkedList<ControllerPlan> list)
public String getStatusString()
public String toString()
toString
in class Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |