public final class ControllerPlan extends Object
Constraints: Given the plan list of a method:
status states:
UNINITIALIZED -> IN_PROGRESS -> COMPLETED -> OUTDATED \ \--> ABORTED_COMPILATION_ERROR (never recompile method)
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
ControllerPlan(CompilationPlan compPlan,
int timeCreated,
int prevCMID,
double expectedSpeedup,
double expectedCompilationTime,
double priority)
Construct a controller plan
|
Modifier and Type | Method and Description |
---|---|
CompiledMethod |
doRecompile()
This method will recompile the method designated by the controller plan
getCompPlan() . |
boolean |
execute()
Execute the plan.
|
int |
getCMID() |
CompilationPlan |
getCompPlan() |
double |
getExpectedCompilationTime() |
double |
getExpectedSpeedup() |
int |
getPrevCMID() |
double |
getPriority() |
byte |
getStatus() |
String |
getStatusString() |
int |
getTimeCompleted() |
int |
getTimeCreated() |
int |
getTimeInitiated() |
void |
setCMID(int x) |
void |
setPlanList(LinkedList<ControllerPlan> list) |
void |
setStatus(byte newStatus) |
void |
setTimeCompleted(int t) |
void |
setTimeInitiated(int t) |
String |
toString() |
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 final CompilationPlan compPlan
private final int timeCreated
private int timeInitiated
private int timeCompleted
private final double expectedSpeedup
private final double expectedCompilationTime
private final double priority
private int CMID
private final int prevCMID
private byte status
private LinkedList<ControllerPlan> planList
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?public boolean execute()
true
on success, false
on failurepublic CompiledMethod doRecompile()
getCompPlan()
. It also
null
if the compilation was aborted, the new compiled
method otherwisepublic 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()