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);
> 
> The above "trace_contened_release_enabled()" is a static_branch where it
> turns the if statement into a nop when the tracepoint is not enabled, and a
> jmp when it is.

Thanks for catching this, Steven. Fixed locally.

Reply via email to