Fix: perf counters ABI rdpmc detection
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 27 Jun 2016 21:40:00 +0000 (17:40 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 18 Aug 2016 23:58:25 +0000 (19:58 -0400)
commite336bbe5b25072ea65056b6779a2645a77f131ef
tree072744b5840fb0bf85bb214d9958d39a8a859251
parent246bb09aab94e1d50877eb585e8f21a13acf270a
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>
LICENSE
liblttng-ust/Makefile.am
liblttng-ust/lttng-context-perf-counters.c
liblttng-ust/perf_event.h [new file with mode: 0644]
This page took 0.025631 seconds and 4 git commands to generate.