[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-b0f56f1a63b7b968e6feeeefeace24bc8e0a4a65@git.kernel.org>
Date: Tue, 6 Oct 2009 12:49:15 GMT
From: tip-bot for Hiroshi Shimamoto <h-shimamoto@...jp.nec.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, h-shimamoto@...jp.nec.com,
hpa@...or.com, mingo@...hat.com, fweisbec@...il.com,
srostedt@...hat.com, tglx@...utronix.de, mingo@...e.hu
Subject: [tip:tracing/urgent] trace: Fix missing assignment in trace_ctxwake_*
Commit-ID: b0f56f1a63b7b968e6feeeefeace24bc8e0a4a65
Gitweb: http://git.kernel.org/tip/b0f56f1a63b7b968e6feeeefeace24bc8e0a4a65
Author: Hiroshi Shimamoto <h-shimamoto@...jp.nec.com>
AuthorDate: Thu, 1 Oct 2009 13:33:28 +0900
Committer: Ingo Molnar <mingo@...e.hu>
CommitDate: Tue, 6 Oct 2009 14:28:24 +0200
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@...jp.nec.com>
Cc: Steven Rostedt <srostedt@...hat.com>
Acked-by: Frederic Weisbecker <fweisbec@...il.com>
LKML-Reference: <4AC43118.6050409@...jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
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 f572f44..cda766f 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)
trace_assign_type(field, iter->ent);
if (!S)
- task_state_char(field->prev_state);
+ S = task_state_char(field->prev_state);
T = task_state_char(field->next_state);
if (!trace_seq_printf(&iter->seq, "%d %d %c %d %d %d %c\n",
field->prev_pid,
@@ -918,7 +918,7 @@ static int trace_ctxwake_hex(struct trace_iterator *iter, char S)
trace_assign_type(field, iter->ent);
if (!S)
- task_state_char(field->prev_state);
+ S = task_state_char(field->prev_state);
T = task_state_char(field->next_state);
SEQ_PUT_HEX_FIELD_RET(s, field->prev_pid);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists