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:04 +0000 (19:58 -0400)
commitb3c7abd81223eed347a5e1ecfcc55e0641d1e841
tree3a07e3684db74a66b42a4267335b6fa18bc075be
parent3ffb9d255cb5277f0cdfc464410dbce46eeec9dd
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.02452 seconds and 4 git commands to generate.