Re: [PATCH 7/5 v4] tracing: Make sure rcu_irq_enter() can work for trace_*_rcuidle() trace events
From: Steven Rostedt
Date: Fri Apr 07 2017 - 15:43:15 EST
On Fri, 7 Apr 2017 15:41:17 -0400
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
> #ifndef MODULE
> -#define __DECLARE_TRACE_RCU(name, proto, args, cond, data_proto, data_args) \
> +#define __DECLARE_TRACE_RCU(name, proto, args, cond, data_proto, data_args) \
> static inline void trace_##name##_rcuidle(proto) \
> { \
> if (static_key_false(&__tracepoint_##name.key)) \
> __DO_TRACE(&__tracepoint_##name, \
> TP_PROTO(data_proto), \
> TP_ARGS(data_args), \
> - TP_CONDITION(cond), \
> - rcu_irq_enter_irqson(), \
> - rcu_irq_exit_irqson()); \
> + TP_CONDITION(cond),1); \
I'm going to update this patch to add a space before the 1.
> }
> #else
> #define __DECLARE_TRACE_RCU(name, proto, args, cond, data_proto, data_args)
> @@ -186,7 +189,7 @@ extern void syscall_unregfunc(void);
> __DO_TRACE(&__tracepoint_##name, \
> TP_PROTO(data_proto), \
> TP_ARGS(data_args), \
> - TP_CONDITION(cond),,); \
> + TP_CONDITION(cond),0); \
And before the 0.
-- Steve
> if (IS_ENABLED(CONFIG_LOCKDEP) && (cond)) { \
> rcu_read_lock_sched_notrace(); \
> rcu_dereference_sched(__tracepoint_##name.funcs);\