mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
Reorganize the benchmark section.
Automate Linux kernel measures and move them into that new section.
This commit is contained in:
25
gem5-stat
Executable file
25
gem5-stat
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
. common
|
||||
while getopts a:hs: OPT; do
|
||||
case "$OPT" in
|
||||
a)
|
||||
arch="$OPTARG"
|
||||
;;
|
||||
h)
|
||||
printf "\
|
||||
usage: $0 [-a arch] [stat=system.cpu.numCycles]
|
||||
Get the value for a gem5 stat from the stats.txt file.
|
||||
" 1>&2
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift "$(($OPTIND - 1))"
|
||||
if [ $# -gt 0 ]; then
|
||||
stat="$1"
|
||||
else
|
||||
stat=system.cpu.numCycles
|
||||
fi
|
||||
set_common_vars "$arch" true
|
||||
awk "/^$stat /{ print \$2 }" "${m5out_dir}/stats.txt"
|
||||
Reference in New Issue
Block a user