I am currently trying to monitor some hardware events of my system (6 hardware counters and 24 CPUs) as well as its cgroups. I take here the example of the LLC loads and cpu-cycles events.
To this end I use the perf
command.
However, when considering an idle cgroup (actually corresponding to a docker container only running bash) and running perf
for either cgroups or system wide monitoring, it seems that I am getting approximatly the same number of cpu-cycles in both cases:
$ sudo perf stat -e LLC-loads,cpu-cycles -a sleep 60
$ sudo perf stat -e instructions,cpu-cycles --cgroup=docker/b1cd988201789e55128393cff5ffbf37b0d6efec0fc70e1b716163b4b1f91f1f -a sleep 60
I was expecting a way smaller number of cpu cycles for my cgroups. (Same results are obtained when providing either the --cpu=0-23
or the -a
option.)
Am I missing something here?
I am wondering how the --cgroup
option works. In the end, is it only configured for some events?
Thank you in advance for your time!