Re: [PATCH 7/5 v4] tracing: Make sure rcu_irq_enter() can work for trace_*_rcuidle() trace events

From: Mathieu Desnoyers
Date: Mon Apr 10 2017 - 13:10:41 EST



----- On Apr 7, 2017, at 3:43 PM, rostedt rostedt@xxxxxxxxxxx wrote:

> 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.

With those cosmetic changes, I'm ok with it.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx>

Thanks!

Mathieu


>
> -- Steve
>
>> if (IS_ENABLED(CONFIG_LOCKDEP) && (cond)) { \
>> rcu_read_lock_sched_notrace(); \
> > rcu_dereference_sched(__tracepoint_##name.funcs);\

--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com