(using the perf API by Ingo Molnar) to the trace on a per event basis. Let say
we want to get the CPU cycles at each define event:
-# lttng add-context -k -e sched_switch --perf-name aname --perf-type 0 --perf-id 0
+# lttng add-context -k -e sched_switch -t 1 --perf-name aname --perf-type 0 --perf-id 0
You'll have to use the add-context help for all possible perf counter values.