]> Git Repo - J-linux.git/commitdiff
tracing: Remove cond argument from __DECLARE_TRACE_SYSCALL
authorMathieu Desnoyers <[email protected]>
Sat, 23 Nov 2024 15:30:31 +0000 (10:30 -0500)
committerSteven Rostedt (Google) <[email protected]>
Sat, 23 Nov 2024 22:50:53 +0000 (17:50 -0500)
Syscall tracepoints do not require a "cond" argument, because they are
meant to be used only for sys_enter and sys_exit instrumentation, which
don't require condition evaluation.

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]>
include/linux/tracepoint.h

index 832f49b56b1f9a5027d3d9a57e4a977135218a3c..b2633a72e8719c9d1aa601ac47c81bffa8a8230d 100644 (file)
@@ -220,7 +220,7 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p)
  * site if it is not watching, as it will need to be active when the
  * tracepoint is enabled.
  */
-#define __DECLARE_TRACE_COMMON(name, proto, args, cond, data_proto)    \
+#define __DECLARE_TRACE_COMMON(name, proto, args, data_proto)          \
        extern int __traceiter_##name(data_proto);                      \
        DECLARE_STATIC_CALL(tp_func_##name, __traceiter_##name);        \
        extern struct tracepoint __tracepoint_##name;                   \
@@ -254,7 +254,7 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p)
        }
 
 #define __DECLARE_TRACE(name, proto, args, cond, data_proto)           \
-       __DECLARE_TRACE_COMMON(name, PARAMS(proto), PARAMS(args), cond, PARAMS(data_proto)) \
+       __DECLARE_TRACE_COMMON(name, PARAMS(proto), PARAMS(args), PARAMS(data_proto)) \
        static inline void trace_##name(proto)                          \
        {                                                               \
                if (static_branch_unlikely(&__tracepoint_##name.key)) { \
@@ -269,18 +269,16 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p)
                }                                                       \
        }
 
-#define __DECLARE_TRACE_SYSCALL(name, proto, args, cond, data_proto)   \
-       __DECLARE_TRACE_COMMON(name, PARAMS(proto), PARAMS(args), cond, PARAMS(data_proto)) \
+#define __DECLARE_TRACE_SYSCALL(name, proto, args, data_proto)         \
+       __DECLARE_TRACE_COMMON(name, PARAMS(proto), PARAMS(args), PARAMS(data_proto)) \
        static inline void trace_##name(proto)                          \
        {                                                               \
                might_fault();                                          \
                if (static_branch_unlikely(&__tracepoint_##name.key)) { \
-                       if (cond) {                                     \
-                               scoped_guard(rcu_tasks_trace)           \
-                                       __DO_TRACE_CALL(name, TP_ARGS(args)); \
-                       }                                               \
+                       scoped_guard(rcu_tasks_trace)                   \
+                               __DO_TRACE_CALL(name, TP_ARGS(args));   \
                }                                                       \
-               if (IS_ENABLED(CONFIG_LOCKDEP) && (cond)) {             \
+               if (IS_ENABLED(CONFIG_LOCKDEP)) {                       \
                        WARN_ONCE(!rcu_is_watching(),                   \
                                  "RCU not watching for tracepoint");   \
                }                                                       \
@@ -363,7 +361,7 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p)
 
 
 #else /* !TRACEPOINTS_ENABLED */
-#define __DECLARE_TRACE(name, proto, args, cond, data_proto)           \
+#define __DECLARE_TRACE_COMMON(name, proto, args, data_proto)          \
        static inline void trace_##name(proto)                          \
        { }                                                             \
        static inline int                                               \
@@ -387,7 +385,11 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p)
                return false;                                           \
        }
 
-#define __DECLARE_TRACE_SYSCALL        __DECLARE_TRACE
+#define __DECLARE_TRACE(name, proto, args, cond, data_proto)           \
+       __DECLARE_TRACE_COMMON(name, PARAMS(proto), PARAMS(args), PARAMS(data_proto))
+
+#define __DECLARE_TRACE_SYSCALL(name, proto, args, data_proto)         \
+       __DECLARE_TRACE_COMMON(name, PARAMS(proto), PARAMS(args), PARAMS(data_proto))
 
 #define DEFINE_TRACE_FN(name, reg, unreg, proto, args)
 #define DEFINE_TRACE_SYSCALL(name, reg, unreg, proto, args)
@@ -453,7 +455,6 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p)
 
 #define DECLARE_TRACE_SYSCALL(name, proto, args)                       \
        __DECLARE_TRACE_SYSCALL(name, PARAMS(proto), PARAMS(args),      \
-                               cpu_online(raw_smp_processor_id()),     \
                                PARAMS(void *__data, proto))
 
 #define TRACE_EVENT_FLAGS(event, flag)
This page took 0.053087 seconds and 4 git commands to generate.