All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Steven Noonan <steven@uplinklabs.net>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu, steven@uplinklabs.net
Subject: Re: [PATCH -tip FIXED] ftrace: add nop tracer
Date: Fri, 19 Sep 2008 14:23:26 -0700	[thread overview]
Message-ID: <20080919142326.29834d11.akpm@linux-foundation.org> (raw)
In-Reply-To: <1221818803-9616-1-git-send-email-steven@uplinklabs.net>

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.

  parent reply	other threads:[~2008-09-19 21:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-19 10:06 [PATCH -tip FIXED] ftrace: add nop tracer 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 [this message]
2008-09-19 23:35   ` Steven Noonan
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=20080919142326.29834d11.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=steven@uplinklabs.net \
    /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.