powerpc/perf/hv-24x7: parse catalog and populate sysfs with events
authorCody P Schafer <cody@linux.vnet.ibm.com>
Fri, 30 Jan 2015 21:46:00 +0000 (13:46 -0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 2 Feb 2015 06:56:38 +0000 (17:56 +1100)
commit5c5cd7b502595f6b90509b8aa4bba6f81b69315c
tree6e7aeb1fd8e31efad78262c1f10ba58b831f06a4
parente08e52824e41fb42e46593450d378ad1b33caedb
powerpc/perf/hv-24x7: parse catalog and populate sysfs with events

Retrieves and parses the 24x7 catalog on POWER systems that supply it
(right now, only POWER 8). Events are exposed via sysfs in the standard
fashion, and are all parameterized.

$ cd /sys/bus/event_source/devices/hv_24x7/events

$ cat HPM_CS_FROM_L4_LDATA__PHYS_CORE
domain=0x2,offset=0xd58,core=?,lpar=0x0

$ cat HPM_TLBIE__VCPU_HOME_CHIP
domain=0x4,offset=0x358,vcpu=?,lpar=?

where user is required to specify values for the fields with '?' (like
core, vcpu, lpar above), when specifying the event with the perf tool.

Catalog is (at the moment) only parsed on boot. It needs re-parsing
when a some hypervisor events occur. At that point we'll also need to
prevent old events from continuing to function (counter that is passed
in via spare space in the config values?).

Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/perf/hv-24x7-catalog.h
arch/powerpc/perf/hv-24x7-domains.h [new file with mode: 0644]
arch/powerpc/perf/hv-24x7.c
arch/powerpc/perf/hv-24x7.h