Okay, so this really bugs me.
I'm using perf to record the cpu-clock event (a software event):
$ > perf record -e cpu-clock srun -n 1 ./stream
... and the table produced by perf report is empty.
I'm using perf to record all available software events listed in perf list:
$ > perf record -e alignment-faults,context-switches,cpu-clock,cpu-migrations,\
dummy,emulation-faults,major-faults,minor-faults,page-faults,task-clock\
srun -n 1 ./stream
... the table gives me a list of available samples:
0 alignment-faults
125 context-switches
255 cpu-clock
21 cpu-migrations
0 dummy
0 emulation-faults
0 major-faults
128 minor-faults
132 page-faults
254 task-clock
I can look at the samples collected in cpu-clock and it gives me information. Why?! Why does it not work if I only measure cpu-clock? Why were there no samples collected in four events?
This is a follow-up to this question: error: perf.data file has no samples
srun? Where does it start target process? Is it based on ssh or any other remote shell or some daemon to start process?perf recordwill track only directly forked sub-processes, not the process started (forked) by sshd or other daemon. Tryperf statfirst to get total performance counterssrun -n 1 perf stat ./streamthen select event with high counter to record:srun -n 1 perf record -e cpu-clock ./stream- osgx