gem5.sh: simplify, and do m5 resetstats and m5 exit

This covers the most common use case of running a benchmark after restore.
This commit is contained in:
Ciro Santilli
2018-08-25 06:13:09 +01:00
parent 865d065d3d
commit eb4f4ba1d7
3 changed files with 45 additions and 45 deletions

View File

@@ -83,14 +83,9 @@ fi
# Restore and run benchmarks.
rm -f "$results_file"
printf '#!/bin/sh
m5 resetstats
dhrystone XXX
m5 exit
' >"${common_gem5_readfile_file}"
for n in 1000 10000 100000; do
printf "n ${n}\n" >> "$results_file"
sed -Ei "s/^dhrystone .*/dhrystone ${n}/" "${common_gem5_readfile_file}"
printf "dhrystone ${n}" > "${common_gem5_readfile_file}"
bench-all
printf "\n" >> "$results_file"
done