gem5: add run -l option to restore latest checkpoint with directory timestamps

This commit is contained in:
Ciro Santilli
2018-08-12 21:06:06 +01:00
parent 8cd6ffda2a
commit 4e648479f2
4 changed files with 95 additions and 71 deletions

View File

@@ -38,49 +38,48 @@ bench() (
)
bench-all() (
bench "${cmd} -- -r 1 ${cache_small} --cpu-type=HPI --restore-with-cpu=HPI"
bench "${cmd} -- -r 1 ${cache_large} --cpu-type=HPI --restore-with-cpu=HPI"
bench "${cmd} -l 1 -- ${cache_small} --cpu-type=HPI --restore-with-cpu=HPI"
bench "${cmd} -l 1 -- ${cache_large} --cpu-type=HPI --restore-with-cpu=HPI"
# RESTORE_INVESTIGATION
# These were mostly to investigate what happens on restore:
# https://stackoverflow.com/questions/49011096/how-to-switch-cpu-models-in-gem5-after-restoring-a-checkpoint-and-then-observe-t
#bench "$cmd -- -r 1"
#bench "$cmd -- -r 1 $cache_small"
#bench "$cmd -- -r 1 $cache_large"
#bench "$cmd -- -r 2 $cache_small"
#bench "$cmd -- -r 3 $cache_large"
#bench "$cmd -- -r 4 $cache_small --cpu-type=HPI"
#bench "$cmd -- -r 5 $cache_large --cpu-type=HPI"
## Restore from AtomicSimpleCPU to HPI.
#bench "$cmd -- -r 2 $cache_small --cpu-type=HPI --restore-with-cpu=HPI"
#bench "$cmd -- -r 3 $cache_large --cpu-type=HPI --restore-with-cpu=HPI"
#bench "$cmd -- -r 2 $cache_small --restore-with-cpu=HPI"
#bench "$cmd -- -r 3 $cache_large --restore-with-cpu=HPI"
#bench "$cmd -- -r 2 $cache_small --cpu-type=HPI"
#bench "$cmd -- -r 3 $cache_large --cpu-type=HPI"
#bench "${cmd} -l 1"
#bench "${cmd} -l 1 -- ${cache_small}"
#bench "${cmd} -l 1 -- ${cache_large}"
#bench "${cmd} -l 2 -- ${cache_small}"
#bench "${cmd} -l 3 -- ${cache_large}"
#bench "${cmd} -l 4 -- ${cache_small} --cpu-type=HPI"
#bench "${cmd} -l 5 -- ${cache_large} --cpu-type=HPI"
## Restore from At-- omicSimpleCPU to HPI.
#bench "${cmd} -l 2 -- ${cache_small} --cpu-type=HPI --restore-with-cpu=HPI"
#bench "${cmd} -l 3 -- ${cache_large} --cpu-type=HPI --restore-with-cpu=HPI"
#bench "${cmd} -l 2 -- ${cache_small} --restore-with-cpu=HPI"
#bench "${cmd} -l 3 -- ${cache_large} --restore-with-cpu=HPI"
#bench "${cmd} -l 2 -- ${cache_small} --cpu-type=HPI"
#bench "${cmd} -l 3 -- ${cache_large} --cpu-type=HPI"
## Restore HPI with different cache sizes and see if it is used.
#bench "$cmd -- -r 4 $cache_large --cpu-type=HPI"
#bench "$cmd -- -r 5 $cache_small --cpu-type=HPI"
#bench "$cmd -- -r 2 $cache_large --cpu-type=HPI"
#bench "$cmd -- -r 3 $cache_small --cpu-type=HPI"
#bench "${cmd} -l 4 -- ${cache_large} --cpu-type=HPI"
#bench "${cmd} -l 5 -- ${cache_small} --cpu-type=HPI"
#bench "${cmd} -l 2 -- ${cache_large} --cpu-type=HPI"
#bench "${cmd} -l 3 -- ${cache_small} --cpu-type=HPI"
)
if "$generate_checkpoints"; then
# Create the checkpoints after the kernel boot.
rm -rf "${common_m5out_dir}"/cpt.*;
printf 'm5 exit' > "${common_gem5_readfile_file}"
cpt_cmd="-E '/gem5.sh'"
# 1
./eeval "$cmd $cpt_cmd"
# RESTORE_INVESTIGATION
## 2
#./eeval "$cmd $cpt_cmd -- $cache_small"
## 3
#./eeval "$cmd $cpt_cmd -- $cache_large"
## 4
#./eeval "$cmd $cpt_cmd -- $cache_small --cpu-type=HPI"
## 5
#./eeval "$cmd $cpt_cmd -- $cache_large --cpu-type=HPI"
## 4
#./eeval "$cmd $cpt_cmd -- $cache_small --cpu-type=HPI"
## 3
#./eeval "$cmd $cpt_cmd -- $cache_large"
## 2
#./eeval "$cmd $cpt_cmd -- $cache_small"
# 1
./eeval "$cmd $cpt_cmd"
fi
# Restore and run benchmarks.