Re: [PATCH v3 3/8] tracing/perf: guard syscall probe with preempt_notrace
From: Steven Rostedt
Date: Tue Oct 08 2024 - 19:22:20 EST
On Fri, 4 Oct 2024 10:58:13 -0400
Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx> wrote:
> #undef DECLARE_EVENT_SYSCALL_CLASS
> -#define DECLARE_EVENT_SYSCALL_CLASS DECLARE_EVENT_CLASS
> +#define DECLARE_EVENT_SYSCALL_CLASS(call, proto, args, tstruct, assign, print) \
> +__DECLARE_EVENT_CLASS(call, PARAMS(proto), PARAMS(args), PARAMS(tstruct), \
> + PARAMS(assign), PARAMS(print)) \
> +static notrace void \
> +perf_trace_##call(void *__data, proto) \
> +{ \
> + u64 __count __attribute__((unused)); \
> + struct task_struct *__task __attribute__((unused)); \
> + \
> + guard(preempt_notrace)(); \
> + do_perf_trace_##call(__data, args); \
> +}
>
Same here. The new guard() interface is really nice for complex functions,
but looks a bit overkill to cover a single line.
-- Steve