Re: [tip:perf/core] perf/x86/intel: Use Intel family macros for core perf events

Vince Weaver
2016-06-08T20:15:32Z

On Wed, 8 Jun 2016, Borislav Petkov wrote:

> On Wed, Jun 08, 2016 at 06:25:29PM +0200, Ingo Molnar wrote:
> > model string : IvyBridge_X
> >
> > ... or something like that. The string could even be auto-generated from the list
> > in intel-family.h?
>
> Yap, that sounds cool too. And then we should issue that too during boot:
>
> [ 0.542398] smpboot: CPU0: AMD FX(tm)-8350 Eight-Core Processor (family: 0x15, model: 0x2, stepping: 0x0; Piledriver)
>
> so that we don't need to ask for dmesg *and* /proc/cpuinfo.
>
> Hohumm, this should be very useful.

However you do it, you want to make the strings match intel-family.h for
maximum grepability.

It's also unclear what internal names matter. For example is AMD 15h/60h
"Carrizo" or "Excavator" or both?

I just spent the afternoon making a huge RAPL/APM kernel support matrix
for the PAPI people.

Lots of fun since
arch/x86/events/intel/rapl.c
and
drivers/powercap/intel_rapl.c

support widely different subsets of Intel hardware, and one uses decimal
while one uses hex for the model numbers. So I reluctantly admit unifying
this all somehow would be nice.

(why we need two different interfaces for RAPL is another thing, not to
mention the fact that powercap you can read the values as a normal user
but with perf you need to be root to read the exact same thing).

Vince