From f67b5895329381c2a0fca71f1eccfd80d3227da9 Mon Sep 17 00:00:00 2001 From: Anthony Wharton Date: Thu, 21 Feb 2019 16:14:40 +0000 Subject: [PATCH] Add help args to kernel-nanoBench.sh --- kernel-nanoBench.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/kernel-nanoBench.sh b/kernel-nanoBench.sh index 106b049..925bb35 100755 --- a/kernel-nanoBench.sh +++ b/kernel-nanoBench.sh @@ -71,6 +71,27 @@ while [ "$1" ]; do elif [[ "$1" == -avg* ]]; then echo "avg" > /sys/nb/agg shift + elif [[ "$1" == -h || "$1" == --help ]]; then + echo "kernel-nanoBench usage:" + echo + echo " -code : Binary file containing the code to be benchmarked." + echo " -code_init : Binary file containing code to be executed once in the beginning" + echo " -config : File with performance counter event specifications." + echo " -n_measurements : Number of times the measurements are repeated." + echo " -unroll_count : Number of copies of the benchmark code inside the inner loop." + echo " -loop_count : Number of iterations of the inner loop." + echo " -warm_up_count : Number of runs before the first measurement gets recorded." + echo " -initial_warm_up_count : Number of runs before any measurement is performed." + echo " -avg: Selects the arithmetic mean as the aggregate function." + echo " -median: Selects the median as the aggregate function." + echo " -min: Selects the minimum as the aggregate function." + echo " -basic_mode: Enables basic mode." + echo " -no_mem: The code for reading the perf. ctrs. does not make memory accesses." + echo " -verbose: Outputs the results of all performance counter readings." + echo " -cpu : Pins the measurement thread to CPU n." + echo " -usr : If 1, counts events at a privilege level greater than 0." + echo " -os : If 1, counts events at a privilege level 0." + exit 0 else echo "Invalid option: " "$1" exit 1