Skip to content

Commit

Permalink
tracing, rcu: Hide trace event rcu_nocb_wake when not used
Browse files Browse the repository at this point in the history
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) <[email protected]>
Signed-off-by: Paul E. McKenney <[email protected]>
  • Loading branch information
rostedt authored and paulmck committed Oct 17, 2017
1 parent 22010a8 commit a921eff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/trace/events/rcu.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a921eff

Please sign in to comment.