Downloading and Installing Kernel Debug Symbol Packages - Downloading and Installing Kernel Debug Symbol Packages - 57368

uProf User Guide

Document_ID
57368
Release_Date
2025-06-09
Revision
5.1 English

On a Linux system, the /boot directory either contains the compressed vmlinux or uncompressed vmlinux image. These kernel files are stripped, have no symbol and debug information. If there is no debug information, AMD uProf will not be able to attribute samples to kernel functions and hence, by default, AMD uProf cannot report kernel functions.

Some Linux distros provide debug symbol files for their kernel which can be used for profiling purposes.

Ubuntu

To download kernel debug info and source code on Ubuntu systems (verified on Ubuntu 18.04.03 LTS):

  1. To trust the debug symbol signing key, execute the following commands:
    // Ubuntu 18.04 LTS and later:
    $ sudo apt install ubuntu-dbgsym-keyring
    // For earlier releases of Ubuntu:
    $ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F2EDC64DC5AEE1F6B9C621F0C8CAB6595FDFF622
  2. Add the debug symbol repository as follows:
    $ echo "deb http://ddebs.ubuntu.com $(lsb_release -cs) main restricted universe multiverse deb http://ddebs.ubuntu.com $(lsb_release -cs)-security main restricted universe multiverse deb http://ddebs.ubuntu.com $(lsb_release -cs)-updates main restricted universe multiverse deb http://ddebs.ubuntu.com $(lsb_release -cs)-proposed main restricted universe multiverse" |
    \
    sudo tee -a /etc/apt/sources.list.d/ddebs.list
  3. Retrieve the list of available debug symbol packages:
    $ sudo apt update
  4. Install the debug symbols for the current kernel version:
    $ sudo apt install --yes linux-image-$(uname -r)-dbgsym
  5. Download the kernel source using one of the following methods:
    $ sudo apt source linux-image-unsigned-$(uname -r)
    $ sudo apt source linux-image-$(uname -r)
After the kernel debug info file is downloaded, it can be found at the default path:
$ /usr/lib/debug/boot/vmlinux-`uname -r`

RHEL

Follow the steps in the Red Hat knowledgebase https://access.redhat.com/solutions/9907 to download the RHEL kernel debug info.

After the kernel debug info file is downloaded, it can be found at the default path: $ /usr/lib/debug/lib/modules/`uname -r`/vmlinux