lkml.org 
[lkml]   [2017]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] tracing, rcu: Hide trace event rcu_nocb_wake when not used
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
\
 
 \ /
  Last update: 2017-10-13 00:16    [W:2.048 / U:0.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site