Fix: perf counters ABI rdpmc detection
Copy Linux kernel perf_event.h installed headers into lttng-ust to know
the recent ABI layout, and use the bit description detailed in the
following Linux kernel commit:
https://github.com/torvalds/linux/commit/
fa7315871046b9a4c48627905691dbde57e51033
to check whether the kernel supports rdpmc.
Fall-back on the perf read system call for kernels prior to 3.12,
because older kernels have an ABI bug where a union was used for both
cap_usr_time and cap_usr_rdpmc.
Also fall-back on the perf read system call for kernels that do not
support rdpmc.
Ensure setup_perf set the pc pointer value before checking whether we
need to the file descriptor open or not.
This combines the following master commits:
* Fix: perf counters build against kernel headers < 3.12
* Add generic fallback for perf counter read
* Fix: lttng context perf: missing stdbool.h header include
* Add perf context support for ARMv7
(removed the ARM-specific lines when combining)
* Keep perf context FD open for other architectures
Since this is a bugfix, we explicitly do not enable building perf
support for other architectures, as this would introduce a feature in
the stable release cycle.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>