Can't install and run perf

I tried to install perf on my jetson agx Orin devkit.
Kernel Version: 5.10.192-tegra

Can’t install tools :

  kernel-5.10 ls
arch   certs   drivers  include  io_uring  Kbuild   kernel                   kernel-overlays.txt  Makefile  Module.symvers  samples  security  tools  virt
block  crypto  fs       init     ipc       Kconfig  kernel-int-overlays.txt  lib                  mm        net             scripts  sound     usr
➜  kernel-5.10 pwd
/usr/src/linux-headers-5.10.192-tegra-ubuntu20.04_aarch64/kernel-5.10
➜  kernel-5.10 sudo make
[sudo] password for janice: 
  SYNC    include/config/auto.conf.cmd
drivers/video/Kconfig:27: can't open file "drivers/video/tegra/Kconfig"
make[2]: *** [scripts/kconfig/Makefile:71: syncconfig] Error 1
make[1]: *** [Makefile:645: syncconfig] Error 2
make: *** [Makefile:763: include/config/auto.conf.cmd] Error 2

trying to build all the tools:

sudo make tools/all
  SYNC    include/config/auto.conf.cmd
drivers/video/Kconfig:27: can't open file "drivers/video/tegra/Kconfig"
make[2]: *** [scripts/kconfig/Makefile:71: syncconfig] Error 1
make[1]: *** [Makefile:645: syncconfig] Error 2
make: *** [Makefile:763: include/config/auto.conf.cmd] Error 2

Then directly within the perf tool :

 sudo make install                                 
  BUILD:   Doing 'make -j12' 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:110: install] Error 2

I’ve been looking around for post with the same kind of problems. I found this one :

However I can’t find the right version of files for my AGX Orin Devkit for my specific tegra: 5.10.192-tegra

I also found this post with the same error : Jetpack5.0.2 kernel compile error - #8 by ADefiniteDescription
However the provided jetpack does not git my version and little explanation comes with the script.
Anyone has knowledge of how to fix this error ?

I would appreciate any help.
Thank a lot.
Best regards

Sorry for the late response.
Is this still an issue to support? Any result can be shared?

Yesterday I installed perf on my ubuntu 24.04 workstation and looked on Jetpack 6.1 and it has

sudo apt show linux-tools-common

and that’s probably available on ubuntu 20.04.

would you mind sharing the steps to install perf ? Here’s what I have :

sudo apt show linux-tools-common 
[sudo] password for janice: 
Package: linux-tools-common
Version: 5.4.0-200.220
Priority: optional
Section: kernel
Source: linux
Origin: Ubuntu
Maintainer: Ubuntu Kernel Team <kernel-team@lists.ubuntu.com>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 1,071 kB
Depends: lsb-release
Conflicts: linux-oem-5.6-tools-common
Replaces: linux-oem-5.6-tools-common
Download-Size: 230 kB
APT-Manual-Installed: yes
APT-Sources: http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 Packages
Description: Linux kernel version specific tools for version 5.4.0
 This package provides the architecture independent parts for kernel
 version locked tools (such as perf and x86_energy_perf_policy) for
 version 5.4.0.

N: There are 100 additional records. Please use the '-a' switch to see them.

perf
WARNING: perf not found for kernel 5.10.192

  You may need to install the following packages for this specific kernel:
    linux-tools-5.10.192-tegra
    linux-cloud-tools-5.10.192-tegra

  You may also want to install one of the following packages to keep up to date:
    linux-tools-tegra
    linux-cloud-tools-tegra

Yes I would love some help please.

sudo apt install linux-tools-common

and think that Ubuntu package also installs several other supporting packages.

It seems this package is already installed on my computer and I cannot run perf.

❯ sudo apt install linux-tools-common
[sudo] password for janice: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
linux-tools-common is already the newest version (5.4.0-204.224).
The following packages were automatically installed and are no longer required:
  busybox-initramfs cpio initramfs-tools initramfs-tools-bin initramfs-tools-core klibc-utils libklibc libpython2-dev libpython2.7-dev linux-base linux-headers-5.4.0-196
  linux-headers-5.4.0-196-generic linux-headers-5.4.0-198 linux-headers-5.4.0-198-generic linux-headers-5.4.0-200 linux-headers-5.4.0-200-generic linux-tools-5.4.0-196
  linux-tools-5.4.0-196-generic linux-tools-5.4.0-198 linux-tools-5.4.0-198-generic linux-tools-5.4.0-200 linux-tools-5.4.0-200-generic lz4 python2-dev python2.7-dev usb-modeswitch
  usb-modeswitch-data
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
❯ perf
WARNING: perf not found for kernel 5.10.192

  You may need to install the following packages for this specific kernel:
    linux-tools-5.10.192-tegra
    linux-cloud-tools-5.10.192-tegra

  You may also want to install one of the following packages to keep up to date:
    linux-tools-tegra
    linux-cloud-tools-tegra

