On Thu, 12 Mar 2026 09:54:29 -0700
Andrii Nakryiko <[email protected]> wrote:

> > > emit_trace_foo()
> > > __trace_foo()  
> 
> this seems like the best approach, IMO. double-underscored variants
> are usually used for some specialized/internal version of a function
> when we know that some conditions are correct (e.g., lock is already
> taken, or something like that). Which fits here: trace_xxx() will
> check if tracepoint is enabled, while __trace_xxx() will not check and
> just invoke the tracepoint? It's short, it's distinct, and it says "I
> know what I am doing".

Honestly, I consider double underscore as internal only and not something
anyone but the subsystem maintainers use.

This, is a normal function where it's just saying: If you have it already
enabled, then you can use this. Thus, I don't think it qualifies as a "you
know what you are doing".

Perhaps: call_trace_foo() ?

-- Steve

Reply via email to