public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tracing, rcu: Hide trace event rcu_nocb_wake when not used
@ 2017-10-12 22:16 Steven Rostedt
  2017-10-12 22:44 ` Paul E. McKenney
  0 siblings, 1 reply; 2+ messages in thread
From: Steven Rostedt @ 2017-10-12 22:16 UTC (permalink / raw)
  To: LKML; +Cc: Paul E. McKenney, Andrew Morton

From: Steven Rostedt (VMware) <rostedt@goodmis.org>

The trace event rcu_nocb_wake is only used when CONFIG_RCU_NOCB_CPU is
defined. But the trace event is defined regardless. As defined trace
events take up memory, it is a waste to have it defined when not used.
Surround the trace event with an #ifdef to have it only defined when it
is used.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
Index: linux-trace.git/include/trace/events/rcu.h
===================================================================
--- linux-trace.git.orig/include/trace/events/rcu.h
+++ linux-trace.git/include/trace/events/rcu.h
@@ -242,6 +242,7 @@ TRACE_EVENT(rcu_exp_funnel_lock,
 		  __entry->grphi, __entry->gpevent)
 );
 
+#ifdef CONFIG_RCU_NOCB_CPU
 /*
  * Tracepoint for RCU no-CBs CPU callback handoffs.  This event is intended
  * to assist debugging of these handoffs.
@@ -284,6 +285,7 @@ TRACE_EVENT(rcu_nocb_wake,
 
 	TP_printk("%s %d %s", __entry->rcuname, __entry->cpu, __entry->reason)
 );
+#endif
 
 /*
  * Tracepoint for tasks blocking within preemptible-RCU read-side

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] tracing, rcu: Hide trace event rcu_nocb_wake when not used
  2017-10-12 22:16 [PATCH] tracing, rcu: Hide trace event rcu_nocb_wake when not used Steven Rostedt
@ 2017-10-12 22:44 ` Paul E. McKenney
  0 siblings, 0 replies; 2+ messages in thread
From: Paul E. McKenney @ 2017-10-12 22:44 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: LKML, Andrew Morton

On Thu, Oct 12, 2017 at 06:16:41PM -0400, Steven Rostedt wrote:
> From: Steven Rostedt (VMware) <rostedt@goodmis.org>
> 
> The trace event rcu_nocb_wake is only used when CONFIG_RCU_NOCB_CPU is
> defined. But the trace event is defined regardless. As defined trace
> events take up memory, it is a waste to have it defined when not used.
> Surround the trace event with an #ifdef to have it only defined when it
> is used.
> 
> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

And this one applied cleanly, queued for review and testing, thank you!

							Thanx, Paul

> ---
> Index: linux-trace.git/include/trace/events/rcu.h
> ===================================================================
> --- linux-trace.git.orig/include/trace/events/rcu.h
> +++ linux-trace.git/include/trace/events/rcu.h
> @@ -242,6 +242,7 @@ TRACE_EVENT(rcu_exp_funnel_lock,
>  		  __entry->grphi, __entry->gpevent)
>  );
> 
> +#ifdef CONFIG_RCU_NOCB_CPU
>  /*
>   * Tracepoint for RCU no-CBs CPU callback handoffs.  This event is intended
>   * to assist debugging of these handoffs.
> @@ -284,6 +285,7 @@ TRACE_EVENT(rcu_nocb_wake,
> 
>  	TP_printk("%s %d %s", __entry->rcuname, __entry->cpu, __entry->reason)
>  );
> +#endif
> 
>  /*
>   * Tracepoint for tasks blocking within preemptible-RCU read-side
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-10-12 22:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-12 22:16 [PATCH] tracing, rcu: Hide trace event rcu_nocb_wake when not used Steven Rostedt
2017-10-12 22:44 ` Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox