On Wed, Sep 24, 2025, 20:10 Stefan Hajnoczi <stefa...@redhat.com> wrote:
> > fn trace_event_state_is_enabled(dstate: u16) -> bool { > > unsafe { trace_events_enabled_count } != 0 && dstate != 0 > > } > > The generated code is missing DTrace's SDT semaphore (see > generate_h_backend_dstate() in scripts/tracetool/backend/dtrace.py). The > conditional must be taken when a tool like SystemTap or GDB sets the SDT > semaphore. Right now it will not be taken because the conditional only > looks at _ ## id ## _DSTATE and not the SDT semaphore. > This is private code to trace-*.rs, for use within the tracepoint functions only; it's not a public "is the tracepoint active" API. The public side in C does look at the semaphore. Paolo