From: "Steven Noonan" <steven@uplinklabs.net>
To: "Andrew Morton" <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu
Subject: Re: [PATCH -tip FIXED] ftrace: add nop tracer
Date: Fri, 19 Sep 2008 16:35:35 -0700 [thread overview]
Message-ID: <f488382f0809191635o45f3ed17vc23380eab41b2878@mail.gmail.com> (raw)
In-Reply-To: <20080919142326.29834d11.akpm@linux-foundation.org>
On Fri, Sep 19, 2008 at 2:23 PM, Andrew Morton
<akpm@linux-foundation.org> wrote:
> On Fri, 19 Sep 2008 03:06:43 -0700
> Steven Noonan <steven@uplinklabs.net> wrote:
>
>> --- a/kernel/trace/trace.h
>> +++ b/kernel/trace/trace.h
>> @@ -339,6 +339,10 @@ extern int trace_selftest_startup_preemptirqsoff(struct tracer *trace,
>> extern int trace_selftest_startup_wakeup(struct tracer *trace,
>> struct trace_array *tr);
>> #endif
>> +#ifdef CONFIG_NOP_TRACER
>> +extern int trace_selftest_startup_nop(struct tracer *trace,
>> + struct trace_array *tr);
>> +#endif
>> #ifdef CONFIG_CONTEXT_SWITCH_TRACER
>> extern int trace_selftest_startup_sched_switch(struct tracer *trace,
>> struct trace_array *tr);
>
> Consider omitting the ifdefs around the declarations.
>
> pro: the code looks nicer and is less likely to suffer build errors
> with weird config combinations.
>
> con: build errors are reported at link-time rather than at compile-time.
>
> Personally, I think pro>con here.
>
I merely based this on one of the other tracers, so the ifdefs are
basically copied and renamed.
next prev parent reply other threads:[~2008-09-19 23:35 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-19 10:06 Steven Noonan
2008-09-19 10:43 ` Ingo Molnar
2008-09-19 10:48 ` Frédéric Weisbecker
2008-09-19 11:04 ` Ingo Molnar
2008-09-19 11:30 ` Frédéric Weisbecker
2008-09-19 21:23 ` Andrew Morton
2008-09-19 23:35 ` Steven Noonan [this message]
2008-09-20 6:16 ` Ingo Molnar
2008-09-20 7:33 ` Steven Noonan
2008-09-20 7:47 ` Andrew Morton
2008-09-20 11:31 ` Ingo Molnar
2008-09-20 15:04 ` Steven Noonan
2008-09-20 8:00 ` [PATCH] ftrace: mcount_addr defined but not used Steven Noonan
2008-09-20 8:00 ` [PATCH] trace: remove pointless ifdefs Steven Noonan
2008-09-20 11:33 ` Ingo Molnar
2008-09-20 8:31 ` [PATCH] ftrace: mcount_addr defined but not used Steven Noonan
2008-09-20 8:33 ` Steven Noonan
2008-09-20 11:33 ` Ingo Molnar
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=f488382f0809191635o45f3ed17vc23380eab41b2878@mail.gmail.com \
--to=steven@uplinklabs.net \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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
all inboxes | Powered by JetHome®