|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.adaptive.database.callgraph.PartialCallGraph
public final class PartialCallGraph
A partial call graph (PCG) is a partial mapping from callsites to weighted targets.
Nested Class Summary | |
---|---|
private class |
PartialCallGraph.OrderByTotalWeight
Used to compare two call sites by total weight. |
Field Summary | |
---|---|
private HashMap<CallSite,WeightedCallTargets> |
callGraph
The dynamic call graph, which is a mapping from CallSites to WeightedCallTargets. |
private double |
seedWeight
Initial seed weight; saved for use in the reset method |
private double |
totalEdgeWeights
sum of all edge weights in the call graph |
private HashMap<UnResolvedCallSite,UnResolvedWeightedCallTargets> |
unresolvedCallGraph
|
Constructor Summary | |
---|---|
PartialCallGraph(double initialWeight)
Create a partial call graph. |
Method Summary | |
---|---|
private void |
augmentEdge(RVMMethod caller,
int bcIndex,
RVMMethod callee,
double weight)
Increment the edge represented by the input parameters, creating it if it is not already in the call graph. |
void |
decay()
Visit the WeightedCallTargets for every call site send them the decay message. |
void |
dumpGraph()
Dump all profile data to the given file |
void |
dumpGraph(String fn)
Dump all profile data to the given file |
WeightedCallTargets |
getCallTargets(CallSite callSite)
|
WeightedCallTargets |
getCallTargets(RVMMethod caller,
int bcIndex)
|
double |
getTotalEdgeWeights()
|
void |
incrementEdge(RVMMethod caller,
int bcIndex,
RVMMethod callee)
Increment the edge represented by the input parameters, creating it if it is not already in the call graph. |
void |
incrementEdge(RVMMethod caller,
int bcIndex,
RVMMethod callee,
float weight)
Increment the edge represented by the input parameters, creating it if it is not already in the call graph. |
void |
incrementUnResolvedEdge(MethodReference callerRef,
int bcIndex,
MethodReference calleeRef,
float weight)
For the calling edge we read from a profile, we may not have the methods loaded in yet. |
void |
report()
Dump out set of edges in sorted order. |
void |
reset()
reset (clear) data set being gathered |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final HashMap<CallSite,WeightedCallTargets> callGraph
private final HashMap<UnResolvedCallSite,UnResolvedWeightedCallTargets> unresolvedCallGraph
private double totalEdgeWeights
private final double seedWeight
Constructor Detail |
---|
public PartialCallGraph(double initialWeight)
initialWeight
- an initial value for totalEdgeWeights.
Used by AOS to cause inlining based in the dynamic call graph
to initially be conservative until sufficient samples have
accumulated that there is more confidence in the accuracy
of the call graph.Method Detail |
---|
public void reset()
Reportable
reset
in interface Reportable
public double getTotalEdgeWeights()
public void decay()
decay
in interface Decayable
public WeightedCallTargets getCallTargets(RVMMethod caller, int bcIndex)
caller
- caller methodbcIndex
- bytecode index in caller method
public WeightedCallTargets getCallTargets(CallSite callSite)
callSite
- the callsite to look for
public void incrementEdge(RVMMethod caller, int bcIndex, RVMMethod callee)
caller
- method making the callbcIndex
- call site, if -1 then no call site is specified.callee
- method calledpublic void incrementEdge(RVMMethod caller, int bcIndex, RVMMethod callee, float weight)
caller
- method making the callbcIndex
- call site, if -1 then no call site is specified.callee
- method calledweight
- the frequency of this calling edgepublic void incrementUnResolvedEdge(MethodReference callerRef, int bcIndex, MethodReference calleeRef, float weight)
callerRef
- method making the callbcIndex
- call site, if -1 then no call site is specified.calleeRef
- method calledweight
- the frequency of this calling edgeprivate void augmentEdge(RVMMethod caller, int bcIndex, RVMMethod callee, double weight)
caller
- method making the callbcIndex
- call site, if -1 then no call site is specified.callee
- method calledweight
- the frequency of this calling edgepublic void report()
report
in interface Reportable
public void dumpGraph()
public void dumpGraph(String fn)
fn
- output file name
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |