Intel VTune Amplifier XE 使用

VTune

《VTune 开发者手册》

1. 安装

1.1 软件安装

# 1.解压
tar -zxvf filename.tar.gz
# 2.安装
cd dirname/
./install.sh

1.2 配置环境

csh/tcsh用户:source <install_dir>/amplxe-vars.csh
bash 用户: source <install_dir>/amplxe-vars.sh

默认情况下<install_dir>是:
root用户:/opt/intel/vtune_amplifier_xe_2018
非root用户: $HOME/intel/vtune_amplifier_xe_2018

2. 使用

2.1 图形界面

amplxe-gui

图形界面具体使用参考:《VTune 开发者手册》

2.2 命令行

2.2.1 使用方法:

amplxe-cl <-action> [-action-option] [-global-option] [[--] target [target options]]

常用action包括(具体使用方法请点击后阅读手册):

2.2.2 应用实例

  • 查看帮助
amplxe-cl -help [action-option]
  • 列出分析类型
# 1. 列出所支持的分析类型
amplxe-cl –collect-list
# 2. 列出可支持的报告类型
amplxe-cl –report-list
  • 热点收集
amplxe-cl -collect hotspots -result-dir r0001hs -- ./gsexample2a datafile.txt
amplxe-cl -collect concurrency -r r0002cc -search-dir all:rp=/home/ompPrimes -- ./ompPrime1.icc
amplxe-cl -collect locksandwaits -user-data-dir /tmp -r r0003lw -- ./ompPrime1.icc
amplxe-cl -collect lightweight-hotspots -r r0004lh -- ./primes.gcc
amplxe-cl -collect nehalem_memory-access -duration 10
amplxe-cl -collect lightweight-hotspots -target-process gnome-power-manager -duration 10
amplxe-cl -collect concurrency -duration n -target-process program
amplxe-cl -collect concurrency -duration n -target-pid pid
# 1. 查看事件类型
amplxe-cl -collect-with runsa -knob event-config=?
# 2. 收集指定事件
amplxe-cl -collect-with runsa -knob event-config=MEM_LOAD_RETIRED.LLC_MISS,MEM_LOAD_RETIRED.LLC_UNSHARED_HIT -target-pid=$pid
  • 输入、分析VTune性能分析结果
# 1. 导入结果
amplxe-cl -import tbsf141.tb5 -r r001
# 2. 分析结果
amplxe-cl -report pmu-events -r r001 -group-by function
  • 热点分析
# 1. 仅列出模块gsexample2a相关的热点函数
amplxe-cl -report hotspots -result-dir r001hs -group-by function -filter module=gsexample2a
# 2. 列出所有的热点函数,包含链接库的
amplxe-cl -report hotspots -result-dir r001hs -call-stack-mode=all -group-by function
# 3. 列出占处理器时间80%的函数(模块)信息
amplxe-cl -report perf-detail -r r000hs -cumulative-threshold-percent 80
# 4. 结果中加入分隔符
amplxe-cl -report perf -csv-delimiter="," -r r000hs

3. 参考:

猜你喜欢

转载自www.cnblogs.com/apollospotatolikett/p/9100634.html