perf性能分析(1) -- Intel VTune 配置与使用(1)

1. Intel VTune 配置

1.1 使能 ptrace

使能进程跟踪 (ptrace) 功能 (attach ID),以便 VTune 可以监控到进程的运行情况。

sudo vim /etc/sysctl.d/10-ptrace.conf
# set kernel.yama.ptrace_scope = 0

# 使配置生效
sudo sysctl --system -a -p | grep yama # 应用配置,或者也可以选择重启电脑

1.2 安装 Sampling Drivers

cd ~/intel/oneapi/vtune/latest/sepdk/src
./build-driver

# 添加 vtune 组并将你的用户添加到该组
# 创建一个新的 shell,或者重新启动系统
sudo groupadd vtune
sudo usermod -a -G vtune `whoami`

# 安装 sep 驱动程序
sudo ./insmod-sep -r -g vtune

1.3 检查软硬件配置: 查看VTune Profiler 可以做哪些profiling

~/intel/oneapi/vtune/latest/bin64
python3 self_check.py

最终会出来一个结果, 显示 VTune Profiler 可以做哪些 profiling, 哪些 profiling 不能做。

2. 参考及资料

3. TBB 调度实现




    Enjoy Reading This Article?

    Here are some more articles you might like to read next:

  • al-folio 本地部署记录(Ubuntu 24.04)
  • C++ Traits
  • 道格拉斯-普克算法(Douglas–Peucker algorithm)
  • CMake支持库收集
  • QGC代码架构解析:飞行前检查(起飞条件)