How to enable a ftrace function on L3.14.28 BSP for i.MX6DL

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to enable a ftrace function on L3.14.28 BSP for i.MX6DL

2,583 Views
yuuki
Senior Contributor II

Dear all,

We want to implement ftrace function in L3.14.28 Linux BSP.
(bb file is based on the fsl-image-gui.bb)
However I cannot enable the ftrace function.

Would you tell me how to enable the ftrace function?

We refer to the following URL.

 - https://wiki.yoctoproject.org/wiki/Tracing_and_Profiling#General_Setup
 - https://yoctoproject.org/docs/1.7/profile-manual/profile-manual.html

We added the following line to conf/local.conf.
  $ EXTRA_IMAGE_FEATURES = "debug-tweaks tools-profile"
  $ PACKAGE_DEBUG_SPLIT_STYLE = 'debug-file-directory'

And then bitbak is executed.
However, tracing folder is not made under /sys/kernel/debug/.

We suspect that a procedure is not enough.
If there is the package which should be added to IMAGE_INSTALL_append more, would you tell us it?

On the other hand, we exclude the following item from IMAGE_INSTALL_append
 - packagegroup-fsl-tools-testapps
 - packagegroup-fsl-tools-benchmark


May we have any advice?

Best Regards,
Yuuki

Labels (3)
3 Replies

2,345 Views
eric_mascio
Contributor I

I was able to get it to work by using menuconfig to enable ftrace. Just modifying the local.conf file did not work as specified in the yocto directions and I am not sure that step is necessary.

what I did to fix the problem

  •  $> bitbake -c menuconfig linux-imx
    • modify .config to enable ftrace, 
    • From the menu choose  Kernel Hacking --> Tracers
    • Go into the Tracers sub-directory and enable [ ] Function Tracers ( this also enables Function Graph Tracers.

 

  • Do not clean. That will remove .config
  • Verify  if ftrace is enabled,
    • RESULT - CONFIG_FTRACE = y
    • $> less  tmp/work/imx8qxpzebra-poky-linux/linux-imx/4.14.78-r0/build/.config
    • Sample from .config
  • CONFIG_HAVE_FUNCTION_TRACER=y
  • CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
  • CONFIG_FTRACE=y

 

  • recompile the kernel, $> bitbake -c compile -f  linux-imx
  • Rebuild images $> bitbake fsl-image-validation-imx
  • When I reloaded the image,  fsl-image-validation-imx-imx8qxpmek.sdcard , on the target the tracing folder was there,  /sys/kernel/debug/tracing.

2,345 Views
eric_mascio
Contributor I

I have the same problem. I made the changes as described in the wiki

 - https://wiki.yoctoproject.org/wiki/Tracing_and_Profiling#General_Setup 

I did  a clean and rebuild of the image.

$> bitbake -c clean fsl-image-validation-imx

$> bitbake  fsl-image-validation-imx

Then loaded the .sdcard image onto the target. There is no tracing directory as described in the wiki page at /sys/kernel/debug/.

On the target the debugfs, where the tracing sub-directories should be, is mounted,

> debugfs on /sys/kernel/debug type debugfs (rw,relatime).

is there a different image that should be built or a different way to build it?

0 Kudos

2,345 Views
art
NXP Employee
NXP Employee

First, try to build the image without doing any modifications in the IMAGE_INSTALL_append file.

0 Kudos