Add ARM hybrid encoding support for perf_events
This patch adds the new logic to handle encoding of the PMU type
for the Linux perf_events interface. Hybrids are a challenge
in that it is not possible to simply use PERF_TYPE_RAW because
that does not disambiguate which of the core PMU models to attach
the events to. Instead, the PMU type must be collected from the
Linux sysfs interface. But for that to happen the library needs
to know the PMU instance name assigned by perf_events for each
PMU model detected. On ARM, this is not straightforward.
The patch extends the meaning the the pmu->perf_name string to include
a comma separated list of names instead of just one. The library then
tries each name until there is a match in /sys/bus/event_source/devices/.
This accommodates situations where the same PMU model is used in a
homogeneous vs. hybrid config.
Signed-off-by: Stephane Eranian <eranian@gmail.com>
7 files changed