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

**URL:** <https://forums.developer.nvidia.com/t/how-to-compile-perf-tool-on-jp5-0-1-for-jetson-xavier-nx-dev-kit/219685>\
**Category:** Jetson Xavier NX\
**Tags:** kernel\
**Created:** [July 4, 2022, 12:51pm UTC](https://forums.developer.nvidia.com/t/how-to-compile-perf-tool-on-jp5-0-1-for-jetson-xavier-nx-dev-kit/219685 "2022-07-04T12:51:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dave.vandermeer.001](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@dave.vandermeer.001](https://forums.developer.nvidia.com/u/dave.vandermeer.001)\
**Post date:** [July 4, 2022, 12:51pm UTC](https://forums.developer.nvidia.com/t/how-to-compile-perf-tool-on-jp5-0-1-for-jetson-xavier-nx-dev-kit/219685/1 "2022-07-04T12:51:34Z")

</div>

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:

```auto
$ perf
WARNING: perf not found for kernel 5.10.65

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

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

```

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

```auto
$ 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](https://forums.developer.nvidia.com/t/perf/166901). 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:

```auto
$ 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:

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

```

---

<div class="post-metadata">

**Author:** ![dave.vandermeer.001](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@dave.vandermeer.001](https://forums.developer.nvidia.com/u/dave.vandermeer.001)\
**Post date:** [July 4, 2022, 1:03pm UTC](https://forums.developer.nvidia.com/t/how-to-compile-perf-tool-on-jp5-0-1-for-jetson-xavier-nx-dev-kit/219685/2 "2022-07-04T13:03:56Z")

</div>

FYI:

I also took a look at [this link](https://forums.developer.nvidia.com/t/installing-linux-performance-monitoring-tools-on-jetson-tx2/61365/7) describing the problem for an older kernel an a Jetson TX2 without success for me.

---

<div class="post-metadata">

**Author:** ![TomNVIDIA](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/tomnvidia/32/14181_2.png) [@TomNVIDIA](https://forums.developer.nvidia.com/u/TomNVIDIA)\
**Post date:** [July 7, 2022, 6:33pm UTC](https://forums.developer.nvidia.com/t/how-to-compile-perf-tool-on-jp5-0-1-for-jetson-xavier-nx-dev-kit/219685/3 "2022-07-07T18:33:12Z")

</div>

Moving this to the Jetson Xavier NX category for visibility.

> **[Jetson & Embedded Systems](https://forums.developer.nvidia.com/c/agx-autonomous-machines/jetson-embedded-systems/70)**
>
> Discussions relating to the Jetson DevKits and other Embedded computing devices

---

<div class="post-metadata">

**Author:** ![carolyuu](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/carolyuu/32/14043_2.png) [@carolyuu](https://forums.developer.nvidia.com/u/carolyuu)\
**Post date:** [July 8, 2022, 1:02am UTC](https://forums.developer.nvidia.com/t/how-to-compile-perf-tool-on-jp5-0-1-for-jetson-xavier-nx-dev-kit/219685/5 "2022-07-08T01:02:06Z")

</div>

Hi [dave.vandermeer.001](https://forums.developer.nvidia.com/u/dave.vandermeer.001),

Please download JP-5.0.1 Driver Package Sources from: [https://developer.nvidia.com/embedded/l4t/r34\_release\_v1.1/sources/public\_sources.tbz2](https://developer.nvidia.com/embedded/l4t/r34_release_v1.1/sources/public_sources.tbz2)

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

```

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/system/32/68080_2.png) [@system](https://forums.developer.nvidia.com/u/system)\
**Post date:** [July 27, 2022, 3:59am UTC](https://forums.developer.nvidia.com/t/how-to-compile-perf-tool-on-jp5-0-1-for-jetson-xavier-nx-dev-kit/219685/7 "2022-07-27T03:59:55Z")

</div>

Closed on July 27, 2022, 3:59am UTC

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