Enable perf PMU counters by raw ID
authorJulien Desfossez <jdesfossez@efficios.com>
Tue, 5 Jul 2016 15:50:46 +0000 (11:50 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 8 Jul 2016 19:23:56 +0000 (15:23 -0400)
commit4fe444dafd2243de56091ab5dd7efa0050b0597f
tree4414e30e689a1e18a69a88a5bd1ba96ad5b8edad
parent9ef884643c4593e951d7e08869e1d7ac99856144
Enable perf PMU counters by raw ID

Allow enabling perf PMU counters by raw ID in addition to the generic
list already provided. The format for kernel tracing is
"perf:cpu:raw:rNNN:<name>" and "perf:thread:raw:rNNN:<name> for
user-space. The rNNN format is the same as perf-record(1) where NNN is a
hexadecimal event descriptor in the form of umask+eventsel. The <name>
field to associate a clearer name to the counter.

Example usage on Intel i7-3520M to get the unhalted reference cycles
(eventsel: 0x13c) count at privilege level 0 (umask: 0x00):
lttng add-context -k -t perf:cpu:raw:r0013c:x86unhalted

Result in the trace:
sched_switch: { cpu_id = 3 }, {
perf_cpu_raw_r0013c_x86unhalted = 27632578 }, [...]

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
doc/man/lttng-add-context.1.txt
src/bin/lttng/commands/add_context.c
This page took 0.027189 seconds and 4 git commands to generate.