Skip to content

Commit ef0d418

Browse files
compudjrostedt
authored andcommitted
tracing: Remove cond argument from __DECLARE_TRACE_SYSCALL
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]>
1 parent 98bf0fb commit ef0d418

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

include/linux/tracepoint.h

+13-12
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p)
220220
* site if it is not watching, as it will need to be active when the
221221
* tracepoint is enabled.
222222
*/
223-
#define __DECLARE_TRACE_COMMON(name, proto, args, cond, data_proto) \
223+
#define __DECLARE_TRACE_COMMON(name, proto, args, data_proto) \
224224
extern int __traceiter_##name(data_proto); \
225225
DECLARE_STATIC_CALL(tp_func_##name, __traceiter_##name); \
226226
extern struct tracepoint __tracepoint_##name; \
@@ -254,7 +254,7 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p)
254254
}
255255

256256
#define __DECLARE_TRACE(name, proto, args, cond, data_proto) \
257-
__DECLARE_TRACE_COMMON(name, PARAMS(proto), PARAMS(args), cond, PARAMS(data_proto)) \
257+
__DECLARE_TRACE_COMMON(name, PARAMS(proto), PARAMS(args), PARAMS(data_proto)) \
258258
static inline void trace_##name(proto) \
259259
{ \
260260
if (static_branch_unlikely(&__tracepoint_##name.key)) { \
@@ -269,18 +269,16 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p)
269269
} \
270270
}
271271

272-
#define __DECLARE_TRACE_SYSCALL(name, proto, args, cond, data_proto) \
273-
__DECLARE_TRACE_COMMON(name, PARAMS(proto), PARAMS(args), cond, PARAMS(data_proto)) \
272+
#define __DECLARE_TRACE_SYSCALL(name, proto, args, data_proto) \
273+
__DECLARE_TRACE_COMMON(name, PARAMS(proto), PARAMS(args), PARAMS(data_proto)) \
274274
static inline void trace_##name(proto) \
275275
{ \
276276
might_fault(); \
277277
if (static_branch_unlikely(&__tracepoint_##name.key)) { \
278-
if (cond) { \
279-
scoped_guard(rcu_tasks_trace) \
280-
__DO_TRACE_CALL(name, TP_ARGS(args)); \
281-
} \
278+
scoped_guard(rcu_tasks_trace) \
279+
__DO_TRACE_CALL(name, TP_ARGS(args)); \
282280
} \
283-
if (IS_ENABLED(CONFIG_LOCKDEP) && (cond)) { \
281+
if (IS_ENABLED(CONFIG_LOCKDEP)) { \
284282
WARN_ONCE(!rcu_is_watching(), \
285283
"RCU not watching for tracepoint"); \
286284
} \
@@ -363,7 +361,7 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p)
363361

364362

365363
#else /* !TRACEPOINTS_ENABLED */
366-
#define __DECLARE_TRACE(name, proto, args, cond, data_proto) \
364+
#define __DECLARE_TRACE_COMMON(name, proto, args, data_proto) \
367365
static inline void trace_##name(proto) \
368366
{ } \
369367
static inline int \
@@ -387,7 +385,11 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p)
387385
return false; \
388386
}
389387

390-
#define __DECLARE_TRACE_SYSCALL __DECLARE_TRACE
388+
#define __DECLARE_TRACE(name, proto, args, cond, data_proto) \
389+
__DECLARE_TRACE_COMMON(name, PARAMS(proto), PARAMS(args), PARAMS(data_proto))
390+
391+
#define __DECLARE_TRACE_SYSCALL(name, proto, args, data_proto) \
392+
__DECLARE_TRACE_COMMON(name, PARAMS(proto), PARAMS(args), PARAMS(data_proto))
391393

392394
#define DEFINE_TRACE_FN(name, reg, unreg, proto, args)
393395
#define DEFINE_TRACE_SYSCALL(name, reg, unreg, proto, args)
@@ -453,7 +455,6 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p)
453455

454456
#define DECLARE_TRACE_SYSCALL(name, proto, args) \
455457
__DECLARE_TRACE_SYSCALL(name, PARAMS(proto), PARAMS(args), \
456-
cpu_online(raw_smp_processor_id()), \
457458
PARAMS(void *__data, proto))
458459

459460
#define TRACE_EVENT_FLAGS(event, flag)

0 commit comments

Comments
 (0)