Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Khouzam2019-08-02 01:51:25 +0000
committerMatthew Khouzam2019-08-05 13:40:53 +0000
commit13e877e785fcfc178b7e1e1bc3867bfd7c074ffc (patch)
treef4d68cb25a7595840d06485918044dab1441e4d9
parent2f417fbc50c8641ced968901e13d32c1b752bb0c (diff)
downloadorg.eclipse.tracecompass.incubator-13e877e785fcfc178b7e1e1bc3867bfd7c074ffc.tar.gz
org.eclipse.tracecompass.incubator-13e877e785fcfc178b7e1e1bc3867bfd7c074ffc.tar.xz
org.eclipse.tracecompass.incubator-13e877e785fcfc178b7e1e1bc3867bfd7c074ffc.zip
callstack.core: allow TID entries to follow threads
Change-Id: Ife9bb71ee45215fb3f7a78028bd037d3974c3c6d Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com> Signed-off-by: Geneviève Bastien <gbastien+lttng@versatic.net> Reviewed-on: https://git.eclipse.org/r/146946 Tested-by: CI Bot
-rw-r--r--callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/instrumented/provider/FlameChartDataProvider.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/instrumented/provider/FlameChartDataProvider.java b/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/instrumented/provider/FlameChartDataProvider.java
index fd9cb80c8..6446fc062 100644
--- a/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/instrumented/provider/FlameChartDataProvider.java
+++ b/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/instrumented/provider/FlameChartDataProvider.java
@@ -475,8 +475,6 @@ public class FlameChartDataProvider extends AbstractTmfTraceDataProvider impleme
private boolean processCallStackElement(ICallStackElement element, Builder<FlameChartEntryModel> builder, FlameChartEntryModel parentEntry) {
long elementId = getEntryId(element);
- FlameChartEntryModel entry = new FlameChartEntryModel(elementId, parentEntry.getId(), Collections.singletonList(element.getName()), parentEntry.getStartTime(), parentEntry.getEndTime(), FlameChartEntryModel.EntryType.LEVEL);
- builder.add(entry);
boolean needsKernel = false;
@@ -487,6 +485,9 @@ public class FlameChartDataProvider extends AbstractTmfTraceDataProvider impleme
CallStack callStack = finalElement.getCallStack();
// Set the fixed hostThread to the entry if it is available
HostThread hostThread = callStack.getHostThread();
+ // Create the entry for this level
+ FlameChartEntryModel entry = new FlameChartEntryModel(elementId, parentEntry.getId(), Collections.singletonList(element.getName()), parentEntry.getStartTime(), parentEntry.getEndTime(), FlameChartEntryModel.EntryType.LEVEL, -1, hostThread);
+ builder.add(entry);
for (int depth = 0; depth < callStack.getMaxDepth(); depth++) {
FlameChartEntryModel flameChartEntry = new FlameChartEntryModel(getEntryId(new CallStackDepth(callStack, depth + 1)), entry.getId(), Collections.singletonList(element.getName()), parentEntry.getStartTime(), parentEntry.getEndTime(),
FlameChartEntryModel.EntryType.FUNCTION, depth + 1, hostThread);
@@ -499,7 +500,10 @@ public class FlameChartDataProvider extends AbstractTmfTraceDataProvider impleme
}
return needsKernel;
}
- // Intermediate element, process children
+
+ // Intermediate element, create entry and process children
+ FlameChartEntryModel entry = new FlameChartEntryModel(elementId, parentEntry.getId(), Collections.singletonList(element.getName()), parentEntry.getStartTime(), parentEntry.getEndTime(), FlameChartEntryModel.EntryType.LEVEL);
+ builder.add(entry);
for (ICallStackElement child : element.getChildren()) {
needsKernel |= processCallStackElement(child, builder, entry);
}

Back to the top