From: tip-bot for Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, h-shimamoto@ct.jp.nec.com,
hpa@zytor.com, mingo@redhat.com, fweisbec@gmail.com,
srostedt@redhat.com, tglx@linutronix.de, mingo@elte.hu
Subject: [tip:tracing/urgent] trace: Fix missing assignment in trace_ctxwake_*
Date: Tue, 6 Oct 2009 12:49:15 GMT [thread overview]
Message-ID: <tip-b0f56f1a63b7b968e6feeeefeace24bc8e0a4a65@git.kernel.org> (raw)
In-Reply-To: <4AC43118.6050409@ct.jp.nec.com>
Commit-ID: b0f56f1a63b7b968e6feeeefeace24bc8e0a4a65
Gitweb: http://git.kernel.org/tip/b0f56f1a63b7b968e6feeeefeace24bc8e0a4a65
Author: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
AuthorDate: Thu, 1 Oct 2009 13:33:28 +0900
Committer: Ingo Molnar <mingo@elte.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@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>
---
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);
prev parent reply other threads:[~2009-10-06 12:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-01 4:33 [PATCH] trace: fix missing assignment in trace_ctxwake_* Hiroshi Shimamoto
2009-10-02 12:49 ` Frédéric Weisbecker
2009-10-02 14:00 ` [tip:tracing/urgent] trace: Fix " tip-bot for Hiroshi Shimamoto
2009-10-06 12:49 ` tip-bot for Hiroshi Shimamoto [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-b0f56f1a63b7b968e6feeeefeace24bc8e0a4a65@git.kernel.org \
--to=h-shimamoto@ct.jp.nec.com \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=srostedt@redhat.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox