How could I add support for an event modifier in perf

The name of the pictureThe name of the pictureThe name of the pictureClash 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?







share|improve this question


























    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?







    share|improve this question
























      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?







      share|improve this question














      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?









      share|improve this question













      share|improve this question




      share|improve this question








      edited Oct 14 '17 at 16:57

























      asked Oct 14 '17 at 3:26









      Leandro Silva

      63




      63

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          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



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          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













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?