* [PATCH] trace: fix missing assignment in trace_ctxwake_*
@ 2009-10-01 4:33 Hiroshi Shimamoto
2009-10-02 12:49 ` Frédéric Weisbecker
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Hiroshi Shimamoto @ 2009-10-01 4:33 UTC (permalink / raw)
To: Steven Rostedt; +Cc: Ingo Molnar, linux-kernel
From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
The state char variable S should be reassigned, if S == 0.
Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
---
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);
--
1.6.3.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] trace: fix missing assignment in trace_ctxwake_*
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
2 siblings, 0 replies; 4+ messages in thread
From: Frédéric Weisbecker @ 2009-10-02 12:49 UTC (permalink / raw)
To: Hiroshi Shimamoto; +Cc: Steven Rostedt, Ingo Molnar, linux-kernel
2009/10/1 Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>:
> From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
>
> The state char variable S should be reassigned, if S == 0.
>
> Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Good catch, we are indeed missing the state of the task that is going to sleep
for the context switch events (in the raw mode).
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
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.
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip:tracing/urgent] trace: Fix missing assignment in trace_ctxwake_*
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-bot for Hiroshi Shimamoto
2009-10-06 12:49 ` tip-bot for Hiroshi Shimamoto
2 siblings, 0 replies; 4+ messages in thread
From: tip-bot for Hiroshi Shimamoto @ 2009-10-02 14:00 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, h-shimamoto, hpa, mingo, fweisbec, srostedt, tglx,
mingo
Commit-ID: a2067f64cb59dfb19940a1a38a5a9fa6f2ddcaa5
Gitweb: http://git.kernel.org/tip/a2067f64cb59dfb19940a1a38a5a9fa6f2ddcaa5
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: Fri, 2 Oct 2009 15:24:55 +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);
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [tip:tracing/urgent] trace: Fix missing assignment in trace_ctxwake_*
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
2 siblings, 0 replies; 4+ messages in thread
From: tip-bot for Hiroshi Shimamoto @ 2009-10-06 12:49 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, h-shimamoto, hpa, mingo, fweisbec, srostedt, tglx,
mingo
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);
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-10-06 12:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox