intel-vtune分析工具使用

intel-vtune分析工具排查性能问题

Dear customer, 你可以使用intel 性能分析工具来分析性能问题。https://www.intel.com/content/www/us/en/developer/tools/oneapi/vtune-profiler.html。
这边你怀疑核间开销的话,可以先采集L1/L2 的cache miss, 看看是否miss 率增加。具体事件可以看https://perfmon-events.intel.com/。vtune 和perf都支持这些事件,用perf也可以采集。
可能需要先明确问题根因才能看看有没有对应的解法。

官网

  • [Intel VTune Profiler

下载:

教程

vtune使用

1
2
3
4
5
# https://www.intel.com/content/dam/develop/external/us/en/documents/vtune-profiler-cheat-sheet.pdf
source /opt/intel/oneapi/vtune/latest/env/vars.sh
vtune -collect hotspots -target-pid `pidof dp` -result-dir hotspots
vtune -report hotspots -r hotspots/
vtune -report summary -r hotspots/

perf

perf stat -e cycles,instructions,cache-references,cache-misses,branch-instructions,branch-misses,L1-dcache-loads,L1-dcache-load-misses,LLC-loads,LLC-load-misses,dTLB-loads,dTLB-load-misses,cpu-clock,task-clock,context-switches,cpu-migrations,page-faults -p pidof xxxxxxx – sleep 30