Fix: perf counters build against kernel headers < 3.12
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 18 Aug 2016 18:21:46 +0000 (14:21 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 18 Aug 2016 23:30:51 +0000 (19:30 -0400)
commit77d7fa989f79f3c2cb14d26576cbbb54b0637594
tree1965d7aad50a47a393ded1e6c8d38ce082d3ea12
parent8002ea62058fd7e44575f7056a26c6b257948d03
Fix: perf counters build against kernel headers < 3.12

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.

Ensure setup_perf set the pc pointer value before checking whether we
need to the file descriptor open or not.

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.025052 seconds and 4 git commands to generate.