org.jikesrvm.adaptive.controller
Class AINewHotEdgeEvent

java.lang.Object
  extended by org.jikesrvm.adaptive.controller.HotMethodEvent
      extended by org.jikesrvm.adaptive.controller.AINewHotEdgeEvent
All Implemented Interfaces:
ControllerInputEvent

public final class AINewHotEdgeEvent
extends HotMethodEvent
implements ControllerInputEvent

Event used by the Adaptive Inlining Organizer to notify the controller that a call arc originating in a hot method has become hot and therefore recompilation of the method should be considered to enable additional profile-directed inlining.


Field Summary
private  double boostFactor
          Estimate of the expected benefit if the method is recompiled AT THE SAME OPT LEVEL with the newly enabled profile-directed inlining.
 
Constructor Summary
AINewHotEdgeEvent(CompiledMethod _cm, double _numSamples, double _boostFactor)
           
AINewHotEdgeEvent(CompiledMethod _cm, int _numSamples, double _boostFactor)
           
 
Method Summary
 double getBoostFactor()
           
 void process()
          Called when the controller is ready to process this event.
 String toString()
           
 
Methods inherited from class org.jikesrvm.adaptive.controller.HotMethodEvent
getCMID, getCompiledMethod, getMethod, getNumSamples, getOptCompiledLevel, getPrevCompilerConstant, isOptCompiled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

boostFactor

private double boostFactor
Estimate of the expected benefit if the method is recompiled AT THE SAME OPT LEVEL with the newly enabled profile-directed inlining.

TODO: Think about reasonable ways to encode the expected boost factor for recompiling at higher opt levels. In the short run, this is academic, since we only plan to create an instance of this event for methods already compiled at max opt level, but it may be required later.

NB: Boost factor is a value >= 1.0! (1.0 means no boost, 1.1 means a 10% improvement, etc).

Constructor Detail

AINewHotEdgeEvent

AINewHotEdgeEvent(CompiledMethod _cm,
                  double _numSamples,
                  double _boostFactor)
Parameters:
_cm - the compiled method
_numSamples - the number of samples attributed to the method
_boostFactor - improvement expected by applying FDO

AINewHotEdgeEvent

AINewHotEdgeEvent(CompiledMethod _cm,
                  int _numSamples,
                  double _boostFactor)
Parameters:
_cm - the compiled method
_numSamples - the number of samples attributed to the method
_boostFactor - improvement expected by applying FDO
Method Detail

getBoostFactor

public double getBoostFactor()

toString

public String toString()
Overrides:
toString in class HotMethodEvent

process

public void process()
Called when the controller is ready to process this event. Simply passes itself to the recompilation strategy.

Specified by:
process in interface ControllerInputEvent