From: Zhaolei <zhaolei@cn.fujitsu.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
rostedt@goodmis.org, zhaolei@cn.fujitsu.com, tglx@linutronix.de,
mingo@elte.hu
Subject: [tip:tracing/urgent] ftrace: Add check of sched_stopped for probe_sched_wakeup
Date: Tue, 7 Apr 2009 13:13:09 GMT [thread overview]
Message-ID: <tip-8bcae09b93e7f96f700b6bb372c2b3f2b36636dc@git.kernel.org> (raw)
In-Reply-To: <49D1C543.3010307@cn.fujitsu.com>
Commit-ID: 8bcae09b93e7f96f700b6bb372c2b3f2b36636dc
Gitweb: http://git.kernel.org/tip/8bcae09b93e7f96f700b6bb372c2b3f2b36636dc
Author: Zhaolei <zhaolei@cn.fujitsu.com>
AuthorDate: Tue, 31 Mar 2009 15:24:51 +0800
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Tue, 7 Apr 2009 14:01:11 +0200
ftrace: Add check of sched_stopped for probe_sched_wakeup
The wakeup tracing in sched_switch does not stop when a user
disables tracing. This is because the probe_sched_wakeup() is missing
the check to prevent the wakeup from being traced.
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
LKML-Reference: <49D1C543.3010307@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
kernel/trace/trace_sched_switch.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/kernel/trace/trace_sched_switch.c b/kernel/trace/trace_sched_switch.c
index de35f20..9117cea 100644
--- a/kernel/trace/trace_sched_switch.c
+++ b/kernel/trace/trace_sched_switch.c
@@ -62,6 +62,9 @@ probe_sched_wakeup(struct rq *__rq, struct task_struct *wakee, int success)
pc = preempt_count();
tracing_record_cmdline(current);
+ if (sched_stopped)
+ return;
+
local_irq_save(flags);
cpu = raw_smp_processor_id();
data = ctx_trace->data[cpu];
next prev parent reply other threads:[~2009-04-07 13:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-31 7:24 [PATCH v2 0/2] ftrace: Add check of sched_stopped for probe_sched_wakeup Zhaolei
2009-03-31 7:24 ` [PATCH v2 1/2] " Zhaolei
2009-04-03 19:50 ` Steven Rostedt
2009-04-07 13:13 ` Zhaolei [this message]
2009-03-31 7:26 ` [PATCH v2 2/2] ftrace: Clean up enable logic for sched_switch Zhaolei
2009-04-03 20:14 ` Steven Rostedt
2009-04-08 6:55 ` [tip:tracing/core] ftrace: clean " Zhaolei
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-8bcae09b93e7f96f700b6bb372c2b3f2b36636dc@git.kernel.org \
--to=zhaolei@cn.fujitsu.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=rostedt@goodmis.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.