On Tue, 18 Nov 2025 09:35:10 +0100 Peter Zijlstra <[email protected]> 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
