|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.adaptive.controller.RecompilationStrategy
public abstract class RecompilationStrategy
An abstract class providing the interface to the decision making component of the controller.
Field Summary | |
---|---|
private OptOptions[] |
_options
|
private OptimizationPlanElement[][] |
_optPlans
|
Constructor Summary | |
---|---|
RecompilationStrategy()
|
Method Summary | |
---|---|
(package private) boolean |
considerForRecompilation(HotMethodEvent hme,
ControllerPlan plan)
Should we consider the hme for recompilation? |
(package private) void |
considerHotCallEdge(CompiledMethod cmpMethod,
AINewHotEdgeEvent event)
A hot call edge has been passed to the controller by an organizer |
(package private) ControllerPlan |
considerHotMethod(CompiledMethod cmpMethod,
HotMethodEvent hme)
A hot method has been passed to the controller by an organizer |
CompilationPlan |
createCompilationPlan(NormalMethod method,
int optLevel,
InstrumentationPlan instPlan)
Construct a compilation plan that will compile the given method with instrumentation. |
(package private) ControllerPlan |
createControllerPlan(RVMMethod method,
int optLevel,
InstrumentationPlan instPlan,
int prevCMID,
double expectedSpeedup,
double expectedCompilationTime,
double priority)
This helper method creates a ControllerPlan, which contains a CompilationPlan, for the passed method using the passed optimization level and instrumentation plan. |
(package private) void |
createOptimizationPlans()
Create the default set of |
(package private) int |
getMaxOptLevel()
What is the maximum opt level that is vallid according to this strategy? |
(package private) int |
getPreviousCompiler(CompiledMethod cmpMethod)
This method retrieves the previous compiler constant. |
(package private) void |
init()
Initialize the recompilation strategy. |
(package private) boolean |
previousRecompilationAttempted(RVMMethod method)
This method returns true if we've already tried to recompile the
passed method. |
static void |
processCommandLineOptions(OptOptions options,
int optLevel,
int maxOptLevel,
String[] optCompilerOptions)
Process the command line arguments and pass the appropriate ones to the Options Called by sampling and counters recompilation strategy. |
private void |
transferSamplesToNewPlan(HotMethodEvent hme)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private OptimizationPlanElement[][] _optPlans
private OptOptions[] _options
Constructor Detail |
---|
public RecompilationStrategy()
Method Detail |
---|
ControllerPlan considerHotMethod(CompiledMethod cmpMethod, HotMethodEvent hme)
void considerHotCallEdge(CompiledMethod cmpMethod, AINewHotEdgeEvent event)
void init()
Note: This uses the command line options to set up the optimization plans, so this must be run after the command line options are available.
ControllerPlan createControllerPlan(RVMMethod method, int optLevel, InstrumentationPlan instPlan, int prevCMID, double expectedSpeedup, double expectedCompilationTime, double priority)
method
- the RVMMethod for the planoptLevel
- the optimization level to use in the planinstPlan
- the instrumentation plan to useprevCMID
- the previous compiled method IDexpectedSpeedup
- expected speedup from this recompilationpriority
- a measure of the oveall benefit we expect to see
by executing this plan.
public CompilationPlan createCompilationPlan(NormalMethod method, int optLevel, InstrumentationPlan instPlan)
method
- The method to be compiled with instrumentationoptLevel
- The opt-level to recompile atinstPlan
- The instrumentation planboolean considerForRecompilation(HotMethodEvent hme, ControllerPlan plan)
hme
- the HotMethodEventplan
- the ControllerPlan for the compiled method (may be null
)
true/false
valueprivate void transferSamplesToNewPlan(HotMethodEvent hme)
boolean previousRecompilationAttempted(RVMMethod method)
true
if we've already tried to recompile the
passed method. It does not guarantee that the compilation was
successful.
method
- the method of interest
int getPreviousCompiler(CompiledMethod cmpMethod)
int getMaxOptLevel()
void createOptimizationPlans()
public static void processCommandLineOptions(OptOptions options, int optLevel, int maxOptLevel, String[] optCompilerOptions)
options
- The options being constructedoptLevel
- The level of the options being constructedmaxOptLevel
- The maximum valid opt leveloptCompilerOptions
- The list of command line options
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |