gem5中使用spec2006并创建simpoints
2015-06-10 16:51
2783 查看
参考: gem5_simpoint
说明:在gem5的发行版本中,fs.py中并不包含simpoint的创建和使用,所以官方文档http://gem5.org/Simpoints中的Profiling and Generating BBV存在错误,需要修改fs.py后才能使用,而se.py中已经包含simpoint的相关信息,故使用se.py来创建simpoint。
阅读本文需参考gem5中运行spec2006, SimPoint: 抽样创建模拟点减少spec2006运行时间
查看Simulation Points for SPEC CPU 2006, 主要讲解了simpoints数量的统计情况;Generation, Validation and Analysis of SPEC
CPU2006 Simulation Points Based on Branch,
Memory and TLB Characteristics simpoints数量机器运行花费的时间介绍;SimPoint 3.0: Faster and More Flexible
Program Phase Analysis simpoint及其参数介绍;
1. 分析与生成基本块向量(Basic block vector):
查看m5out目录下可看到simpoint.bb.gz文件,simpoint分析必须使用AtomicSimpleCPU 和 fastmem。
通过运行所有厕所集后,spec2006可运行的情况统计见 gem5: 可运行的spec2006 benchmark总结,生成的simpoint.bb.gz文件见simpoint.bb.gz。
2. SimPoint Analysis:
得到BBV文件后即可分析该测试程序的模拟点,运行脚本如下:
生成的simpoints文件见spec06simpoints。
现在将对spec06simpoints中所有权重最大的simpoint进行统计,以后即可从该点运行,统计结果见spec2006中精确的simulation points执行点。
3. Taking SimPoint Checkpoints in gem5:
使用上面的命令生成checkpoint, –take-checkpoint=5000000参数为从精确执行点开始执行,即point * 100Million。
4.Resuming from gem5 SimPoint Checkpoints
以后运行改测试集,即可直接从checkpoint开始,然后运行指定的指令数目即可。
说明:在gem5的发行版本中,fs.py中并不包含simpoint的创建和使用,所以官方文档http://gem5.org/Simpoints中的Profiling and Generating BBV存在错误,需要修改fs.py后才能使用,而se.py中已经包含simpoint的相关信息,故使用se.py来创建simpoint。
阅读本文需参考gem5中运行spec2006, SimPoint: 抽样创建模拟点减少spec2006运行时间
查看Simulation Points for SPEC CPU 2006, 主要讲解了simpoints数量的统计情况;Generation, Validation and Analysis of SPEC
CPU2006 Simulation Points Based on Branch,
Memory and TLB Characteristics simpoints数量机器运行花费的时间介绍;SimPoint 3.0: Faster and More Flexible
Program Phase Analysis simpoint及其参数介绍;
1. 分析与生成基本块向量(Basic block vector):
//示例代码 gem5/build/ALPHA/gem5.opt gem5/configs/example/spec06_se.py --benchmark=bzip2 --benchmark_stdout=gem5/m5out/bzip2.out --benchmark_stderr=gem5/m5out/bzip2.err -I 900000000000 --simpoint-profile --simpoint-interval=10000 --fastmem
查看m5out目录下可看到simpoint.bb.gz文件,simpoint分析必须使用AtomicSimpleCPU 和 fastmem。
// 以下为本人使用的生成simpoint.bb.gz方法,100Million为周期 $GEM5_DIR/build/ALPHA/gem5.fast --outdir=$OUTPUT_DIR $GEM5_DIR/configs/example/spec06_se.py --benchmark=$BENCHMARK --benchmark_st dout=$OUTPUT_DIR/$BENCHMARK.out --benchmark_stderr=$OUTPUT_DIR/$BENCHMARK.err --simpoint-profile --simpoint-interval=100000000 -- fastmem | tee -a $SCRIPT_OUT
通过运行所有厕所集后,spec2006可运行的情况统计见 gem5: 可运行的spec2006 benchmark总结,生成的simpoint.bb.gz文件见simpoint.bb.gz。
2. SimPoint Analysis:
得到BBV文件后即可分析该测试程序的模拟点,运行脚本如下:
./simpoint -loadFVFile simpoint.bb.gz -maxK 30 -saveSimpoints <simpoint_file> -saveSimpointWeights <weight_file> -inputVectorsGzipped
生成的simpoints文件见spec06simpoints。
现在将对spec06simpoints中所有权重最大的simpoint进行统计,以后即可从该点运行,统计结果见spec2006中精确的simulation points执行点。
3. Taking SimPoint Checkpoints in gem5:
m5.fast configs/example/se.py --bench=bzip2 --take-checkpoint=5000000 --at-instruction
使用上面的命令生成checkpoint, –take-checkpoint=5000000参数为从精确执行点开始执行,即point * 100Million。
4.Resuming from gem5 SimPoint Checkpoints
m5.fast configs/example/se.py --bench=bzip2 --caches --l2cache --checkpoint-restore=5000000 --at-instruction --max-inst=100000
以后运行改测试集,即可直接从checkpoint开始,然后运行指定的指令数目即可。
相关文章推荐
- 有个扫描二维码的扩展,还不错
- POJ 1939
- POJ 1936
- POJ 1940
- JAVA中获得一个月最大天数的方法(备忘)
- 哈希表(Hash table)(1)
- 使用log4j让日志写入数据库
- 我不是来黑小兔子的。【来点humor】
- 在Linux上安装ArcGIS许可管理器备忘录
- Multipart/form-data POST文件上传分析
- web service(SOAP)与HTTP接口的区别
- POJ 3206 最小生成树
- Linux 命令
- inode、软连接、硬链接
- POJ 1928
- POJ 1906
- POJ 1915
- windows 10预览版系统怎么调整电脑颜色?
- C语言 判断二叉树是不是平衡树
- Iptables 指南 1.1.19