On Fri,  4 Oct 2024 10:58:12 -0400
Mathieu Desnoyers <[email protected]> wrote:

> +                   PARAMS(assign), PARAMS(print))                    \
> +static notrace void                                                  \
> +trace_event_raw_event_##call(void *__data, proto)                    \
> +{                                                                    \
> +     guard(preempt_notrace)();                                       \
> +     do_trace_event_raw_event_##call(__data, args);                  \
> +}
> +

Do we really need to use "guard()" for a single line function? Why make the
compiler do more work?

static notrace void                                                     \
trace_event_raw_event_##call(void *__data, proto)                       \
{                                                                       \
        preempt_disable_notrace();                                      \
        do_trace_event_raw_event_##call(__data, args);                  \
        preempt_enable_notrace();                                       \
}

Is more readable.

-- Steve

Reply via email to