lkml.org 
[lkml]   [2020]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v9 4/7] rcu/trace: Add tracing for how segcb list changes
On Tue, 10 Nov 2020 16:35:30 -0800
"Paul E. McKenney" <paulmck@kernel.org> wrote:

> > +void __trace_rcu_segcb_stats(struct rcu_segcblist *rsclp, const char *context)
> > +{
> > + int cbs[RCU_CBLIST_NSEGS];
> > + unsigned long gps[RCU_CBLIST_NSEGS];
> > +
> > + if (!trace_rcu_segcb_stats_enabled())
> > + return;
>
> Can't you rely on the trace system to enable and disable this trace
> event? If the thought is to save instructions, then moving all this
> into TP_fast_assign() enables the trace system to deal with that as well.
>
> > + rcu_segcblist_countseq(rsclp, cbs, gps);
> > +
> > + trace_rcu_segcb_stats(context, cbs, gps);
> > +}
> > +#endif

Yeah, I agree with Paul. I think it is possible to move this all into the
TP_fast_assign. If you have trouble doing so, let me know.

-- Steve

\
 
 \ /
  Last update: 2020-11-11 14:50    [W:0.169 / U:0.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site