Contents

LinuxSys:Nvidia Jetson系列产品使用Perf

本文采用知识共享署名 4.0 国际许可协议进行许可,转载时请注明原文链接,图片在使用时请保留全部内容,可适当缩放并在引用处附上图片所在的文章链接。

[TOC]

Perf 安装

  • 常规安装
1
sudo apt install linux-tools-common  linux-tools-"$(uname -r)"  linux-cloud-tools-"$(uname -r)"
  • Nvidia jetson

Nvidia的Jetson来说,linux的kernel是由Nvidia自行维护的,需要编译安装。

  1. 查看版本
1
jetson_release -v

./Nvidia%20Jetson%E7%B3%BB%E5%88%97%E4%BA%A7%E5%93%81%E4%BD%BF%E7%94%A8Perf.assets/image-20250827135742108.png

  1. 下载L4T包(Linux For Tegra,NVIDIA® Jetson™ Linux Driver Package)

    https://developer.nvidia.com/embedded/jetpack-archive

    ./Nvidia%20Jetson%E7%B3%BB%E5%88%97%E4%BA%A7%E5%93%81%E4%BD%BF%E7%94%A8Perf.assets/image-20250827140121697.png

./Nvidia%20Jetson%E7%B3%BB%E5%88%97%E4%BA%A7%E5%93%81%E4%BD%BF%E7%94%A8Perf.assets/image-20250827140145309.png

  1. 编译

    1
    2
    3
    4
    5
    6
    7
    8
    
    tar -xjvf public_sources.tbz2
    cd Linux_for_Tegra/source/public
    tar -xjvf kernel_src.tbz2
    
    cd kernel/kernel-jammy-src/tools/perf
    make
    
    perf -v
    

Perf 使用

  • 修改 launch 文件 :gemini_330_series.launch.py
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
        GroupAction([
            PushRosNamespace(LaunchConfiguration("camera_name")),
            ComposableNodeContainer(
                name="camera_container",
                namespace="",
                package="rclcpp_components",
                executable="component_container",
                composable_node_descriptions=[
                    ComposableNode(
                        package="orbbec_camera",
                        plugin="orbbec_camera::OBCameraNodeDriver",
                        name=LaunchConfiguration("camera_name"),
                        parameters=params,
                    ),
                ],
                output="screen",
                prefix=[  # ✅ 直接写列表
                    '/home/nvidia/code/orbbec_ws/perf', ' record', ' -g', ' -F', ' 99',
                    ' -o', ' /home/nvidia/code/orbbec_ws/perf.data', ' --'
                ],
            )
        ])
    ]