Re: [RFC PATCH 2/2] powerpc/perf: Implement get_cpu_str()

Michael Ellerman
2014-07-25T02:55:44Z

On Thu, 2014-07-24 at 00:47 -0700, Sukadev Bhattiprolu wrote:
> [RFC PATCH 2/2] powerpc/perf: Implement get_cpu_str()
>
> get_cpu_str() returns a string identifying the CPU type on the system.
> This string is then used to locate a cached JSON file which defines
> the list of PMU events supported by the CPU.
>
> Eg: if get_cpu_str() returns "power8", the perf tool would refer to the
> PMU events defined in ~/.cache/pmu-events/power8.json.

Hi Suka,

I know we talked internally a while ago about using AT_BASE_PLATFORM, but that
was before I looked closely at Andi's patches last week.

I think we're better off using the PVR directly, it's less magic, it gives us
more flexibility and it's easier to get at.

So get_cpu_str() would just return eg. "004b0201-core".

We would handle the mapping of that name to an event file either in the
download script via the mapfile, or just by using symlinks.

cheers