gem5中使用spec2006并创建simpoints

参考: gem5_simpoint

**说明:**在gem5的发行版本中,fs.py中并不包含simpoint的创建和使用,所以官方文档http://gem5.org/Simpoints中的Profiling and Generating BBV存在错误,需要修改fs.py后才能使用,而se.py中已经包含simpoint的相关信息,故使用se.py来创建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,提取码: ecnu

**2. SimPoint Analysis: **
得到BBV文件后即可分析该测试程序的模拟点,运行脚本如下:

./simpoint -loadFVFile simpoint.bb.gz -maxK 30 -saveSimpoints <simpoint_file> -saveSimpointWeights <weight_file> -inputVectorsGzipped

生成的simpoints文件见spec06simpoints,提取码: ecnu

现在将对spec06simpoints中所有权重最大的simpoint进行统计,以后即可从该点运行,统计结果见spec2006中精确的simulation points执行点

**3. Taking SimPoint Checkpoints in gem5: **

m5.fast configs/example/se.py --bench=bzip2 --take-checkpoint=3792 --at-instruction

使用上面的命令生成checkpoint, --take-checkpoint=3792参数为从精确执行点开始执行,即point * 100Million。

4.Resuming from gem5 SimPoint Checkpoints

m5.fast configs/example/se.py --bench=bzip2 --caches --l2cache --checkpoint-restore=3792 --at-instruction --max-inst=100000

以后运行改测试集,即可直接从checkpoint开始,然后运行指定的指令数目即可。

评论 44
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值