diff --git a/analysis/org.eclipse.tracecompass.analysis.profiling.core/src/org/eclipse/tracecompass/internal/analysis/profiling/core/instrumented/InstrumentedCallStackElement.java b/analysis/org.eclipse.tracecompass.analysis.profiling.core/src/org/eclipse/tracecompass/internal/analysis/profiling/core/instrumented/InstrumentedCallStackElement.java index 875b44aff1..fc8f5f14db 100644 --- a/analysis/org.eclipse.tracecompass.analysis.profiling.core/src/org/eclipse/tracecompass/internal/analysis/profiling/core/instrumented/InstrumentedCallStackElement.java +++ b/analysis/org.eclipse.tracecompass.analysis.profiling.core/src/org/eclipse/tracecompass/internal/analysis/profiling/core/instrumented/InstrumentedCallStackElement.java @@ -53,6 +53,7 @@ public class InstrumentedCallStackElement extends CallStackElement { private final int fQuark; private final IHostIdResolver fHostResolver; private final @Nullable IThreadIdResolver fThreadIdResolver; + private @Nullable ITmfStateInterval fSymbolKeyInterval = null; private final Map fNextElements = new HashMap<>(); private @Nullable CallStack fCallstack = null; @@ -178,6 +179,10 @@ private static Collection getNextElements(InstrumentedGroupDe public int retrieveSymbolKeyAt(long startTime) { int processId = CallStackElement.DEFAULT_SYMBOL_KEY; if (fQuark != ITmfStateSystem.ROOT_ATTRIBUTE) { + ITmfStateInterval symbolKeyInterval = fSymbolKeyInterval; + if (symbolKeyInterval != null && symbolKeyInterval.intersects(startTime)) { + return symbolKeyInterval.getValueInt(); + } try { // Query a time that is within the bounds of the state system long start = Math.max(fStateSystem.getStartTime(), startTime); @@ -185,6 +190,7 @@ public int retrieveSymbolKeyAt(long startTime) { // Query the value of the quark at the requested time ITmfStateInterval interval = fStateSystem.querySingleState(start, fQuark); + fSymbolKeyInterval = interval; ITmfStateValue processStateValue = interval.getStateValue(); // If the state value is an integer, assume it is the symbol we // are looking for