LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Frédéric Weisbecker" <fweisbec@gmail.com>
To: "Ingo Molnar" <mingo@elte.hu>
Cc: "Linux Kernel" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH][RESEND] tracing/ftrace: Remove unused code in sched_switch tracer
Date: Fri, 31 Oct 2008 13:15:45 +0100 [thread overview]
Message-ID: <c62985530810310515n59cadefx32a78ab7c4395251@mail.gmail.com> (raw)
In-Reply-To: <490AF6A4.7080604@gmail.com>
2008/10/31 Frederic Weisbecker <fweisbec@gmail.com>:
> When init_sched_switch_trace() is called, it has no reason to start
> the sched tracer if the sched_ref is not zero.
>
> _ If this is non-zero, the tracer is already used, but we can register it
> to the tracing engine. There is already a security which avoid the tracer
> probes not to be resgistered twice.
>
> _ If this is zero, this block will not be used.
>
> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
> CC: Steven Rostedt <rostedt@goodmis.org>
> ---
> kernel/trace/trace_sched_switch.c | 8 --------
> 1 files changed, 0 insertions(+), 8 deletions(-)
> diff --git a/kernel/trace/trace_sched_switch.c b/kernel/trace/trace_sched_switch.c
> index 59de514..96620c7 100644
> --- a/kernel/trace/trace_sched_switch.c
> +++ b/kernel/trace/trace_sched_switch.c
> @@ -203,14 +203,6 @@ static struct tracer sched_switch_trace __read_mostly =
>
> __init static int init_sched_switch_trace(void)
> {
> - int ret = 0;
> -
> - if (atomic_read(&sched_ref))
> - ret = tracing_sched_register();
> - if (ret) {
> - pr_info("error registering scheduler trace\n");
> - return ret;
> - }
> return register_tracer(&sched_switch_trace);
> }
> device_initcall(init_sched_switch_trace);
>
(depends on tracing/ftrace: Fix a race condition in sched_switch tracer)
prev parent reply other threads:[~2008-10-31 12:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-31 12:14 Frederic Weisbecker
2008-10-31 12:15 ` Frédéric Weisbecker [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=c62985530810310515n59cadefx32a78ab7c4395251@mail.gmail.com \
--to=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--subject='Re: [PATCH][RESEND] tracing/ftrace: Remove unused code in sched_switch tracer' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).