[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251118084226.1e531c4b@gandalf.local.home>
Date: Tue, 18 Nov 2025 08:42:26 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Steven Rostedt <rostedt@...nel.org>, linux-kernel@...r.kernel.org,
linux-trace-kernel@...r.kernel.org, Masami Hiramatsu <mhiramat@...nel.org>,
Mark Rutland <mark.rutland@....com>, Mathieu Desnoyers
<mathieu.desnoyers@...icios.com>, Andrew Morton
<akpm@...ux-foundation.org>, Thomas Gleixner <tglx@...utronix.de>, Ian
Rogers <irogers@...gle.com>, Namhyung Kim <namhyung@...nel.org>, Arnaldo
Carvalho de Melo <acme@...nel.org>, Jiri Olsa <jolsa@...nel.org>, Douglas
Raillard <douglas.raillard@....com>
Subject: Re: [POC][RFC][PATCH 1/3] tracing: Add perf events
On Tue, 18 Nov 2025 09:35:10 +0100
Peter Zijlstra <peterz@...radead.org> wrote:
> > + cpu = smp_processor_id();
> > +
> > + e = per_cpu_ptr(events, cpu)->event;
> > + if (!e)
> > + return 0;
> > +
> > + e->pmu->read(e);
> > + return local64_read(&e->count);
> > +}
>
> NAK, wtf do you think its okay to use internal stuff like that? And
> wrongly while at it.
Peter, this is a PROOF-OF-CONCEPT. It means I'm showing the concept and not
the implementation. I'm hoping the NAK is on the implementation and not the
concept.
>
> What you wanted to use was perf_event_read_local().
Great! I didn't know about that. Which is why I posted this as a
PROOF-OF-CONCEPT and not even a normal RFC, so that I could learn about the
proper way of doing this.
-- Steve
Powered by blists - more mailing lists