diff options
author | Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> | 2009-10-01 00:33:28 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-10-06 08:28:24 -0400 |
commit | b0f56f1a63b7b968e6feeeefeace24bc8e0a4a65 (patch) | |
tree | 56bb19f2961203dff4656fc64c0471da93785a36 /kernel/trace/trace_output.c | |
parent | 75fb4090b39a3d7bf9ac77a28665c991ec5eaadc (diff) |
trace: Fix missing assignment in trace_ctxwake_*
The state char variable S should be reassigned, if S == 0.
We are missing the state of the task that is going to sleep for the
context switch events (in the raw mode).
Fortunately the problem arises with the sched_switch/wake_up
tracers, not the sched trace events.
The formers are legacy now. But still, that was buggy.
Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Cc: Steven Rostedt <srostedt@redhat.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <4AC43118.6050409@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace_output.c')
-rw-r--r-- | kernel/trace/trace_output.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c index f572f44c6e1e..cda766f9f421 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c | |||
@@ -883,7 +883,7 @@ static int trace_ctxwake_raw(struct trace_iterator *iter, char S) | |||
883 | trace_assign_type(field, iter->ent); | 883 | trace_assign_type(field, iter->ent); |
884 | 884 | ||
885 | if (!S) | 885 | if (!S) |
886 | task_state_char(field->prev_state); | 886 | S = task_state_char(field->prev_state); |
887 | T = task_state_char(field->next_state); | 887 | T = task_state_char(field->next_state); |
888 | if (!trace_seq_printf(&iter->seq, "%d %d %c %d %d %d %c\n", | 888 | if (!trace_seq_printf(&iter->seq, "%d %d %c %d %d %d %c\n", |
889 | field->prev_pid, | 889 | field->prev_pid, |
@@ -918,7 +918,7 @@ static int trace_ctxwake_hex(struct trace_iterator *iter, char S) | |||
918 | trace_assign_type(field, iter->ent); | 918 | trace_assign_type(field, iter->ent); |
919 | 919 | ||
920 | if (!S) | 920 | if (!S) |
921 | task_state_char(field->prev_state); | 921 | S = task_state_char(field->prev_state); |
922 | T = task_state_char(field->next_state); | 922 | T = task_state_char(field->next_state); |
923 | 923 | ||
924 | SEQ_PUT_HEX_FIELD_RET(s, field->prev_pid); | 924 | SEQ_PUT_HEX_FIELD_RET(s, field->prev_pid); |