使用狙击模拟器使用英特尔 TBB 程序

Working with Intel TBB program using sniper simulator

我已经从 Sniper 设置了狙击手模拟器,并且能够使用 make 和 /bin/ls 命令成功执行 fft 测试程序,使用以下->

./run-sniper -- /bin/ls

这些命令在 sniper 中成功执行。

我已经使用

编译了英特尔 TBB 的示例程序 sub_string_finder_extended.cpp

gcc -O2 -DNDEBUG -o sub_string_finder_extended.gcc sub_string_finder_extended.cpp -ltbb -lrt ./sub_string_finder_extended.gcc

成功执行,没有任何错误,但是当我 运行 它与狙击手一起使用

./run-sniper -- ./sub_string_finder_extended.gcc

显示以下输出后挂起

[SNIPER] Start [SNIPER] -------------------------------------------------------------------------------- [SNIPER] Sniper using Pin frontend [SNIPER] Running full application in DETAILED mode [SNIPER] -------------------------------------------------------------------------------- [SNIPER] Enabling performance models [SNIPER] Setting instrumentation mode to DETAILED
Done building string.

我用谷歌搜索了它,但找不到任何与英特尔 TBB 在狙击手上的工作相关的主题,但是在狙击手的维基页面上提到支持英特尔 TBB 程序。

编辑: 狙击手 v-6.1 OS- ubuntu 12.04 LTS

uname -r 输出-> 3.5.0-23-通用

Intel TBB(编译自)-> https://github.com/01org/tbb

据我所知,TBB 在 Sniper 中仍在正常工作。

我认为您可能遇到的问题是详细的模拟可能需要相当长的时间,因此看起来好像狙击手挂了。使用 Pin 的 mix-mt 工具快速检查显示该应用程序总共执行了 53B 条指令,这将需要一天多的时间进行详细模拟。检查 Sniper 中发生了什么的一种方法是添加 -sprogresstrace 选项以启用 ${SNIPER_ROOT}/scripts/progresstrace.py 脚本。

这些示例是 运行 Ubuntu 12.04.5 LTS(3.13.0-32-generic),使用 TBB,gitid 为 eb6336ab,Sniper 6.1 和 Pinplay- 2.2-pin-2.14-71313.

一个简单的例子

命令行选项解释

  1. 运行 2 核 (-n2)
  2. 快进30B指令后开始仿真
  3. 模拟30M指令后结束
  4. 在此示例中使用更快、仅缓存的 Nehalem-Lite 核心模型 (-cnehalem-lite)(通常不用于详细模拟)
  5. 报告进度(progresstrace.py 修改为每 10B 条指令显示进度,-sprogresstrace

输出

$ ${SNIPER_ROOT}/run-sniper -n2 -sstop-by-icount:30000000:30000000000 --roi-script -cnehalem-lite -sprogresstrace -- ${TBB_ROOT}/examples/GettingStarted/sub_string_finder/sub_string_finder_extended

 Done building string.
[STOPBYICOUNT] Starting after 30000000000 instructions
[STOPBYICOUNT] Then stopping after simulating 30000000 instructions in detail
 Done with serial version.
[STOPBYICOUNT] Starting ROI after 30000000005 instructions
[STOPBYICOUNT] Ending ROI after 30000002 instructions (30000000 requested)
[SNIPER] End
[SNIPER] Elapsed time: 316.56 seconds

$ head -n5 sim.out 
                                   | Core 0     | Core 1    
  Instructions                     |   14996162 |   15002407
  Cycles                           |   16365757 |   16365757
  IPC                              |       0.92 |       0.92
  Time (ns)                        |    6152540 |    6152540

详细输出

$ ${SNIPER_ROOT}/run-sniper -n2 --no-cache-warming -sstop-by-icount:30000000:30000000000 --roi-script -cnehalem-lite -sprogresstrace -- ${TBB_ROOT}/examples/GettingStarted/sub_string_finder/sub_string_finder_extended
[SNIPER] Start
[STOPBYICOUNT] Starting after 30000000000 instructions
[STOPBYICOUNT] Then stopping after simulating 30000000 instructions in detail
[SNIPER] --------------------------------------------------------------------------------
[SNIPER] Sniper using Pin frontend
[SNIPER] Running in script-driven instrumenation mode (--roi-script)
[SNIPER] Using FAST_FORWARD mode for warmup
[SNIPER] Using CACHE_ONLY mode for detailed
[SNIPER] --------------------------------------------------------------------------------
 Done building string.
[PROGRESS] 10000M instructions, 94977 KIPS, 1.00 IPC
[PROGRESS] 20000M instructions, 95086 KIPS, 1.00 IPC
 Done with serial version.
[STOPBYICOUNT] Starting ROI after 30000000005 instructions
[SNIPER] Enabling performance models
[SNIPER] Setting instrumentation mode to CACHE_ONLY
[PROGRESS] 30000M instructions, 99674 KIPS, 2.00 IPC
[STOPBYICOUNT] Ending ROI after 30000002 instructions (30000000 requested)
[SNIPER] Disabling performance models
[SNIPER] Leaving ROI after 0.58 seconds
[SNIPER] Simulated 30.0M instructions, 28843.6M cycles, 0.00 IPC
[SNIPER] Simulation speed 52057.4 KIPS (26028.7 KIPS / target core - 38.4ns/instr)
[SNIPER] Sampling: executed 0.00% of simulated time in detailed mode
[SNIPER] Setting instrumentation mode to FAST_FORWARD
[SNIPER] End
[SNIPER] Elapsed time: 316.56 seconds