gem5 设置checkpiont以及从checkpoint处开始执行

来源:互联网 发布:linux apt-get卸载 编辑:程序博客网 时间:2024/05/19 22:44

以spec2006中的bzip2为例说明,如何设置checkpoint ,以及从checkpoint处开始继续执行。这样做的目的是,可以采用automic的方式执行N条指令,然后以detailed的方式执行M条指令。



1.设置checkpoint:在第5000000条instruction处设置checkpoint

./build/ALPHA_SE/gem5.opt -d ./m5out/401.bzip2 ./configs/example/se.py -c ../installspec2006/benchspec/CPU2006/401.bzip2/exe/bzip2_base.i386-m32-gcc42-nn -o ../installspec2006/benchspec/CPU2006/401.bzip2/data/test/input/dryer.jpg --at-instruction --take-checkpoints=5000000 --max-checkpoints=1 --caches --l1d_size=32kB --l1i_size=32kB --l2cache --l2_size=2048kB;

2.从上次checkpoint处开始:“--at-instruction -r 5000000”表示从第5000000这个checkpoint开始,“-I 5000000”表示再模拟5000000条指令

./build/ALPHA_SE/gem5.opt -d ./m5out/401.bzip2 ./configs/example/se.py -c ../installspec2006/benchspec/CPU2006/401.bzip2/exe/bzip2_base.i386-m32-gcc42-nn -o ../installspec2006/benchspec/CPU2006/401.bzip2/data/test/input/dryer.jpg --at-instruction -r 5000000 -I 5000000 --caches --l1d_size=32kB --l1i_size=32kB --l2cache --l2_size=2048kB --cpu-type=detailed;

3.不设置checkpoint,直接运行10000000条指令

./build/ALPHA_SE/gem5.opt -d ./m5out/401.bzip2 ./configs/example/se.py -c ../installspec2006/benchspec/CPU2006/401.bzip2/exe/bzip2_base.i386-m32-gcc42-nn -o ../installspec2006/benchspec/CPU2006/401.bzip2/data/test/input/dryer.jpg -I 10000000 --caches --l1d_size=32kB --l1i_size=32kB --l2cache --l2_size=2048kB --cpu-type=detailed;

4.采用fast-forward运行N条指令,再使用detailed运行M条指令

#401.bzip2./build/ALPHA_SE/gem5.opt -d ./m5out/401.bzip2 ./configs/example/se.py -c ../installspec2006/benchspec/CPU2006/401.bzip2/exe/bzip2_base.i386-m32-gcc42-nn -o ../installspec2006/benchspec/CPU2006/401.bzip2/data/ref/input/chicken.jpg --fast-forward 40000000000 -I 100000000 --caches --l1d_size=32kB --l1i_size=32kB --l2cache --l2_size=2048kB --cpu-type=detailed;


1 0
原创粉丝点击