lttng: Bug 573437: Fix parent process assignment of processes The ThreadStatusDataProvider now uses the process start time to find the cached parent process for a given TID (instead of end time). This fixes the case where the sched_process_free event of the parent is executed earlier than the child process' sched_process_free. [Fixed] Bug 573437: parent process assignment of processes Change-Id: I4cbf82b1bbf1a8a206652814f4d2cfa54cdaaa5e Signed-off-by: Bernd Hufmann <Bernd.Hufmann@ericsson.com> Reviewed-on: https://git.eclipse.org/r/c/tracecompass/org.eclipse.tracecompass/+/180374 Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com> Tested-by: Trace Compass Bot <tracecompass-bot@eclipse.org> Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/threadstatus/ThreadStatusDataProvider.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/threadstatus/ThreadStatusDataProvider.java index ee6206d..bdc6ed5 100644 --- a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/threadstatus/ThreadStatusDataProvider.java +++ b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/threadstatus/ThreadStatusDataProvider.java
@@ -443,7 +443,7 @@ if (entryBuilder.getId() == fTraceId) { return entryBuilder.build(-1); } - long parentId = entryBuilder.getPpid() > 0 ? findEntry(entryBuilder.getPpid(), entryBuilder.getEndTime()) : fTraceId; + long parentId = entryBuilder.getPpid() > 0 ? findEntry(entryBuilder.getPpid(), entryBuilder.getStartTime()) : fTraceId; return entryBuilder.build(parentId); }