With my Intel(R) Core(TM)2 Duo CPU L7500 @ 1.60GHz, 3.4.0 mainline, Ubuntu 12.04 32 bit and all the LTTNG components built from git I get the following:
+ sudo lttng add-context -k -t perf:LLC-load-misses -t perf:LLC-store-misses -t perf:LLC-prefetch-misses
PERROR: add context ioctl: Invalid argument [in kernel_add_channel_context() at kernel.c:45]
Error: perf:LLC-prefetch-misses: Add kernel context failed
kernel context perf:LLC-store-misses added to all channels
kernel context perf:LLC-load-misses added to all channels
Warning: Some command(s) went wrong
LTTng 2.0: Tracing for power users and developers - part 2
Posted Aug 23, 2012 12:56 UTC (Thu) by compudj (subscriber, #43335)
[Link]
You probably cannot activate that many performance counters concurrently on your processor. See the dmesg output. Here is an excerpt of mine for example:
In this case, my processor supports 4 concurrent performance counters. (for reference, cpuinfo: model name : Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz). So try removing one of the perf counters and it should be fine.