How could I add support for an event modifier in perf
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
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?
linux-kernel cpu power-management perf
add a comment |Â
up vote
1
down vote
favorite
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?
linux-kernel cpu power-management perf
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
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?
linux-kernel cpu power-management perf
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?
linux-kernel cpu power-management perf
edited Oct 14 '17 at 16:57
asked Oct 14 '17 at 3:26
Leandro Silva
63
63
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f398055%2fhow-could-i-add-support-for-an-event-modifier-in-perf%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password