You copied the Doc URL to your clipboard.

Profiling the Linux kernel

If you do not include the kernel in the images in the capture options dialog box, the statistics generated by the kernel are not aligned with source code in the Analysis Reports To build a version of the kernel that you use in profiling, follow these steps:

  1. Enter the following command to change a menu setting:

    make ARCH=arm CROSS_COMPILE=$(CROSS_TOOLS}/bin/arm-none-linux-gnueabi- menuconfig

  2. Under Kernel Hacking, enable the Compile the kernel with debug info option.

  3. Insert the following command to build the image:

    make -j5 ARCH=arm CROSS_COMPILE=${CROSS_TOOLS}/bin/arm-none-linux-gnueabi- uImage

In the capture options dialog box, define the newly created vmlinux image in the Images section.

You can profile drivers using this method. Statically link the driver into the kernel image or add the module as an imag in the capture options dialog box.

Kernel stack unwinding

Unless you build gator.ko with kernel stack unwinding specifically turned on, the data related to the kernel in the Call paths view appears flat. It does represent an accurate call hierarchy.

To perform kernel stack unwinding and module unwinding, edit the Makefile to enable GATOR_KERNEL_STACK_UNWINDING and rebuild gator.ko. To do this, open the makefile in the editor of your choice and remove the comment tags that surround the GATOR_KERNEL_STACK_UNWINDING command.


Enabling kernel stack unwinding might trigger errors that appear at millisecond intervals during the capture session. If you experience this behavior, disable kernel stack unwinding.

Was this page helpful? Yes No