org.jikesrvm.adaptive.util
Class UnResolvedWeightedCallTargets.UnResolvedSingleTarget
java.lang.Object
org.jikesrvm.adaptive.util.UnResolvedWeightedCallTargets
org.jikesrvm.adaptive.util.UnResolvedWeightedCallTargets.UnResolvedSingleTarget
- Enclosing class:
- UnResolvedWeightedCallTargets
private static final class UnResolvedWeightedCallTargets.UnResolvedSingleTarget
- extends UnResolvedWeightedCallTargets
An implementation for storing a call site distribution that has a single target.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
target
private final MethodReference target
weight
private float weight
UnResolvedWeightedCallTargets.UnResolvedSingleTarget
UnResolvedWeightedCallTargets.UnResolvedSingleTarget(MethodReference t,
double w)
visitTargets
public void visitTargets(UnResolvedWeightedCallTargets.Visitor func)
- Description copied from class:
UnResolvedWeightedCallTargets
- Iterate over all of the targets, evaluating the argument function on each edge.
NOTE: We guarantee that the targets will be iterated in monotonically decreasing
edge weight. This simplifies the coding of the inlining clients that consume
this information.
- Specified by:
visitTargets
in class UnResolvedWeightedCallTargets
- Parameters:
func
- the function to evaluate on each target
augmentCount
public UnResolvedWeightedCallTargets augmentCount(MethodReference t,
double v)
- Description copied from class:
UnResolvedWeightedCallTargets
- Augment the weight associated with the argument method by the argument amount.
NOTE: This method may change the representation of the target
method. The caller must be sure to update their backing store of
UnResolvedWeightedCallTargets accordingly to avoid losing the update.
- Specified by:
augmentCount
in class UnResolvedWeightedCallTargets
decay
public void decay(double rate)
- Description copied from class:
UnResolvedWeightedCallTargets
- Decay the weights of all call targets by the specified amount
- Specified by:
decay
in class UnResolvedWeightedCallTargets
- Parameters:
rate
- the value to decay by
totalWeight
public double totalWeight()
- Description copied from class:
UnResolvedWeightedCallTargets
- totalWeight of all call targets
- Specified by:
totalWeight
in class UnResolvedWeightedCallTargets
filter
public UnResolvedWeightedCallTargets filter(MethodReference goal)
- Specified by:
filter
in class UnResolvedWeightedCallTargets
- Parameters:
goal
- MethodReference that is the only statically possible target
- Returns:
- the filtered call targets or null if no such target exists