Enabling Kernel Symbol Resolution - Enabling Kernel Symbol Resolution - 57368

uProf User Guide

Document ID
57368
Release Date
2025-06-09
Revision
5.1 English

To attribute the kernel samples to appropriate kernel functions, AMD uProf extracts required information from the /proc/kallsyms file. Exposing the kernel symbol addresses through /proc/ kallsyms requires setting of the appropriate value to the /proc/sys/kernel/kptr_restrict file as follows:

  • Set /proc/sys/kernel/perf_event_paranoid to -1.
  • Set /proc/sys/kernel/kptr_restrict to an appropriate value as follows:
    • 0: The kernel addresses are available without any limitations.
    • 1: The kernel addresses are available if the current user has a CAP_SYSLOG capability.
    • 2: The kernel addresses are hidden.
Set the perf_event_paranoid value using one of the following:
$ sudo echo -1 > /proc/sys/kernel/perf_event_paranoid
$ sudo sysctl -w kernel.perf_event_paranoid=-1
Set the kptr_restrict value using one of the following:
$ sudo echo 0 > /proc/sys/kernel/kptr_restrict
$ sudo sysctl -w kernel.kptr_restrict=0