# How to enable perf tools

**URL:** <https://forums.developer.nvidia.com/t/how-to-enable-perf-tools/179814>\
**Category:** DRIVE AGX Xavier General\
**Tags:** driveos-networking\
**Created:** [June 4, 2021, 7:43am UTC](https://forums.developer.nvidia.com/t/how-to-enable-perf-tools/179814 "2021-06-04T07:43:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter\_Pertrili](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Peter\_Pertrili](https://forums.developer.nvidia.com/u/Peter_Pertrili)\
**Post date:** [June 4, 2021, 7:43am UTC](https://forums.developer.nvidia.com/t/how-to-enable-perf-tools/179814/1 "2021-06-04T07:43:18Z")

</div>

Please provide the following info (check/uncheck the boxes after clicking “+ Create Topic”):  
**Software Version**  
[\*] DRIVE OS Linux 5.2.0  
 DRIVE OS Linux 5.2.0 and DriveWorks 3.5  
 NVIDIA DRIVE™ Software 10.0 (Linux)  
 NVIDIA DRIVE™ Software 9.0 (Linux)  
 other DRIVE OS version  
 other

**Target Operating System**  
[\*] Linux  
 QNX  
 other

**Hardware Platform**  
[\*] NVIDIA DRIVE™ AGX Xavier DevKit (E3550)  
 NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)  
 other

**SDK Manager Version**  
 1.5.0.7774  
 other

**Host Machine Version**  
[\*] native Ubuntu 18.04  
 other

I want to use perf tool on AGX. But found following issue.

```auto
$ perf top
WARNING: perf not found for kernel 4.14.150-rt67

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

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

$ sudo apt-get install linux-tools-tegra
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package linux-tools-tegra

```

```auto
$ gunzip -c /proc/config.gz | grep PERF
CONFIG_CGROUP_PERF=y
CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y
CONFIG_HAVE_PERF_EVENTS=y
CONFIG_PERF_EVENTS=y
# CONFIG_DEBUG_PERF_USE_VMALLOC is not set
CONFIG_HAVE_PERF_REGS=y
CONFIG_HAVE_PERF_USER_STACK_DUMP=y
# CONFIG_PCIEASPM_PERFORMANCE is not set
CONFIG_HW_PERF_EVENTS=y
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
# CONFIG_CLS_U32_PERF is not set
# CONFIG_BCMDHD_CUSTOM_NET_PERF_TEGRA is not set
CONFIG_DEVFREQ_GOV_PERFORMANCE=y
CONFIG_NTB_PERF=m
CONFIG_HARDLOCKUP_DETECTOR_PERF=y
# CONFIG_RCU_PERF_TEST is not set
CONFIG_SECURITY_PERF_EVENTS_RESTRICT=y

/usr/src$ ls
tensorrt

```

Ref this topic, I need to download kernel headers file firstly. Where I can get 4.14.150-rt67 header file?

> [@Installing Linux performance monitoring tools on Jetson TX2](https://forums.developer.nvidia.com/t/installing-linux-performance-monitoring-tools-on-jetson-tx2/61365/3):
>
> I’ve run into this as well with JetPack 3.2 on a TX2. nvidia@tegra-ubuntu:~$ perf WARNING: perf not found for kernel 4.4.38 You may need to install the following packages for this specific kernel: linux-tools-4.4.38-tegra linux-cloud-tools-4.4.38-tegra You may also want to install one of the following packages to keep up to date: linux-tools-tegra linux-cloud-tools-tegra nvidia@tegra-ubuntu:~$ sudo apt install linux-tools-4.4.38-tegra Reading package lists... Done Building…

I have another try below, but still doesn’t work for me.

1. scp `~/nvidia/nvidia_sdk/DRIVE_OS_5.2.0_SDK_Linux_OS_DDPX/DRIVEOS/drive-oss-src/kernel` from PC to AGX target side.
2. Do install perf again with make command. Still doesn’t work for me.

```auto
~/kernel/tools/perf$ sudo make
  BUILD: Doing 'make -j7' parallel build
Warning: Kernel ABI header at 'tools/include/uapi/drm/i915_drm.h' differs from latest version at 'include/uapi/drm/i915_drm.h'
Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h'
Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h'
Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/kvm.h' differs from latest version at 'arch/x86/include/uapi/asm/kvm.h'

Auto-detecting system features:
... dwarf: [OFF]
... dwarf_getlocations: [OFF]
... glibc: [on]
... gtk2: [OFF]
... libaudit: [OFF]
... libbfd: [OFF]
... libelf: [OFF]
... libnuma: [OFF]
... numa_num_possible_cpus: [OFF]
... libperl: [on]
... libpython: [OFF]
... libslang: [OFF]
... libcrypto: [OFF]
... libunwind: [OFF]
... libdw-dwarf-unwind: [OFF]
... zlib: [on]
... lzma: [on]
... get_cpuid: [OFF]
... bpf: [on]

Makefile.config:291: No libelf found. Disables 'probe' tool, jvmti and BPF support in 'perf record'. Please install libelf-dev, libelf-devel or elfutils-libelf-devel
Makefile.config:399: No sys/sdt.h found, no SDT events are defined, please install systemtap-sdt-devel or systemtap-sdt-dev
Makefile.config:472: Disabling post unwind, no support found.
Makefile.config:522: No libaudit.h found, disables 'trace' tool, please install audit-libs-devel or libaudit-dev
Makefile.config:533: No libcrypto.h found, disables jitted code injection, please install libssl-devel or libssl-dev
Makefile.config:548: slang not found, disables TUI support. Please install slang-devel, libslang-dev or libslang2-dev
Makefile.config:562: GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev
Makefile.config:619: No 'python-config' tool was found: disables Python support - please install python-devel/python-dev
Makefile.config:725: No numa.h found, disables 'perf bench numa mem' benchmark, please install numactl-devel/libnuma-devel/libnuma-dev
  GEN perf-archive
  GEN perf-with-kcore
  CC util/header.o
  LD util/libperf-in.o
  LD libperf-in.o
  AR libperf.a
  LINK perf
``
```

---

<div class="post-metadata">

**Author:** ![SivaRamaKrishnaNV](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/sivaramakrishnanv/32/14043_2.png) [@SivaRamaKrishnaNV](https://forums.developer.nvidia.com/u/SivaRamaKrishnaNV)\
**Post date:** [June 4, 2021, 9:15am UTC](https://forums.developer.nvidia.com/t/how-to-enable-perf-tools/179814/3 "2021-06-04T09:15:18Z")

</div>

Dear @Peter\_Pertril,  
May I know what you want to measure in an application? Is nsight is not sufficient for your usecase?

---

<div class="post-metadata">

**Author:** ![Peter\_Pertrili](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Peter\_Pertrili](https://forums.developer.nvidia.com/u/Peter_Pertrili)\
**Post date:** [June 4, 2021, 10:00am UTC](https://forums.developer.nvidia.com/t/how-to-enable-perf-tools/179814/4 "2021-06-04T10:00:40Z")

</div>

I want to use perf top/list or related method to monitor my application hotpoint or bottleneck. Then we do more optimized as needed.  
In other words, we want to do more application performance analyses with the help of perf tools.

---

<div class="post-metadata">

**Author:** ![SivaRamaKrishnaNV](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/sivaramakrishnanv/32/14043_2.png) [@SivaRamaKrishnaNV](https://forums.developer.nvidia.com/u/SivaRamaKrishnaNV)\
**Post date:** [June 14, 2021, 1:47pm UTC](https://forums.developer.nvidia.com/t/how-to-enable-perf-tools/179814/5 "2021-06-14T13:47:19Z")

</div>

Dear @Peter_Pertrili,  
It seems the apt packages are not available for target. Could you check building from source on target? have you checked it?

---

<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:** [October 12, 2021, 8:03pm UTC](https://forums.developer.nvidia.com/t/how-to-enable-perf-tools/179814/7 "2021-10-12T20:03:24Z")

</div>

Closed on October 12, 2021, 8:03pm UTC


