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)
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>

No differences found
This page took 0.024087 seconds and 4 git commands to generate.