Class InstrumentedCallStackAnalysis
java.lang.Object
org.eclipse.tracecompass.tmf.core.component.TmfComponent
org.eclipse.tracecompass.tmf.core.analysis.TmfAbstractAnalysisModule
org.eclipse.tracecompass.tmf.core.statesystem.TmfStateSystemAnalysisModule
org.eclipse.tracecompass.incubator.callstack.core.instrumented.statesystem.InstrumentedCallStackAnalysis
- All Implemented Interfaces:
ISegmentStoreProvider
,IWeightedTreeProvider<@NonNull ICallStackSymbol,
,ICallStackElement, AggregatedCallSite> ICallGraphProvider
,IFlameChartProvider
,IAnalysisModule
,IAnalysisRequirementProvider
,ITmfComponent
,ITmfPropertiesProvider
,ITmfAnalysisModuleWithStateSystems
- Direct Known Subclasses:
LttngUstCallStackAnalysis
public abstract class InstrumentedCallStackAnalysis
extends TmfStateSystemAnalysisModule
implements IFlameChartProvider, ICallGraphProvider
The base classes for analyses who want to populate the CallStack state
system.
If the elements in the callstack are grouped by process ID / thread ID, the
default state provider
CallStackStateProvider
can be extended, and
implement how to retrieve function entry and exit and process/thread IDs.- Author:
- Matthew Khouzam, Geneviève Bastien
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.IWeightedTreeProvider
IWeightedTreeProvider.DataType, IWeightedTreeProvider.MetricType
-
Field Summary
Fields inherited from interface org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.IWeightedTreeProvider
WEIGHT_TYPE
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(@NonNull IAnalysisProgressListener listener) createCallSite
(Object symbol) Factory method to create an aggregated callsite for a symbolvoid
dispose()
getAdditionalMetric
(AggregatedCallSite object, int metricIndex) Get an additional metric for a tree.Get a list of additional metrics that are provided by this tree.Get the call graph for the full range of the trace.getCallGraph
(ITmfTimestamp start, ITmfTimestamp end) Get the call graph for a given time range.@Nullable CallStackSeries
Get the callstacks series provided by this analysis.long
getEnd()
Return the current end time of this flame chart.Return a list of additional data sets' titles.Get the group descriptors that describe how the elements are grouped in this call graph hierarchy.@NonNull String
Get the ID of the host this callstack provider is for TODO: Deprecate me, now using the interfaces fromCallStackHostUtils
getLinks
(long start, long end, org.eclipse.core.runtime.IProgressMonitor monitor) Get the edges (links) of the callstackWeighted tree providers can provide a palette of styles for the data represented.@Nullable ISegmentStore<ISegment>
Get the edges (links) of the callstackgetTitle()
A title for this tree provider.Get the metric type for the weight value.boolean
Return whether this analysis is completevoid
removeListener
(@NonNull IAnalysisProgressListener listener) void
boolean
toDisplayString
(AggregatedCallSite object) Get a user-facing text to identify a tree object.void
triggerAutomatically
(boolean trigger) Set whether the callgraph execution should be triggered automatically after building the callstack or if it should wait to be requestedMethods inherited from class org.eclipse.tracecompass.tmf.core.statesystem.TmfStateSystemAnalysisModule
getProperties, getProviderVersions, getStateSystem, getStateSystem, getStateSystem, getStateSystems, isQueryable, traceRangeUpdated, waitForInitialization
Methods inherited from class org.eclipse.tracecompass.tmf.core.analysis.TmfAbstractAnalysisModule
addParameter, cancel, canExecute, fail, getAnalysisRequirements, getDependencyLevel, getHelpText, getHelpText, getId, getName, getOutputs, getParameter, getTrace, isAutomatic, notifyParameterChanged, registerOutput, schedule, setAutomatic, setId, setParameter, traceClosed, traceSelected, waitForCompletion, waitForCompletion
Methods inherited from class org.eclipse.tracecompass.tmf.core.component.TmfComponent
broadcast, broadcastAsync, init
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule
addParameter, cancel, canExecute, fail, getDependencyLevel, getHelpText, getHelpText, getId, getOutputs, getParameter, isAutomatic, isQueryable, notifyParameterChanged, registerOutput, schedule, setAutomatic, setId, setParameter, waitForCompletion, waitForCompletion
Methods inherited from interface org.eclipse.tracecompass.tmf.core.analysis.requirements.IAnalysisRequirementProvider
getAnalysisRequirements
Methods inherited from interface org.eclipse.tracecompass.incubator.callstack.core.callgraph.ICallGraphProvider
getGroupDescriptor, getSelection, getTreeSet
Methods inherited from interface org.eclipse.tracecompass.incubator.callstack.core.instrumented.IFlameChartProvider
queryCallStacks
Methods inherited from interface org.eclipse.tracecompass.tmf.core.component.ITmfComponent
broadcast, broadcastAsync, getName
Methods inherited from interface org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.IWeightedTreeProvider
getStatistics
-
Field Details
-
CALL_STACK
CallStack stack-attribute- See Also:
-
-
Method Details
-
setTrace
- Specified by:
setTrace
in interfaceIAnalysisModule
- Overrides:
setTrace
in classTmfAbstractAnalysisModule
- Throws:
TmfAnalysisException
-
setName
- Specified by:
setName
in interfaceIAnalysisModule
- Overrides:
setName
in classTmfAbstractAnalysisModule
-
getCallStackSeries
Description copied from interface:IFlameChartProvider
Get the callstacks series provided by this analysis.- Specified by:
getCallStackSeries
in interfaceIFlameChartProvider
- Returns:
- The callstack series or null if it is not available yet
-
getHostId
Description copied from interface:IFlameChartProvider
Get the ID of the host this callstack provider is for TODO: Deprecate me, now using the interfaces fromCallStackHostUtils
- Specified by:
getHostId
in interfaceIFlameChartProvider
- Returns:
- The ID of the host
-
getLinks
public List<ITmfStateInterval> getLinks(long start, long end, org.eclipse.core.runtime.IProgressMonitor monitor) Get the edges (links) of the callstack- Parameters:
start
- start time of the arrows to sampleend
- end time of the arrows to samplemonitor
- monitor to cancel the job- Returns:
- a list of the edges, as
ITmfStateInterval
s withEdgeStateValue
s.
-
getCallGraph
Description copied from interface:ICallGraphProvider
Get the call graph for a given time range. This callgraph is for all the elements. The caller can then group the result by callingWeightedTreeGroupBy.groupWeightedTreeBy(IWeightedTreeGroupDescriptor, IWeightedTreeSet, IWeightedTreeProvider)
method- Specified by:
getCallGraph
in interfaceICallGraphProvider
- Parameters:
start
- The start of the rangeend
- The end of the range- Returns:
- The call graph object containing the CCTs for each element in the range.
-
getCallGraph
Description copied from interface:ICallGraphProvider
Get the call graph for the full range of the trace. This callgraph is for all the elements. The caller can then group the result by callingWeightedTreeGroupBy.groupWeightedTreeBy(IWeightedTreeGroupDescriptor, IWeightedTreeSet, IWeightedTreeProvider)
- Specified by:
getCallGraph
in interfaceICallGraphProvider
- Returns:
- The call graph object containing the CCTs for each element in the range.
-
getGroupDescriptors
Description copied from interface:ICallGraphProvider
Get the group descriptors that describe how the elements are grouped in this call graph hierarchy. This method will return the root group descriptor. Children groups can be retrieved by the parent group. For call graph providers who have only one series, this will be a singleton.- Specified by:
getGroupDescriptors
in interfaceICallGraphProvider
- Returns:
- The collection of group descriptors for this call graph
-
getTitle
Description copied from interface:IWeightedTreeProvider
A title for this tree provider. This title will be visible by users and should describe what this tree provider's data represent.- Specified by:
getTitle
in interfaceIWeightedTreeProvider<@NonNull ICallStackSymbol,
ICallStackElement, AggregatedCallSite> - Returns:
- The title of this provider
-
dispose
public void dispose()- Specified by:
dispose
in interfaceITmfComponent
- Overrides:
dispose
in classTmfStateSystemAnalysisModule
-
createCallSite
Description copied from interface:ICallGraphProvider
Factory method to create an aggregated callsite for a symbol- Specified by:
createCallSite
in interfaceICallGraphProvider
- Parameters:
symbol
- The symbol- Returns:
- A new aggregated callsite
-
getSegmentStore
Get the edges (links) of the callstack- Specified by:
getSegmentStore
in interfaceISegmentStoreProvider
- Returns:
- a list of the edges
-
addListener
- Specified by:
addListener
in interfaceISegmentStoreProvider
-
removeListener
- Specified by:
removeListener
in interfaceISegmentStoreProvider
-
getSegmentAspects
- Specified by:
getSegmentAspects
in interfaceISegmentStoreProvider
-
triggerAutomatically
public void triggerAutomatically(boolean trigger) Set whether the callgraph execution should be triggered automatically after building the callstack or if it should wait to be requested- Parameters:
trigger
-true
means the callgraph analysis will be executed after the callstack,false
means it will be executed on demand only.
-
isComplete
public boolean isComplete()Description copied from interface:IFlameChartProvider
Return whether this analysis is complete- Specified by:
isComplete
in interfaceIFlameChartProvider
- Returns:
true
if the analysis is completed, whether failed or not,false
if it is currently running
-
getEnd
public long getEnd()Description copied from interface:IFlameChartProvider
Return the current end time of this flame chart. The return value of this method may change as long as theIFlameChartProvider.isComplete()
method returnsfalse
. When the flame chart is complete, then this value should stay the same. If the value is not known, impossible to compute or not available, the return value should beInteger.MIN_VALUE
.- Specified by:
getEnd
in interfaceIFlameChartProvider
- Returns:
- The end time of the flame chart, in nanoseconds, or
Integer.MIN_VALUE
if end time is not available.
-
getExtraDataSets
Description copied from interface:IWeightedTreeProvider
Return a list of additional data sets' titles. These sets will be available by callingWeightedTree.getExtraDataTrees(int)
on the trees, where the index in the list is the parameter that the children set should match- Specified by:
getExtraDataSets
in interfaceIWeightedTreeProvider<@NonNull ICallStackSymbol,
ICallStackElement, AggregatedCallSite> - Returns:
- The title of each child set
-
getWeightType
Description copied from interface:IWeightedTreeProvider
Get the metric type for the weight value. The default metric is called "Weight" and is a number- Specified by:
getWeightType
in interfaceIWeightedTreeProvider<@NonNull ICallStackSymbol,
ICallStackElement, AggregatedCallSite> - Returns:
- The metric type for the weight value.
-
getAdditionalMetrics
Description copied from interface:IWeightedTreeProvider
Get a list of additional metrics that are provided by this tree.- Specified by:
getAdditionalMetrics
in interfaceIWeightedTreeProvider<@NonNull ICallStackSymbol,
ICallStackElement, AggregatedCallSite> - Returns:
- A list of metrics provided by the trees, in addition to the weight
-
toDisplayString
Description copied from interface:IWeightedTreeProvider
Get a user-facing text to identify a tree object. By default, it is the string representation of the object.- Specified by:
toDisplayString
in interfaceIWeightedTreeProvider<@NonNull ICallStackSymbol,
ICallStackElement, AggregatedCallSite> - Parameters:
object
- The tree whose value to display- Returns:
- A user-facing string to identify this node
-
getAdditionalMetric
Description copied from interface:IWeightedTreeProvider
Get an additional metric for a tree. The metric index corresponds to the position of the desired metric in the list of metric returned by theIWeightedTreeProvider.getAdditionalMetrics()
method and the return value should be of the proper data type- Specified by:
getAdditionalMetric
in interfaceIWeightedTreeProvider<@NonNull ICallStackSymbol,
ICallStackElement, AggregatedCallSite> - Parameters:
object
- The tree object for which to get the metricmetricIndex
- The index in the list of the metric metric to get- Returns:
- The value of the metric for the tree in parameter
-
getPalette
Description copied from interface:IWeightedTreeProvider
Weighted tree providers can provide a palette of styles for the data represented. By default, it uses a default palette of a few qualitative colors that will use the hash code of objects to assign a style- Specified by:
getPalette
in interfaceICallGraphProvider
- Specified by:
getPalette
in interfaceIWeightedTreeProvider<@NonNull ICallStackSymbol,
ICallStackElement, AggregatedCallSite> - Returns:
- The palette for this data provider
-