mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-22 17:55:57 +01:00
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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user