On Thu, Mar 05, 2026 at 10:59:24AM -0500, Steven Rostedt wrote:
> On Wed,  4 Mar 2026 16:56:17 +0000
> Dmitry Ilvokhin <[email protected]> wrote:
> 
> > @@ -204,6 +206,8 @@ static inline void rwbase_write_unlock(struct rwbase_rt 
> > *rwb)
> >     unsigned long flags;
> >  
> >     raw_spin_lock_irqsave(&rtm->wait_lock, flags);
> > +   if (rt_mutex_has_waiters(rtm))
> > +           trace_contended_release(rwb);
> 
> Hmm, if statements should never be used just for tracepoints without a
> static branch. The above should be:
> 
>       if (trace_contended_release_enabled() && rt_mutex_has_waiters(rtm))
>               trace_contended_release(rwb);
> 

I still wish you would accept:

        if (trace_foo_enabled() && foo)
                __do_trace_foo();

The compilers can't optimize the static branches and thus you'll get it
twice for no reason.

I really wish they would just accept __pure, but alas.

Reply via email to