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

#avoid stripping binaries 

#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?

1 Answer 1


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
  • 1
    this folder already mounted but the debug folder have no folders named events
    – gemad
    Jul 10, 2017 at 9:41
  • Did your kernel get compiled with CONFIG_PERF_EVENTS=y ?
    – meuh
    Jul 10, 2017 at 10:06
  • where should i add this option ?
    – gemad
    Jul 10, 2017 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, 2017 at 14:20
  • 1
    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, 2017 at 7:32

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.