common: simplify set_common_vars, rename to common_setup

Don't pass all arguments explicitly, just use existing vars.

Prefix all common_setup inputs and outputs with common_ to avoid name conflicts.
This commit is contained in:
Ciro Santilli
2018-08-09 05:44:52 +01:00
parent b8abb15ca7
commit 1cb056a995
16 changed files with 192 additions and 200 deletions

View File

@@ -1,10 +1,11 @@
#!/usr/bin/env bash
set -eu
. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common"
common_gem5=true
while getopts a:hs: OPT; do
case "$OPT" in
a)
arch="$OPTARG"
common_arch="$OPTARG"
;;
h)
printf "\
@@ -21,5 +22,5 @@ if [ $# -gt 0 ]; then
else
stat=system.cpu[0-9]*.numCycles
fi
set_common_vars "$arch" true
common_setup
awk "/^$stat /{ print \$2 }" "${common_m5out_dir}/stats.txt"