NVIDIA Jetson AGX Thor - Perf profiling tool

From RidgeRun Developer Wiki

Follow Us On Twitter LinkedIn Email Share this page



Previous: RidgeRun Open Source Projects Index Next: RidgeRun Open Source Projects/GStreamer Daemon









Overview

Linux Perf is one of the most powerful and precise tools for profiling applications, as it has direct access to kernel ABI and APIs. This allows it to intercept system calls and gather data from hardware performance counters. With Perf, it is possible to analyze:

Branching: how control flow impacts application performance.

Cache miss rates: how efficiently the application accesses memory.

Alignment faults: performance penalties related to cache line thrashing.

Context switches: how much latency is introduced when the application yields CPU time.

CPU clocks and migration: how much time the application spends actively using the CPU versus waiting, and how often it migrates between cores.

Call graph construction: building a map of how functions call each other during execution.

In this context, Perf is used for application optimization, focusing on improving only the most critical sections of code. This is especially important for unfamiliar applications that require targeted acceleration.


Examples

The perf element can be inserted at any point in a GStreamer pipeline to monitor performance metrics. Ideally, it should be placed just before sink elements to assess the overall pipeline performance, or after elements with a src pad to evaluate the performance of that specific element.

The following example demonstrates how to use perf with the print-cpu-load flag to monitor CPU usage for the nvv4l2h264enc encoder:

gst-launch-1.0 -e videotestsrc ! nvvidconv ! nvv4l2h264enc ! perf print-cpu-load=true ! h264parse !  qtmux ! filesink location=test.mp4

The following example demonstrates how to use perf to monitor the nv3dsink:

gst-launch-1.0 -e videotestsrc ! nvvidconv ! perf ! nv3dsink

Getting Started

To know more about the extension, please refer to the Perf wiki page or you can check Github Readme.

Contact Us



For direct inquiries, please refer to the contact information available on our Contact page. Alternatively, you may complete and submit the form provided at the same link. We will respond to your request at our earliest opportunity.


Links to RidgeRun Resources and RidgeRun Artificial Intelligence Solutions can be found in the footer below.




Previous: RidgeRun Open Source Projects Index Next: RidgeRun Open Source Projects/GStreamer Daemon