[PATCH 2/4] libtraceeval samples: Add PARKED and DEAD fields

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Steven Rostedt (Google)" <rostedt@xxxxxxxxxxx>

get_stop_state() was returning PREEMPT when a task was really in the
PARKED or DEAD state. Check those as well.

Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>
---
 samples/task-eval.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/samples/task-eval.c b/samples/task-eval.c
index 7b709f715332..47ccce8e4737 100644
--- a/samples/task-eval.c
+++ b/samples/task-eval.c
@@ -91,7 +91,9 @@ enum sched_state {
 	SLEEP,
 	IDLE,
 	ZOMBIE,
+	PARKED,
 	EXITED,
+	DEAD,
 	OTHER,
 	WAKEUP,
 };
@@ -749,6 +751,10 @@ static int get_stop_state(unsigned long long val)
 		return ZOMBIE;
 	if (val & 0x20)
 		return EXITED;
+	if (val & 0x40)
+		return PARKED;
+	if (val & 0x80)
+		return DEAD;
 	return PREEMPT;
 }
 
-- 
2.45.2





[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux