1

I need to account power for the kernel space, but unfortunately the k modifier are not supported for the power/energy-cores/. I have an example of what I'm trying to do below.

I'm reading the source of perf and the structure of the Kernel PMU Events, but I'm a bit lost. Is there someone familiar with the source code of perf who could share some tips of how these modifiers works in the source?

 user@dkphome:~$ sudo perf stat -a -e power/energy-cores/k -I 1000 sleep 5
 #           time             counts unit events
 1.000099515    <not supported> Joules power/energy-cores/k                                        
 2.000246523    <not supported> Joules power/energy-cores/k                                        
 3.000440743    <not supported> Joules power/energy-cores/k                                        
 4.000673143    <not supported> Joules power/energy-cores/k                                        
 5.000722624    <not supported> Joules power/energy-cores/k                                        
 user@dkphome:~$ sudo perf stat -a -e power/energy-cores/ -I 1000 sleep 5
 #           time             counts   unit events
 1.000128209               0,19 Joules power/energy-cores/                                         
 2.000257170               0,25 Joules power/energy-cores/                                         
 3.000406715               0,26 Joules power/energy-cores/                                         
 4.000571140               0,20 Joules power/energy-cores/                                         
 5.000711815               1,01 Joules power/energy-cores/                                         
 5.000882867               0,00 Joules power/energy-cores/   

PS: This other question was a lot of help What are Kernel PMU event-s in perf_events list?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.