How to compile perf tool on JP5.0.1 for Jetson Xavier NX Dev Kit?

Hi there,

I want to use the perf tool for some tests on my Jetson Xavier NX DevKit with JP5.0.1 installed (Ubuntu 20.04).

Problem and steps tried

I tried to install it through apt with sudo apt install linux-tools-common. When I then run the command with perf, I get the following message:

$ perf
WARNING: perf not found for kernel 5.10.65

  You may need to install the following packages for this specific kernel:

  You may also want to install one of the following packages to keep up to date:

When I try to install the recommended packages, I only get the message that the package could not be found:

$ sudo apt install linux-tools-5.10.65-tegra
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package linux-tools-5.10.65-tegra
E: Couldn't find any package by glob 'linux-tools-5.10.65-tegra'

So I tried to compile it from the kernel source after I found the following link. When I go the directory /usr/src/linux-headers-5.10.65-tegra-ubuntu20.04_aarch64/kernel-5.10/tools/perf and run sudo make I receive the following message and I am not sure how to proceed now:

$ sudo make
  BUILD:   Doing 'make -j6' parallel build
Makefile.perf:8: ../scripts/utilities.mak: No such file or directory
make[1]: *** No rule to make target '../scripts/utilities.mak'.  Stop.
make: *** [Makefile:70: all] Error 2

My Question

What is the best way to get perf working on my setup?

Additional info:

$ uname -a
Linux xavier03 5.10.65-tegra #1 SMP PREEMPT Mon May 16 20:58:07 PDT 2022 aarch64 aarch64 aarch64 GNU/Linux


I also took a look at this link describing the problem for an older kernel an a Jetson TX2 without success for me.

Moving this to the Jetson Xavier NX category for visibility.

Hi dave.vandermeer.001,

Please download JP-5.0.1 Driver Package Sources from:

Copy “kernel_src.tbz2” to Xavier-NX
$ cd kernel/kernel-4.9/tools/perf
$ make
$ ./perf --version
perf version 5.10.65

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.