Profile the Linux kernel

To ensure the statistics that the kernel generates align with source code in the Analysis Reports, include the kernel in the Program Images section in the Capture Settings dialog box. Before you can include the kernel in the Program Images section, you must build a version of vmlinux with kernel debug information enabled.

Procedure

  1. Navigate to the kernel build directory.

  2. Enter the following command to enable you to change menuconfig options:

    make ARCH=arm CROSS_COMPILE=<cross_compiler_directory>/bin/arm-linux-gnueabihf- menuconfig
    
  3. In the Kernel Hacking menu, select the Compile the kernel with debug info option. This option enables the CONFIG_DEBUG_INFO kernel option.

  4. Enter the following command to build a new vmlinux image:

    make -j5 ARCH=arm CROSS_COMPILE=<cross_compiler_directory>/bin/arm-linux-gnueabihf- uImage
    

    Note

    You can profile a driver by either statically linking it into the kernel image or by adding the module as an image in the Capture Settings dialog box.

  5. Open the Capture Settings dialog box.

  6. Click the Add image button in the Program Images section.

  7. Navigate to your vmlinux file and select it.

  8. Click Open.

  9. Start a new capture session.