You could try

sudo apt update
sudo apt --reinstall --install-suggests install linux-tools-common

Updated to Jetpack 6. Tried to run the following :

sudo apt --reinstall --install-suggests install linux-tools-common                                                                                                      15:11 [8/292]
Reading package lists... Done                                                                                                                                                          
Building dependency tree... Done                                                                                                                                                       
Reading state information... Done                                                                                                                                                      
The following packages were automatically installed and are no longer required:                                                                                                        
  gdal-data libarmadillo10 libarpack2 libavcodec58 libavfilter7 libavformat58 libavutil56 libblosc1 libcfitsio9 libcharls2 libdc1394-dev libexif-dev libfreexl1 libfyba0 libgdal30     
  libgdcm-dev libgdcm3.0 libgeos-c1v5 libgeos3.10.2 libgeotiff5 libgl2ps1.4 libglew2.2 libgphoto2-dev libhdf4-0-alt libheif1 libilmbase-dev libkmlbase1 libkmldom1 libkmlengine1       
  liblept5 libminizip1 libmysqlclient21 libnetcdf19 libodbc2 libodbcinst2 libogdi4.1 libopencv-calib3d4.5d libopencv-contrib4.5d libopencv-dnn4.5d libopencv-features2d4.5d            
  libopencv-flann4.5d libopencv-highgui4.5d libopencv-imgcodecs4.5d libopencv-imgproc4.5d libopencv-ml4.5d libopencv-objdetect4.5d libopencv-photo4.5d libopencv-shape4.5d             
  libopencv-stitching4.5d libopencv-superres4.5d libopencv-video4.5d libopencv-videoio4.5d libopencv-videostab4.5d libopencv-viz4.5d libopenexr-dev libpostproc55 libpq5 libproj22
  libraw1394-dev librttopo1 libsocket++1 libspatialite7 libssh-gcrypt-4 libsuperlu5 libswresample3 libswscale5 libtbb-dev libtesseract4 liburiparser1 libva-x11-2 libvdpau1 libvtk9.1
  libxerces-c3.2 mysql-common proj-data unixodbc-common
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 2 not upgraded.
Need to get 284 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://ports.ubuntu.com/ubuntu-ports jammy-updates/main arm64 linux-tools-common all 5.15.0-130.140 [284 kB]
Fetched 284 kB in 0s (732 kB/s)            
dpkg: warning: files list file for package 'libopencv-calib3d4.5d:arm64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libopencv-imgproc4.5d:arm64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libopencv-imgcodecs4.5d:arm64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libopencv-flann4.5d:arm64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libopencv-photo4.5d:arm64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libopencv-videostab4.5d:arm64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libopencv-videoio4.5d:arm64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libopencv-samples' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libopencv-features2d4.5d:arm64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libopencv-ml4.5d:arm64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libopencv-contrib4.5d:arm64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libopencv' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libopencv-video4.5d:arm64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libopencv-objdetect4.5d:arm64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libopencv-superres4.5d:arm64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libopencv-stitching4.5d:arm64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libopencv-dev' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libopencv-shape4.5d:arm64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libopencv-highgui4.5d:arm64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libopencv-dnn4.5d:arm64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libopencv-python' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libopencv-viz4.5d:arm64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libopencv-core4.5d:arm64' missing; assuming package has no files currently installed
(Reading database ... 213849 files and directories currently installed.)
Preparing to unpack .../linux-tools-common_5.15.0-130.140_all.deb ...
Unpacking linux-tools-common (5.15.0-130.140) over (5.15.0-130.140) ...
Setting up linux-tools-common (5.15.0-130.140) ...
Processing triggers for man-db (2.10.2-1) ...
❯ perf
WARNING: perf not found for kernel 5.15.148

Sadly that doesn’t work.

I just tried to install it on my Orin Nano and needed to also:

sudo apt install linux-tools-generic linux-tools-nvidia-tegra

Then as a proof of concept ran the following and perf seems functional.

sudo /usr/lib/linux-nvidia-tegra-tools-5.15.0-1030/perf top

There is no apt package for linux-nvidia-tegra-tools-5.15.148-tegra and therein lies the root cause of perf failing to work.

That is why we need the full path to
/usr/lib/linux-nvidia-tegra-tools-5.15.0-1030/perf

I just looked more closely to your install log above and I don’t think you need to install the packages I listed above.

You should be able to run perf from this location

sudo /usr/lib/linux-tools-5.15.0-130/perf top