-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdump-qemu-times.sh
executable file
·73 lines (64 loc) · 1.38 KB
/
dump-qemu-times.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash
# Script to dump SPEC CPU 2017 QEMU execution times
# Copyright (C) 2023 Embecosm Limited
# Contributor Jeremy Bennett <[email protected]>
# SPDX-License-Identifier: GPL-3.0-or-later
# This script searches a SPEC CPU 2017 log script for records of the execution
# times of QEMU for each benchmark workload run.
set -u
# Print out the help message
dohelp () {
cat <<EOF
Usage: dump-qemu-times.sh [--csv|--md]
--speclog: <dir>
[--verbose | --quiet]
[--help|-h]
EOF
}
# Set default values
topdir="$(dirname $(cd $(dirname $0) && echo ${PWD}))"
tooldir="${topdir}/rise-rvv-tcg-qemu-tooling"
installdir="${topdir}/install"
basedata="${tooldir}/spec-basedata.txt"
specdir="${installdir}/spec"
pformat="--txt"
speclog=""
verbose="--quiet"
# Parse command line options
set +u
until
opt="$1"
case "${opt}"
in
--csv|--md)
pformat="$1"
;;
--speclog)
shift
if [ ! -e $1 ]
then
echo "ERROR: non-existent SPEC log file: exiting"
exit 1
else
speclog="$1"
fi
;;
--verbose|--quiet)
verbose="$1"
;;
--help|-h)
dohelp
exit 0
;;
?*)
echo "Unknown argument '$1'"
dohelp
exit 1
;;
esac
[ "x${opt}" = "x" ]
do
shift
done
set -u
awk -f ${tooldir}/collate-qemu-times.awk ${pformat} ${verbose} < ${speclog}