Class CallGraph
java.lang.Object
org.eclipse.tracecompass.incubator.callstack.core.callgraph.CallGraph
- All Implemented Interfaces:
IWeightedTreeSet<@NonNull ICallStackSymbol,
ICallStackElement, AggregatedCallSite>
public class CallGraph
extends Object
implements IWeightedTreeSet<@NonNull ICallStackSymbol,ICallStackElement,AggregatedCallSite>
Represents a callgraph, ie the aggregation of callsites per elements.
TODO: Have an interface and keep the add* method internal
- Author:
- Geneviève Bastien
-
Field Summary
Modifier and TypeFieldDescriptionstatic final CallGraph
An empty graph that can be returned when there is no other call graph available -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAggregatedCallSite
(ICallStackElement dstGroup, AggregatedCallSite callsite) Add an aggregated callsite toa callstack element.getCallingContextTree
(ICallStackElement element) Gets the calling context tree for an element.Get the root elements containing the call graph data.getTreesFor
(Object element) Get the weighted trees for a given elementMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.IWeightedTreeSet
getExtraDataSets, getTreesForNamed
-
Field Details
-
EMPTY_GRAPH
An empty graph that can be returned when there is no other call graph available
-
-
Constructor Details
-
CallGraph
public CallGraph()Constructor
-
-
Method Details
-
getCallingContextTree
Gets the calling context tree for an element. The calling context tree is the callgraph data aggregated by keeping the context of each call.- Parameters:
element
- The element for which to get the calling context tree- Returns:
- The aggregated data for the first level of the callgraph
-
addAggregatedCallSite
Add an aggregated callsite toa callstack element.- Parameters:
dstGroup
- the destination groupcallsite
- the callsite to add
-
getElements
Get the root elements containing the call graph data.- Specified by:
getElements
in interfaceIWeightedTreeSet<@NonNull ICallStackSymbol,
ICallStackElement, AggregatedCallSite> - Returns:
- The root elements of the call graph
-
getTreesFor
Description copied from interface:IWeightedTreeSet
Get the weighted trees for a given element- Specified by:
getTreesFor
in interfaceIWeightedTreeSet<@NonNull ICallStackSymbol,
ICallStackElement, AggregatedCallSite> - Parameters:
element
- The element for which to get the trees- Returns:
- A collection of weighted trees for the requested element
-