From 185c2730cc78d5adda683d76c0e3b35e7cb534f0 Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Sun, 12 Aug 2018 21:52:54 +0100 Subject: [PATCH] gem5: ./run -l works for fs_bigLITTLE.py When you remove something from the README because it became obvious through automation, that is a good thing. --- README.adoc | 6 ------ common | 1 + run | 20 ++++++++++++-------- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/README.adoc b/README.adoc index 5e02c5a..40cd7b9 100644 --- a/README.adoc +++ b/README.adoc @@ -8492,12 +8492,6 @@ then: ./run -a A -g -X-b .... -Checkpoints can be restored with: - -.... -./run -a A -g -X-b -- --restore-from=out/aarch64/gem5/0/m5ou5/cpt.* -.... - Advantages over `fs.py`: * more representative of mobile ARM SoCs, which almost always have big little cluster diff --git a/common b/common index 1d389ab..592a0d3 100644 --- a/common +++ b/common @@ -142,6 +142,7 @@ common_root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" common_arch=x86_64 common_gem5=false common_gem5_build_type=opt +common_gem5_cpt_pref='^cpt\.' common_gem5_variant=default common_gem5_worktree= common_linux_variant=default diff --git a/run b/run index 06f3d95..fbe051f 100755 --- a/run +++ b/run @@ -198,13 +198,6 @@ if "$common_gem5"; then else gem5_arch=ARM fi - if [ -n "$gem5_restore_last_checkpoint" ]; then - cpt_pref='^cpt\.' - latest_cpt_basename="$(ls -crt "$common_m5out_dir" | grep -E "$cpt_pref" | tail -n "$gem5_restore_last_checkpoint" | head -n 1)" - n="$(ls -1 "$common_m5out_dir" | grep -E "$cpt_pref" | sort -k 2 -n -t . | grep -n "$latest_cpt_basename" | cut -d : -f 1)" - extra_flags="${extra_flags}-r ${n} \\ -" - fi if "$trace_enabled"; then gem5opts="${gem5opts} --debug-flags='${trace_type}' \\ " @@ -218,7 +211,12 @@ ${gem5opts}\ -d '${common_m5out_dir}' \\ " if "$gem5_fsbiglittle"; then - cmd="${gem5_common}\ + if [ -n "$gem5_restore_last_checkpoint" ]; then + extra_flags="${extra_flags}\ +--restore-from='${common_m5out_dir}/$(ls -crt "$common_m5out_dir" | grep -E "$common_gem5_cpt_pref" | tail -n "$gem5_restore_last_checkpoint" | head -n 1)' \\ +" + fi + cmd="${gem5_common}\ "${common_gem5_default_src_dir}/configs/example/arm/fs_bigLITTLE.py" \\ --big-cpus=2 \\ --cpu-type=atomic \\ @@ -228,6 +226,12 @@ ${gem5opts}\ --little-cpus=2 \\ " else + if [ -n "$gem5_restore_last_checkpoint" ]; then + latest_cpt_basename="$(ls -crt "$common_m5out_dir" | grep -E "$common_gem5_cpt_pref" | tail -n "$gem5_restore_last_checkpoint" | head -n 1)" + n="$(ls -1 "$common_m5out_dir" | grep -E "$common_gem5_cpt_pref" | sort -k 2 -n -t . | grep -n "$latest_cpt_basename" | cut -d : -f 1)" + extra_flags="${extra_flags}-r ${n} \\ +" + fi gem5_common="\ ${gem5_common}\ '${common_gem5_src_dir}/configs/example/fs.py' \\