On Sun, Nov 24, 2024 at 06:49:44PM -0500, Steven Rostedt wrote:
> From: Mathieu Desnoyers <[email protected]>
> 
> Define a rcu_tasks_trace lock guard for use by the syscall enter/exit
> tracepoints.
> 
> Cc: Linus Torvalds <[email protected]>
> Cc: Thomas Gleixner <[email protected]>
> Cc: Michael Jeanson <[email protected]>
> Cc: Masami Hiramatsu <[email protected]>
> Cc: Peter Zijlstra <[email protected]>
> Cc: Alexei Starovoitov <[email protected]>
> Cc: Yonghong Song <[email protected]>
> Cc: Paul E. McKenney <[email protected]>
> Cc: Ingo Molnar <[email protected]>
> Cc: Arnaldo Carvalho de Melo <[email protected]>
> Cc: Mark Rutland <[email protected]>
> Cc: Alexander Shishkin <[email protected]>
> Cc: Namhyung Kim <[email protected]>
> Cc: Andrii Nakryiko <[email protected]>
> Cc: [email protected]
> Cc: Joel Fernandes <[email protected]>
> Cc: Jordan Rife <[email protected]>
> Cc: [email protected]
> Link: 
> https://lore.kernel.org/[email protected]
> Signed-off-by: Mathieu Desnoyers <[email protected]>
> Signed-off-by: Steven Rostedt (Google) <[email protected]>

Reviewed-by: Paul E. McKenney <[email protected]>

> ---
>  include/linux/rcupdate_trace.h | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/include/linux/rcupdate_trace.h b/include/linux/rcupdate_trace.h
> index eda493200663..e6c44eb428ab 100644
> --- a/include/linux/rcupdate_trace.h
> +++ b/include/linux/rcupdate_trace.h
> @@ -10,6 +10,7 @@
>  
>  #include <linux/sched.h>
>  #include <linux/rcupdate.h>
> +#include <linux/cleanup.h>
>  
>  extern struct lockdep_map rcu_trace_lock_map;
>  
> @@ -98,4 +99,8 @@ static inline void rcu_read_lock_trace(void) { BUG(); }
>  static inline void rcu_read_unlock_trace(void) { BUG(); }
>  #endif /* #ifdef CONFIG_TASKS_TRACE_RCU */
>  
> +DEFINE_LOCK_GUARD_0(rcu_tasks_trace,
> +     rcu_read_lock_trace(),
> +     rcu_read_unlock_trace())
> +
>  #endif /* __LINUX_RCUPDATE_TRACE_H */
> -- 
> 2.45.2
> 
> 

Reply via email to