Translating perf events to raw event codes via sysfs

From: Mel Gorman
Date: Tue Mar 22 2016 - 06:31:36 EST

Hi Sukadev,

I'm curious about commit e0728b50d480 ("powerpc/perf: Export Power8
generic and cache events to sysfs"). This commit translates perf
high-level event names into raw codes but only on one architecture for
one CPU.

While I can see how that is useful, I'm wondering why this was implemented
as being specific to a single processor family. Should this not be done
generically for all architectures? I accept that translating event names to
raw codes for perf can be difficult but there are also tools like evt2raw
whose output can then be used with perf.

Mel Gorman