Re: [PATCH 00/15] tracepoint: Avoid double static_branch evaluation at guarded call sites

From: Steven Rostedt

Date: Thu Mar 12 2026 - 11:31:16 EST


On Thu, 12 Mar 2026 11:12:41 -0400
Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx> wrote:

> > if (trace_foo_enabled() && cond)
> > trace_invoke_foo(args); /* calls __do_trace_foo() directly */
>
> FYI, we have a similar concept in LTTng-UST for userspace
> instrumentation already:
>
> if (lttng_ust_tracepoint_enabled(provider, name))
> lttng_ust_do_tracepoint(provider, name, ...);
>
> Perhaps it can provide some ideas about API naming.

I find the word "invoke" sounding more official than "do" ;-)

Note, Vineeth came up with the naming. I would have done "do" but when I
saw "invoke" I thought it sounded better.

-- Steve