How do I generate the /sys/kernel/debug/tracing folder in kernel with yocto project?












0















I was tying to use perf on Renesas target and I configured the yocto "local.conf" as showed in this link.



#avoid stripping binaries 
INHIBIT_PACKAGE_STRIP = "1"

#add the debug information
EXTRA_IMAGE_FEATURES= "debug-tweaks tools-debug dbg-pkgs tools-profile"

#format the debug info into a readable format for PERF
PACKAGE_DEBUG_SPLIT_STYLE = 'debug-file-directory'


perf is working but I need to monitor the context switches which require to use perf timechart and other commands that depends on perf-events, but the commands can't find this path "/sys/kernel/debug/tracing/events" .



What should I do in order to get this folder and its files compiled with my kernel?










share|improve this question





























    0















    I was tying to use perf on Renesas target and I configured the yocto "local.conf" as showed in this link.



    #avoid stripping binaries 
    INHIBIT_PACKAGE_STRIP = "1"

    #add the debug information
    EXTRA_IMAGE_FEATURES= "debug-tweaks tools-debug dbg-pkgs tools-profile"

    #format the debug info into a readable format for PERF
    PACKAGE_DEBUG_SPLIT_STYLE = 'debug-file-directory'


    perf is working but I need to monitor the context switches which require to use perf timechart and other commands that depends on perf-events, but the commands can't find this path "/sys/kernel/debug/tracing/events" .



    What should I do in order to get this folder and its files compiled with my kernel?










    share|improve this question



























      0












      0








      0








      I was tying to use perf on Renesas target and I configured the yocto "local.conf" as showed in this link.



      #avoid stripping binaries 
      INHIBIT_PACKAGE_STRIP = "1"

      #add the debug information
      EXTRA_IMAGE_FEATURES= "debug-tweaks tools-debug dbg-pkgs tools-profile"

      #format the debug info into a readable format for PERF
      PACKAGE_DEBUG_SPLIT_STYLE = 'debug-file-directory'


      perf is working but I need to monitor the context switches which require to use perf timechart and other commands that depends on perf-events, but the commands can't find this path "/sys/kernel/debug/tracing/events" .



      What should I do in order to get this folder and its files compiled with my kernel?










      share|improve this question
















      I was tying to use perf on Renesas target and I configured the yocto "local.conf" as showed in this link.



      #avoid stripping binaries 
      INHIBIT_PACKAGE_STRIP = "1"

      #add the debug information
      EXTRA_IMAGE_FEATURES= "debug-tweaks tools-debug dbg-pkgs tools-profile"

      #format the debug info into a readable format for PERF
      PACKAGE_DEBUG_SPLIT_STYLE = 'debug-file-directory'


      perf is working but I need to monitor the context switches which require to use perf timechart and other commands that depends on perf-events, but the commands can't find this path "/sys/kernel/debug/tracing/events" .



      What should I do in order to get this folder and its files compiled with my kernel?







      linux-kernel embedded debugging yocto perf






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jun 21 '18 at 20:04









      Guido

      1033




      1033










      asked Jul 10 '17 at 8:58









      gemadgemad

      11




      11






















          1 Answer
          1






          active

          oldest

          votes


















          0














          You probably need to mount the debugfs filesystem:



          mount -t debugfs none /sys/kernel/debug


          If you already have a startup script of your own in /etc/init.d/ it should be possible to add it there, or you might add it to /etc/fstab as



          debugfs /sys/kernel/debug debugfs defaults





          share|improve this answer
























          • this folder already mounted but the debug folder have no folders named events

            – gemad
            Jul 10 '17 at 9:41











          • Did your kernel get compiled with CONFIG_PERF_EVENTS=y ?

            – meuh
            Jul 10 '17 at 10:06











          • where should i add this option ?

            – gemad
            Jul 10 '17 at 10:08











          • Did you check if it is already there? If not yocto has its own way complex way of handling the kernel config. You need to look for examples of creating your own .bbappend recipe in recipes-kernel to add the line CONFIG_PERF_EVENTS=y to ${B}/.config and run yes '' | oe_runmake oldconfig.

            – meuh
            Jul 10 '17 at 14:20











          • I did so and recompiled , but still th events folder not exist at the debug folder , only those files and folders do , { asoc, dri, hid, pm_qos, sleep_time, bdi, extfrag, memblock, pwm, suspend_stats, clk , fault_around_bytes, mmc0, regmap ,usb, debug_enabled, gcov, opp, regulator, virtio-ports, dma_buf, gpio, pinctrl, sched_features, wakeup_sources }

            – gemad
            Jul 11 '17 at 7:32













          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',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          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%2f377428%2fhow-do-i-generate-the-sys-kernel-debug-tracing-folder-in-kernel-with-yocto-proj%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          You probably need to mount the debugfs filesystem:



          mount -t debugfs none /sys/kernel/debug


          If you already have a startup script of your own in /etc/init.d/ it should be possible to add it there, or you might add it to /etc/fstab as



          debugfs /sys/kernel/debug debugfs defaults





          share|improve this answer
























          • this folder already mounted but the debug folder have no folders named events

            – gemad
            Jul 10 '17 at 9:41











          • Did your kernel get compiled with CONFIG_PERF_EVENTS=y ?

            – meuh
            Jul 10 '17 at 10:06











          • where should i add this option ?

            – gemad
            Jul 10 '17 at 10:08











          • Did you check if it is already there? If not yocto has its own way complex way of handling the kernel config. You need to look for examples of creating your own .bbappend recipe in recipes-kernel to add the line CONFIG_PERF_EVENTS=y to ${B}/.config and run yes '' | oe_runmake oldconfig.

            – meuh
            Jul 10 '17 at 14:20











          • I did so and recompiled , but still th events folder not exist at the debug folder , only those files and folders do , { asoc, dri, hid, pm_qos, sleep_time, bdi, extfrag, memblock, pwm, suspend_stats, clk , fault_around_bytes, mmc0, regmap ,usb, debug_enabled, gcov, opp, regulator, virtio-ports, dma_buf, gpio, pinctrl, sched_features, wakeup_sources }

            – gemad
            Jul 11 '17 at 7:32


















          0














          You probably need to mount the debugfs filesystem:



          mount -t debugfs none /sys/kernel/debug


          If you already have a startup script of your own in /etc/init.d/ it should be possible to add it there, or you might add it to /etc/fstab as



          debugfs /sys/kernel/debug debugfs defaults





          share|improve this answer
























          • this folder already mounted but the debug folder have no folders named events

            – gemad
            Jul 10 '17 at 9:41











          • Did your kernel get compiled with CONFIG_PERF_EVENTS=y ?

            – meuh
            Jul 10 '17 at 10:06











          • where should i add this option ?

            – gemad
            Jul 10 '17 at 10:08











          • Did you check if it is already there? If not yocto has its own way complex way of handling the kernel config. You need to look for examples of creating your own .bbappend recipe in recipes-kernel to add the line CONFIG_PERF_EVENTS=y to ${B}/.config and run yes '' | oe_runmake oldconfig.

            – meuh
            Jul 10 '17 at 14:20











          • I did so and recompiled , but still th events folder not exist at the debug folder , only those files and folders do , { asoc, dri, hid, pm_qos, sleep_time, bdi, extfrag, memblock, pwm, suspend_stats, clk , fault_around_bytes, mmc0, regmap ,usb, debug_enabled, gcov, opp, regulator, virtio-ports, dma_buf, gpio, pinctrl, sched_features, wakeup_sources }

            – gemad
            Jul 11 '17 at 7:32
















          0












          0








          0







          You probably need to mount the debugfs filesystem:



          mount -t debugfs none /sys/kernel/debug


          If you already have a startup script of your own in /etc/init.d/ it should be possible to add it there, or you might add it to /etc/fstab as



          debugfs /sys/kernel/debug debugfs defaults





          share|improve this answer













          You probably need to mount the debugfs filesystem:



          mount -t debugfs none /sys/kernel/debug


          If you already have a startup script of your own in /etc/init.d/ it should be possible to add it there, or you might add it to /etc/fstab as



          debugfs /sys/kernel/debug debugfs defaults






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jul 10 '17 at 9:37









          meuhmeuh

          32k11954




          32k11954













          • this folder already mounted but the debug folder have no folders named events

            – gemad
            Jul 10 '17 at 9:41











          • Did your kernel get compiled with CONFIG_PERF_EVENTS=y ?

            – meuh
            Jul 10 '17 at 10:06











          • where should i add this option ?

            – gemad
            Jul 10 '17 at 10:08











          • Did you check if it is already there? If not yocto has its own way complex way of handling the kernel config. You need to look for examples of creating your own .bbappend recipe in recipes-kernel to add the line CONFIG_PERF_EVENTS=y to ${B}/.config and run yes '' | oe_runmake oldconfig.

            – meuh
            Jul 10 '17 at 14:20











          • I did so and recompiled , but still th events folder not exist at the debug folder , only those files and folders do , { asoc, dri, hid, pm_qos, sleep_time, bdi, extfrag, memblock, pwm, suspend_stats, clk , fault_around_bytes, mmc0, regmap ,usb, debug_enabled, gcov, opp, regulator, virtio-ports, dma_buf, gpio, pinctrl, sched_features, wakeup_sources }

            – gemad
            Jul 11 '17 at 7:32





















          • this folder already mounted but the debug folder have no folders named events

            – gemad
            Jul 10 '17 at 9:41











          • Did your kernel get compiled with CONFIG_PERF_EVENTS=y ?

            – meuh
            Jul 10 '17 at 10:06











          • where should i add this option ?

            – gemad
            Jul 10 '17 at 10:08











          • Did you check if it is already there? If not yocto has its own way complex way of handling the kernel config. You need to look for examples of creating your own .bbappend recipe in recipes-kernel to add the line CONFIG_PERF_EVENTS=y to ${B}/.config and run yes '' | oe_runmake oldconfig.

            – meuh
            Jul 10 '17 at 14:20











          • I did so and recompiled , but still th events folder not exist at the debug folder , only those files and folders do , { asoc, dri, hid, pm_qos, sleep_time, bdi, extfrag, memblock, pwm, suspend_stats, clk , fault_around_bytes, mmc0, regmap ,usb, debug_enabled, gcov, opp, regulator, virtio-ports, dma_buf, gpio, pinctrl, sched_features, wakeup_sources }

            – gemad
            Jul 11 '17 at 7:32



















          this folder already mounted but the debug folder have no folders named events

          – gemad
          Jul 10 '17 at 9:41





          this folder already mounted but the debug folder have no folders named events

          – gemad
          Jul 10 '17 at 9:41













          Did your kernel get compiled with CONFIG_PERF_EVENTS=y ?

          – meuh
          Jul 10 '17 at 10:06





          Did your kernel get compiled with CONFIG_PERF_EVENTS=y ?

          – meuh
          Jul 10 '17 at 10:06













          where should i add this option ?

          – gemad
          Jul 10 '17 at 10:08





          where should i add this option ?

          – gemad
          Jul 10 '17 at 10:08













          Did you check if it is already there? If not yocto has its own way complex way of handling the kernel config. You need to look for examples of creating your own .bbappend recipe in recipes-kernel to add the line CONFIG_PERF_EVENTS=y to ${B}/.config and run yes '' | oe_runmake oldconfig.

          – meuh
          Jul 10 '17 at 14:20





          Did you check if it is already there? If not yocto has its own way complex way of handling the kernel config. You need to look for examples of creating your own .bbappend recipe in recipes-kernel to add the line CONFIG_PERF_EVENTS=y to ${B}/.config and run yes '' | oe_runmake oldconfig.

          – meuh
          Jul 10 '17 at 14:20













          I did so and recompiled , but still th events folder not exist at the debug folder , only those files and folders do , { asoc, dri, hid, pm_qos, sleep_time, bdi, extfrag, memblock, pwm, suspend_stats, clk , fault_around_bytes, mmc0, regmap ,usb, debug_enabled, gcov, opp, regulator, virtio-ports, dma_buf, gpio, pinctrl, sched_features, wakeup_sources }

          – gemad
          Jul 11 '17 at 7:32







          I did so and recompiled , but still th events folder not exist at the debug folder , only those files and folders do , { asoc, dri, hid, pm_qos, sleep_time, bdi, extfrag, memblock, pwm, suspend_stats, clk , fault_around_bytes, mmc0, regmap ,usb, debug_enabled, gcov, opp, regulator, virtio-ports, dma_buf, gpio, pinctrl, sched_features, wakeup_sources }

          – gemad
          Jul 11 '17 at 7:32




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f377428%2fhow-do-i-generate-the-sys-kernel-debug-tracing-folder-in-kernel-with-yocto-proj%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          How to reconfigure Docker Trusted Registry 2.x.x to use CEPH FS mount instead of NFS and other traditional...

          is 'sed' thread safe

          How to make a Squid Proxy server?