Re: [PATCH v2 11/27] perf parse-events: Support hardware events inside PMU

From: Arnaldo Carvalho de Melo
Date: Thu Mar 18 2021 - 09:22:53 EST

Em Thu, Mar 18, 2021 at 01:16:37PM +0100, Jiri Olsa escreveu:
> On Wed, Mar 17, 2021 at 10:42:45AM -0300, Arnaldo Carvalho de Melo wrote:
> > Em Wed, Mar 17, 2021 at 08:17:52PM +0800, Jin, Yao escreveu:
> > > I'm OK to only support 'cpu_core/cpu-cycles/' or 'cpu_atom/cpu-cycles/'. But
> > > what would we do for cache event?

> > > 'perf stat -e LLC-loads' is OK, but 'perf stat -e cpu/LLC-loads/' is not supported currently.

> > > For hybrid platform, user may only want to enable the LLC-loads on core CPUs
> > > or on atom CPUs. That's reasonable. While if we don't support the pmu style
> > > event, how to satisfy this requirement?

> > > If we can support the pmu style event, we can also use the same way for
> > > cpu_core/cycles/. At least it's not a bad thing, right? :)

> > While we're discussing, do we really want to use the "core" and "atom"
> > terms here? I thought cpu/cycles/ would be ok for the main (Big) CPU and
> > that we should come up with some short name for the "litle" CPUs.

> > Won't we have the same situation with ARM where we want to know the
> > number of cycles spent on a BIG core and also on a little one?

> > Perhaps 'cycles' should mean all cycles, and then we use 'big/cycles/' and
> > 'little/cycles/'?

> do arm servers already export multiple pmus like this?
> I did not notice

I haven't checked, but AFAIK this BIG/Little kind of arch started there,

- Arnaldo

> it'd be definitely great to have some unite way for this,
> so far we have the hybrid pmu detection and support in
> hw events like cycles/instructions.. which should be easy
> to follow on arm
> there's also support to have these events on specific pmu
> pmu/cycles/ , which I still need to check on