analysis: Bug 492404 Make ThreadInformationProvider support TID 0
authorMatthew Khouzam <matthew.khouzam@ericsson.com>
Mon, 25 Apr 2016 20:37:03 +0000 (16:37 -0400)
committerMatthew Khouzam <matthew.khouzam@ericsson.com>
Mon, 9 May 2016 14:57:01 +0000 (10:57 -0400)
This helps virtual cpu view that was broken by the thread 0_x tid patch

Change-Id: I27971a1c21c5d325d014baeb3d19211ad34a70f5
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/71372
Reviewed-by: Michael Jeanson <mjeanson@efficios.com>
Reviewed-by: Hudson CI
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernel/KernelThreadInformationProvider.java

index 382fb49c51a67bedaf4a54b966c6cde425c3972d..2ea594db4dbcf8976a6dae65c36de7d3ba30fbaf 100644 (file)
@@ -92,7 +92,8 @@ public final class KernelThreadInformationProvider {
             threadQuark = ss.getQuarkAbsolute(Attributes.THREADS);
             Set<@NonNull Integer> tids = new TreeSet<>();
             for (Integer quark : ss.getSubAttributes(threadQuark, false)) {
-                tids.add(Integer.parseInt(ss.getAttributeName(quark)));
+                final @NonNull String attributeName = ss.getAttributeName(quark);
+                tids.add(attributeName.startsWith(Attributes.THREAD_0_PREFIX) ? 0 : Integer.parseInt(attributeName));
             }
             return tids;
         } catch (AttributeNotFoundException e) {
This page took 0.025522 seconds and 5 git commands to generate.