I am trying to understand the
--cpu option of
perf-stat. In the man pages it says:
Count only on the list of CPUs provided. Multiple CPUs can be provided as a comma-separated list with no space: 0,1. Ranges of CPUs are specified with -: 0-2. In per-thread mode, this option is ignored. The -a option is still necessary to activate system-wide monitoring. Default is to count on all CPUs.
Can we control with this option on which CPU the program will be executed, ie. if I put
--cpu 0, will the program be executed only on CPU 0? If not, what is the value of this option (since the results are probably going to be different each time we run
perf stat with this option)?