mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: linux-kernel@vger.kernel.org, rostedt@goodmis.org, dipankar@in.ibm.com
Subject: Re: [PATCH] rcu: define tracepoint strings only if CONFIG_TRACING is set
Date: Fri, 11 Jul 2014 08:12:40 -0700	[thread overview]
Message-ID: <20140711151239.GJ16041@linux.vnet.ibm.com> (raw)
In-Reply-To: <1405078692-29957-1-git-send-email-ard.biesheuvel@linaro.org>

On Fri, Jul 11, 2014 at 01:38:12PM +0200, Ard Biesheuvel wrote:
> Commit f7f7bac9cb1c ("rcu: Have the RCU tracepoints use the tracepoint_string
> infrastructure") unconditionally populates the __tracepoint_str input section,
> but this section is not assigned an output section if CONFIG_TRACING is not set.
> This results in the __tracepoint_str turning up in unexpected places, i.e.,
> after _edata.
> 
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: rostedt@goodmis.org
> Cc: dipankar@in.ibm.com
> Cc: paulmck@linux.vnet.ibm.com

If you get a Reviewed-by from Steven Rostedt, I will be happy to queue
this one.

							Thanx, Paul

> ---
>  kernel/rcu/tree.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index f1ba77363fbb..ac1984149eb5 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -79,9 +79,16 @@ static struct lock_class_key rcu_fqs_class[RCU_NUM_LVLS];
>   * the tracing userspace tools to be able to decipher the string
>   * address to the matching string.
>   */
> +#ifdef CONFIG_TRACING
> +#define DEFINE_TPS(sname) \
> +static const char *tp_##sname##_varname __used __tracepoint_string = sname##_varname;
> +#else
> +#define DEFINE_TPS(sname)
> +#endif
> +
>  #define RCU_STATE_INITIALIZER(sname, sabbr, cr) \
>  static char sname##_varname[] = #sname; \
> -static const char *tp_##sname##_varname __used __tracepoint_string = sname##_varname; \
> +DEFINE_TPS(sname) \
>  struct rcu_state sname##_state = { \
>  	.level = { &sname##_state.node[0] }, \
>  	.call = cr, \
> -- 
> 1.8.3.2
> 


  reply	other threads:[~2014-07-11 15:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-11 11:38 Ard Biesheuvel
2014-07-11 15:12 ` Paul E. McKenney [this message]
2014-07-11 15:30   ` Steven Rostedt
2014-07-11 15:40     ` Ard Biesheuvel
2014-07-11 18:09       ` Ard Biesheuvel
2014-07-11 18:36         ` Steven Rostedt

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=20140711151239.GJ16041@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=dipankar@in.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /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®