Callstack Module

Provide an API to manipulate callstacks and weighted trees. This modules uses objects of class IWeightedTreeProvider that can be obtained from a trace by requesting an analysis that implements the interface.

For example, the following scriptlet would get the LTTng-UST CallStack (Incubator) analysis, which implements the weighted tree provider, for the active LTTng UST trace. The object can then be used as parameter for the methods of this module.

 trace = getActiveTrace()
 wtProvider = getTraceAnalysis(trace, "org.eclipse.tracecompass.incubator.callstack.core.lttng.ust");
 

Method Overview

Method Description
diffTreeSets() Differentiates 2 treesets
getFlameGraphDataProvider() Get a flame graph data provider for a weighted tree provider.
groupTreesBy() Group the trees of the provider's main treeset, up to the requested level.

Methods

diffTreeSets

org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.DifferentialWeightedTreeProvider diffTreeSets(org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.IWeightedTreeProvider<N, ?, org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.WeightedTree<N>> provider, org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.IWeightedTreeSet<N, ?, org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.WeightedTree<N>> first, org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.IWeightedTreeSet<N, ?, org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.WeightedTree<N>> second, [int minSignificantValue], [int maxSignificantValue])

Differentiates 2 treesets

provider
The original weighted tree provider, whose values will be used for the metrics, palettes, etc
first
The base treeset for comparison
second
The treeset to compare to
minSignificantValue
The value as a percentage (between 0 and 100), under which is difference should not be highlightedOptional: defaults to <-1>.
maxSignificantValue
The value as a percentage (between 0 and 100), above which the difference should be highlighted at the maximal value.Optional: defaults to <-1>.

The resulting differential weighted tree provider containing the result of the difference between the 2 trees

getFlameGraphDataProvider

org.eclipse.tracecompass.incubator.internal.callstack.core.flamegraph.FlameGraphDataProvider getFlameGraphDataProvider(ITmfTrace trace, org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.IWeightedTreeProvider<N, E, T> provider, String id)

Get a flame graph data provider for a weighted tree provider. The weighted tree provider can be the result of the .diffTreeSets method

trace
The trace for which to get the data provider. It is required for the data provider base class.
provider
The weighted tree provider that will provide the data
id
The ID of the data provider

The resulting flame graph data provider

groupTreesBy

org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.IWeightedTreeSet groupTreesBy(org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.IWeightedTreeProvider<N, E, org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.WeightedTree<N>> provider, int level)

Group the trees of the provider's main treeset, up to the requested level. For example, if a treeset's elements are grouped in a hierarchical manner with the following element hierarchy:

 element 1
    {@literal -->} element 2
    {@literal -->} element 3
 element 4
    {@literal -->} element 5
 
this method with a level of 1 would result in a treeset with 2 elements: element 1 and element 4, each containing a merge of the weighted trees of their respective children elements.

provider
The IWeightedTreeProvider object containing the treeset for which to group trees.
level
The hierarchical level after which the elements' trees will be merged together. A value of 0 would group all the weighted trees together in a single element.

The weighted tree set with weighted grouped at the requested level.