Add perf context support for ARMv7
authorJulien Desfossez <jdesfossez@efficios.com>
Mon, 27 Jun 2016 21:40:01 +0000 (17:40 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 27 Jun 2016 23:10:39 +0000 (19:10 -0400)
commitd286ad50d958f988399fadc0a53bf4770b7a10ae
tree22ac87d97efc2299858462837cdf0ba6683d6433
parentb9389e6efa5e337e3de81062070f2e0dff1a4222
Add perf context support for ARMv7

Allow to add perf context to UST traces. ARMv7 does not have a reliable
way to read perf PMU counters entirely from user-space like we do on
x86, so this approach requires a system call every time a counter needs
to be read which has a significant performance impact.

ARMv7 does not have way to read PMU from userspace because it requires
write access to the debug coprocessor to select which PMU counter to
read which defeats user-space/kernel protection. For that reason, the
bits required to allow user-space access to those registers are not
enabled in the kernel and Perf does not expose any information in the
shared mmap page, so we do not know what is the counter index. Also, for
ARMv7 we cannot set the exclude_kernel flag, so the counter stays active
even when the process is executing in kernel context (system calls
mainly).

This generic approach might work on other architecture, but it has not
yet been tested so it is not enabled in the code.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
configure.ac
liblttng-ust-ctl/ustctl.c
liblttng-ust/lttng-context-perf-counters.c
This page took 0.025528 seconds and 4 git commands to generate.