I am using OProfile for OpenMP parallelized code by doing the following,
$ gcc -I/usr/include/hdf5/serial/ -std=c11 -O3 -fopt-info -fopenmp sp_linsvm.c -o sp_linsvm -lhdf5_serial
$ sudo ocount --events=CPU_CLK_UNHALTED,LLC_MISSES,LLC_REFS,MEM_INST_RETIRED,BR_MISP_EXEC, ./sp_linsvm
Events were actively counted for 22.0 seconds.
Event counts (scaled) for /home/aidan/progs/linsvm/sp_linsvm:
Event Count % time counted
BR_MISP_EXEC 6,523,181 80.00
CPU_CLK_UNHALTED 225,384,009,348 80.00
LLC_MISSES 276,587,407 80.02
LLC_REFS 1,098,236,806 80.00
MEM_INST_RETIRED 51,754,855,734 79.99
How do I know if the events are counted per CPU or as a whole? I am pretty sure its as a whole as they are close to the numbers if I compiled without OpenMP, but I want to be sure.