org.jikesrvm.adaptive.database.callgraph
Class WeightedCallTargets.SingleTarget
java.lang.Object
org.jikesrvm.adaptive.database.callgraph.WeightedCallTargets
org.jikesrvm.adaptive.database.callgraph.WeightedCallTargets.SingleTarget
- Enclosing class:
- WeightedCallTargets
private static final class WeightedCallTargets.SingleTarget
- extends WeightedCallTargets
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 RVMMethod target
weight
private float weight
WeightedCallTargets.SingleTarget
WeightedCallTargets.SingleTarget(RVMMethod t,
double w)
visitTargets
public void visitTargets(WeightedCallTargets.Visitor func)
- Description copied from class:
WeightedCallTargets
- 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 WeightedCallTargets
- Parameters:
func
- the function to evaluate on each target
augmentCount
public WeightedCallTargets augmentCount(RVMMethod t,
double v)
- Description copied from class:
WeightedCallTargets
- 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
WeightedCallTargets accordingly to avoid losing the update.
- Specified by:
augmentCount
in class WeightedCallTargets
decay
public void decay(double rate)
- Description copied from class:
WeightedCallTargets
- Decay the weights of all call targets by the specified amount
- Specified by:
decay
in class WeightedCallTargets
- Parameters:
rate
- the value to decay by
totalWeight
public double totalWeight()
- Description copied from class:
WeightedCallTargets
- totalWeight of all call targets
- Specified by:
totalWeight
in class WeightedCallTargets
filter
public WeightedCallTargets filter(RVMMethod goal,
boolean isPrecise)
- Specified by:
filter
in class WeightedCallTargets
- Parameters:
goal
- RVMMethod that is the statically possible targetisPrecise
- whether or not goal is a precise target, or should be
interpreted as being the root of a virtual method family, any of which
are statically possible.
- Returns:
- the filtered call targets or
null
if no such target exists