org.jikesrvm.adaptive.controller
Class RecompilationChoice

java.lang.Object
  extended by org.jikesrvm.adaptive.controller.RecompilationChoice
Direct Known Subclasses:
RecompileOptChoice

abstract class RecompilationChoice
extends Object

A recompilation choice represents an action (or a set of actions) that can be considered by the controller's analytic model.


Constructor Summary
RecompilationChoice()
           
 
Method Summary
(package private) abstract  double getCost(NormalMethod meth)
          What is the cost of selecting this recompilation choice?
(package private) abstract  double getFutureExecutionTime(int prevCompiler, double futureExecutionTime)
          What is the benefit of executing this recompilation choice, given the estimated future time for the method if nothing changes?
(package private) abstract  ControllerPlan makeControllerPlan(CompiledMethod cmpMethod, int prevCompiler, double prevTimeFormethod, double bestActionTime, double bestCost)
          Return a controller plan that will start this recompilation choice in action.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecompilationChoice

RecompilationChoice()
Method Detail

getCost

abstract double getCost(NormalMethod meth)
What is the cost of selecting this recompilation choice?

Parameters:
meth - The method being considered for recompilation.
Returns:
The expected cost of executing this recompilation choice

getFutureExecutionTime

abstract double getFutureExecutionTime(int prevCompiler,
                                       double futureExecutionTime)
What is the benefit of executing this recompilation choice, given the estimated future time for the method if nothing changes?

Parameters:
prevCompiler - The previous compiler
futureExecutionTime - The expected future execution time of the method if left running with the previous compiler.
Returns:
The expected future execution time if this choice were selected

makeControllerPlan

abstract ControllerPlan makeControllerPlan(CompiledMethod cmpMethod,
                                           int prevCompiler,
                                           double prevTimeFormethod,
                                           double bestActionTime,
                                           double bestCost)
Return a controller plan that will start this recompilation choice in action.

Parameters:
cmpMethod - The method in question
prevCompiler - The previous compiler
prevTimeFormethod - The estimated future time had nothing been done
bestActionTime - The estimated total time implementing this choice
bestCost - The estimated compilation cost implementing this choice
Returns:
The controller plan implementing this recompilation choice