Enable Linux* Kernel Analysis
Enable Kernel Modules Resolution
- If thekptr_restrictvalue is 0, kernel addresses are provided without limitations (recommended).
- If thekptr_restictvalue is 1, addresses are provided if the current user has aCAP_SYSLOGcapability.
- If thekptr_restrictvalue is 2, the kernel addresses are hidden regardless of privileges the current user has.
sysctl -w kernel.kptr_restrict=0
Download and Install Available Debug Kernel Versions
- Use theuname -rcommand to identify the running Linux kernel version.
- Download and install two RPMs matching your system:kernel-debug-debuginfo-*.rpmandkernel-debuginfo-common-*.rpm. To do this, use any of the following options:
- Browse through the RPMs on your installation CDs or DVDs. For example, for SuSE Linux Enterprise* 9, 10, and 11 distros, SuSE provides "debug" kernel RPMs (kernel-debug-*.rpm) available on the install CD or from the website. After installing the RPM, the debug version of the kernel file is located under/boot/vmlinux-*-debugor under/boot/vmlinuz-*-debug. You need to manually uncompress this kernel file using thegunzipprogram.
- Browse through the OS vendor FTP site and download the packages. For example: look at ftp://ftp.redhat.com/pub/redhat/linux/enterprise/5Server/en/os to get packages for Redhat* Enterprise Server.
- Look for other sources on the internet. For example, for Red Hat Enterprise* Linux 3, 4 and 5 distros, Red Hat providesdebuginfoRPMs at http://people.redhat.com/duffy/debuginfo/. After installing the RPM, the debug version of the kernel file is located under/usr/lib/debug/boot(EL 3) or/usr/lib/debug/lib/modules(EL 4, 5).
- Use the following commands to install the RPMs:rpm -ivh kernel-debuginfo-common-*.rpm rpm -ivh kernel-debug-debuginfo-*.rpmFor some operating systems, you can useyumto install packages directly, for example:yum --enablerepo=rhel-debuginfo install kernel-debuginfo
- Verify that the packages have been installed, for example:rpm -qa|grep kernel
- Modify theVTunetarget properties and specify the path to the uncompressed kernel binary in the Dialog Box: Binary/Symbol Search , for example:Profiler/usr/lib/debug/lib/modules/2.6.18-128.el5debug/.
Build the Linux Kernel with Debug Information
- Edit the kernel source top-level Makefile and add the-goption to the following variables:CFLAGS_KERNEL := -gCFLAGS := -g
- Runmake clean; maketo create thevmlinuxkernel file with debug information. Once a debug version of the kernel is created or obtained, specify that kernel file as the one to use during performance analysis.