hwcache events and kernel/userspace event modifiers - bug?
Hi,
when using the "k" and "u" event modifiers in order to exclude kernel or userspace counting, the "hw" events print the modifier along with the event names in results. When doing the same with a "hwcache" event, the report shows events without modifiers.
$ perf stat -e cycles:u -e L1-dcache-loads:u -- true
Performance counter stats for 'true':
153,771 cycles:u
24,457 L1-dcache-loads
0.001813975 seconds time elapsedWhile "cycles:u" has the ":u" modifier, "L1-dcache-loads" does not. Despite that, the kernel/userspace excluding seem to work:
$ perf stat -e L1-dcache-loads:u -e L1-dcache-loads:k -e L1-dcache-loads:ku -- ls
Performance counter stats for 'ls':
146,714 L1-dcache-loads
305,080 L1-dcache-loads
451,794 L1-dcache-loads0.002221714 seconds time elapsed
Where 146714 + 305080 = 451794, so k+u is equal to ku.
This happens with the Arnaldo's latest perf/core perf, the same as with the others.
Might that be a bug?
Thanks.
Michael