abstract class AnalyticModel extends RecompilationStrategy
MultiLevelAdaptiveModel
Constructor and Description |
---|
AnalyticModel() |
Modifier and Type | Method and Description |
---|---|
private ControllerPlan |
chooseOSRRecompilation(HotMethodEvent hme) |
(package private) void |
considerHotCallEdge(CompiledMethod cmpMethod,
AINewHotEdgeEvent event)
This function defines how the analytic model handles a
AINewHotEdgeEvent.
|
(package private) ControllerPlan |
considerHotMethod(CompiledMethod cmpMethod,
HotMethodEvent hme)
This method is the main decision making loop for all
recompilation strategies that use the analytic model.
|
(package private) boolean |
considerOSRRecompilation(CompiledMethod cmpMethod,
HotMethodEvent hme,
ControllerPlan plan) |
(package private) double |
futureTimeForMethod(HotMethodEvent hme)
How much time do we expect to spend in the method in the future if
we take no recompilation action?
|
(package private) abstract RecompilationChoice[] |
getViableRecompilationChoices(int prevCompiler,
CompiledMethod cmpMethod)
Computes the set of optimization choices that should be
considered by the cost-benefit model, given the previous compiler.
|
(package private) void |
init()
Initialize the analytic model:
NOTE: The call to super.init() uses the command line options to
set up the optimization plans, so this must be run after the
command line options are available.
|
(package private) abstract void |
populateRecompilationChoices()
Initialize the set of "optimization choices" that the
cost-benefit model will consider when using will consider when
using adaptive compilation.
|
considerForRecompilation, createCompilationPlan, createControllerPlan, createOptimizationPlans, getMaxOptLevel, getPreviousCompiler, previousRecompilationAttempted, processCommandLineOptions
AnalyticModel()
abstract void populateRecompilationChoices()
abstract RecompilationChoice[] getViableRecompilationChoices(int prevCompiler, CompiledMethod cmpMethod)
prevCompiler
- The compiler compiler that was used to
compile cmpMethodcmpMethod
- The compiled method being consideredvoid init()
init
in class RecompilationStrategy
ControllerPlan considerHotMethod(CompiledMethod cmpMethod, HotMethodEvent hme)
Given a HotMethodRecompilationEvent, this code will determine IF the method should be recompiled, and if so, HOW to perform the recompilation, i.e., what compilation plan should be used. The method returns a controller plan, which contains the compilation plan and other goodies.
considerHotMethod
in class RecompilationStrategy
cmpMethod
- the compiled method of interesthme
- the HotMethodRecompilationEventboolean considerOSRRecompilation(CompiledMethod cmpMethod, HotMethodEvent hme, ControllerPlan plan)
private ControllerPlan chooseOSRRecompilation(HotMethodEvent hme)
hme
- sample data for an outdated cmidvoid considerHotCallEdge(CompiledMethod cmpMethod, AINewHotEdgeEvent event)
considerHotCallEdge
in class RecompilationStrategy
double futureTimeForMethod(HotMethodEvent hme)
hme
- The HotMethodEvent in question