Profiling The Linux Kernel - ARM DS-5 Manual

Hide thumbs Also See for DS-5:
Table of Contents

Advertisement

11.4

Profiling the Linux kernel

11.4.1
Kernel stack unwinding
11.4.2
See also
ARM DUI 0482K
ID120712
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-linux-gnueabihf- 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-linux-gnueabihf- uImage
In the capture options dialog box, define the newly created
You can profile drivers using this method. Statically link the driver into the kernel image or add
the module as an image in the capture options dialog box.
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
of your choice and remove the comment tags that surround the
command.
Note
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.
Tasks
Capturing data on your target on page 11-2
Customize reports using Annotate on page 10-2
Creating custom performance counters on page
Reference
Capture options on page 4-3
The Streamline Data view on page
Copyright © 2010-2012 ARM. All rights reserved.
Non-Confidential
and rebuild
. To do this, open the makefile in the editor
gator.ko
11-4.
3-2.
Advanced Customizations
image in the Images section.
vmlinux
GATOR_KERNEL_STACK_UNWINDING
11-10

Advertisement

Table of Contents
loading

Table of Contents