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

From: Michael Ellerman
Date: Thu Jul 24 2014 - 22:55:46 EST

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.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at