[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140711151239.GJ16041@linux.vnet.ibm.com>
Date: Fri, 11 Jul 2014 08:12:40 -0700
From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To: Ard Biesheuvel <ard.biesheuvel@...aro.org>
Cc: linux-kernel@...r.kernel.org, rostedt@...dmis.org,
dipankar@...ibm.com
Subject: Re: [PATCH] rcu: define tracepoint strings only if CONFIG_TRACING is
set
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@...aro.org>
> Cc: rostedt@...dmis.org
> Cc: dipankar@...ibm.com
> Cc: paulmck@...ux.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
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists