lttng: make dead tasks return the state to null instead of blocked.
authorMatthew Khouzam <matthew.khouzam@ericsson.com>
Mon, 24 Aug 2015 15:03:10 +0000 (11:03 -0400)
committerMatthew Khouzam <matthew.khouzam@ericsson.com>
Fri, 28 Aug 2015 18:47:45 +0000 (14:47 -0400)
This will make the control flow view show a task finish instead of go
on and on and on. After this, PIDs can be more clearly re-used.

This patch updates the test cases as the behaviour of the state provider
changes.

Change-Id: Ib9fd24a868734b94cca9063c6753d88aa1185eb0
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/54415
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/internal/analysis/os/linux/core/kernelanalysis/KernelStateProvider.java
lttng/org.eclipse.tracecompass.lttng2.kernel.core.tests/src/org/eclipse/tracecompass/lttng2/kernel/core/tests/analysis/kernel/statesystem/TestValues.java

index 605e2751be12ff4653bff39d034204d4406d44b1..e9e4cd771a582283135f3877a920942c5582b4f3 100644 (file)
@@ -292,7 +292,11 @@ public class KernelStateProvider extends AbstractTmfStateProvider {
                 /* Set the status of the process that got scheduled out. */
                 quark = ss.getQuarkRelativeAndAdd(formerThreadNode, Attributes.STATUS);
                 if (prevState != 0) {
-                    value = StateValues.PROCESS_STATUS_WAIT_BLOCKED_VALUE;
+                    if (prevState == LinuxValues.TASK_STATE_DEAD) {
+                        value = TmfStateValue.nullValue();
+                    } else {
+                        value = StateValues.PROCESS_STATUS_WAIT_BLOCKED_VALUE;
+                    }
                 } else {
                     value = StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE;
                 }
index 353f6bc8a63cc7304180bb88a4af5d7af0964cbd..82fca2cbe77d39f42b34e6a1ae2c48bd4ccb5532 100644 (file)
@@ -45,12 +45,12 @@ interface TestValues {
         1331668247314038062L,
         1331668247327098502L,
         1331668247327098502L,
-        1331668247327098502L,
+        1331668247314851888L,
         1331668247327098502L,
         1331668247327098502L,
         1331668247314038062L,
         1331668247415001807L,
-        1331668247415001807L,
+        1331668247399704235L,
         1331668247415001807L,
         1331668247415001807L,
         1331668247314038062L,
@@ -74,7 +74,7 @@ interface TestValues {
         1331668247314038062L,
         1331668247335106720L,
         1331668247335106720L,
-        1331668247335106720L,
+        1331668247315471788L,
         1331668247335106720L,
         1331668247335106720L,
         1331668247931782426L,
@@ -83,7 +83,7 @@ interface TestValues {
         1331668247314038062L,
         1331668247335112802L,
         1331668247335112802L,
-        1331668247335112802L,
+        1331668247316120937L,
         1331668247335112802L,
         1331668247335112802L,
         1331668247314038062L,
@@ -163,7 +163,7 @@ interface TestValues {
         1331668247387136191L,
         1331668247314038062L,
         1331668247314038062L,
-        1331668247415047817L,
+        1331668247400779449L,
         1331668247415047817L,
         1331668247415047817L,
         1331668247415047817L,
This page took 0.027723 seconds and 5 git commands to generate.