minor change

This commit is contained in:
Andreas Abel
2022-01-20 23:21:10 +01:00
parent 0ef60f2a59
commit 7f7a7eb53a

View File

@@ -29,7 +29,7 @@ while [ "$1" ]; do
echo -n "asm-init.bin" > /sys/nb/init echo -n "asm-init.bin" > /sys/nb/init
rm -f asm-init.bin rm -f asm-init.bin
shift 2 shift 2
elif [[ "$1" == -asm_l* ]]; then elif [[ "$1" == -asm_l* ]]; then
assemble "$2" asm-late-init.bin assemble "$2" asm-late-init.bin
echo -n "asm-late-init.bin" > /sys/nb/late_init echo -n "asm-late-init.bin" > /sys/nb/late_init
rm -f asm-late-init.bin rm -f asm-late-init.bin
@@ -47,6 +47,9 @@ while [ "$1" ]; do
elif [[ "$1" == -code_i* ]]; then elif [[ "$1" == -code_i* ]]; then
echo -n "$2" > /sys/nb/init echo -n "$2" > /sys/nb/init
shift 2 shift 2
elif [[ "$1" == -code_l* ]]; then
echo -n "$2" > /sys/nb/late_init
shift 2
elif [[ "$1" == -code_o* ]]; then elif [[ "$1" == -code_o* ]]; then
echo -n "$2" > /sys/nb/one_time_init echo -n "$2" > /sys/nb/one_time_init
shift 2 shift 2
@@ -116,31 +119,33 @@ while [ "$1" ]; do
elif [[ "$1" == -h* ]]; then elif [[ "$1" == -h* ]]; then
echo "kernel-nanoBench.sh usage:" echo "kernel-nanoBench.sh usage:"
echo echo
echo " -asm <code>: Assembler code string (in Intel syntax) to be benchmarked." echo " -asm <code>: Assembler code string (in Intel syntax) to be benchmarked."
echo " -asm_init <code>: Assembler code string (in Intel syntax) to be executed once in the beginning." echo " -asm_init <code>: Assembler code string (in Intel syntax) to be executed once in the beginning."
echo " -asm_late_init <code>: Assembler code string (in Intel syntax) to be executed once immediately before the code to be benchmarked." echo " -asm_late_init <code>: Assembler code string (in Intel syntax) to be executed once immediately before the code to be benchmarked."
echo " -code <filename>: Binary file containing the code to be benchmarked." echo " -asm_one_time_init <code>: Assembler code string (in Intel syntax) to be executed once before the first measurement."
echo " -code_init <filename>: Binary file containing code to be executed once in the beginning." echo " -code <filename>: Binary file containing the code to be benchmarked."
echo " -code_late_init <filename>: Binary file containing code to be executed once immediately before the code to be benchmarked." echo " -code_init <filename>: Binary file containing code to be executed once in the beginning."
echo " -config <filename>: File with performance counter event specifications." echo " -code_late_init <filename>: Binary file containing code to be executed once immediately before the code to be benchmarked."
echo " -fixed_counters: Reads the fixed-function performance counters.\n" echo " -code_one_time_init <filename>: Binary file containing code to be executed once before the first measurement."
echo " -n_measurements <n>: Number of times the measurements are repeated." echo " -config <filename>: File with performance counter event specifications."
echo " -unroll_count <n>: Number of copies of the benchmark code inside the inner loop." echo " -fixed_counters: Reads the fixed-function performance counters.\n"
echo " -loop_count <n>: Number of iterations of the inner loop." echo " -n_measurements <n>: Number of times the measurements are repeated."
echo " -warm_up_count <n>: Number of runs before the first measurement gets recorded." echo " -unroll_count <n>: Number of copies of the benchmark code inside the inner loop."
echo " -initial_warm_up_count <n>: Number of runs before any measurement is performed." echo " -loop_count <n>: Number of iterations of the inner loop."
echo " -alignment_offset <n>: Alignment offset." echo " -warm_up_count <n>: Number of runs before the first measurement gets recorded."
echo " -df: Drains front-end buffers between executing code_late_init and code." echo " -initial_warm_up_count <n>: Number of runs before any measurement is performed."
echo " -avg: Selects the arithmetic mean as the aggregate function." echo " -alignment_offset <n>: Alignment offset."
echo " -median: Selects the median as the aggregate function." echo " -df: Drains front-end buffers between executing code_late_init and code."
echo " -min: Selects the minimum as the aggregate function." echo " -avg: Selects the arithmetic mean as the aggregate function."
echo " -max: Selects the maximum as the aggregate function." echo " -median: Selects the median as the aggregate function."
echo " -basic_mode: Enables basic mode." echo " -min: Selects the minimum as the aggregate function."
echo " -no_mem: The code for reading the perf. ctrs. does not make memory accesses." echo " -max: Selects the maximum as the aggregate function."
echo " -no_normalization: The measurement results are not divided by the number of repetitions." echo " -basic_mode: Enables basic mode."
echo " -remove_empty_events: Removes events from the output that did not occur." echo " -no_mem: The code for reading the perf. ctrs. does not make memory accesses."
echo " -cpu <n>: Pins the measurement thread to CPU n." echo " -no_normalization: The measurement results are not divided by the number of repetitions."
echo " -verbose: Outputs the results of all performance counter readings." echo " -remove_empty_events: Removes events from the output that did not occur."
echo " -cpu <n>: Pins the measurement thread to CPU n."
echo " -verbose: Outputs the results of all performance counter readings."
exit 0 exit 0
else else
echo "Invalid option: $1" echo "Invalid option: $1"