On 2026-03-12 11:23, Steven Rostedt wrote:
On Thu, 12 Mar 2026 11:12:41 -0400
Mathieu Desnoyers <[email protected]> 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.

It works as long as you don't have a tracing subsystem called
"invoke", then you get into identifier clash territory.

Thanks,

Mathieu



--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com

Reply via email to