[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 11 Nov 2020 08:49:41 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: "Paul E. McKenney" <paulmck@...nel.org>
Cc: "Joel Fernandes (Google)" <joel@...lfernandes.org>,
linux-kernel@...r.kernel.org,
Frederic Weisbecker <frederic@...nel.org>,
Neeraj Upadhyay <neeraju@...eaurora.org>,
Josh Triplett <josh@...htriplett.org>,
Lai Jiangshan <jiangshanlai@...il.com>,
Marco Elver <elver@...gle.com>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
rcu@...r.kernel.org, "Uladzislau Rezki (Sony)" <urezki@...il.com>,
fweisbec@...il.com, neeraj.iitr10@...il.com
Subject: Re: [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@...nel.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
Powered by blists - more mailing lists