diff --git a/kernel-nanoBench.sh b/kernel-nanoBench.sh index 9888006..a7adc57 100755 --- a/kernel-nanoBench.sh +++ b/kernel-nanoBench.sh @@ -29,7 +29,7 @@ while [ "$1" ]; do echo -n "asm-init.bin" > /sys/nb/init rm -f asm-init.bin shift 2 - elif [[ "$1" == -asm_l* ]]; then + elif [[ "$1" == -asm_l* ]]; then assemble "$2" asm-late-init.bin echo -n "asm-late-init.bin" > /sys/nb/late_init rm -f asm-late-init.bin @@ -47,6 +47,9 @@ while [ "$1" ]; do elif [[ "$1" == -code_i* ]]; then echo -n "$2" > /sys/nb/init shift 2 + elif [[ "$1" == -code_l* ]]; then + echo -n "$2" > /sys/nb/late_init + shift 2 elif [[ "$1" == -code_o* ]]; then echo -n "$2" > /sys/nb/one_time_init shift 2 @@ -116,31 +119,33 @@ while [ "$1" ]; do elif [[ "$1" == -h* ]]; then echo "kernel-nanoBench.sh usage:" echo - echo " -asm : Assembler code string (in Intel syntax) to be benchmarked." - echo " -asm_init : Assembler code string (in Intel syntax) to be executed once in the beginning." - echo " -asm_late_init : Assembler code string (in Intel syntax) to be executed once immediately before the code to be benchmarked." - 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 " -code_late_init : Binary file containing code to be executed once immediately before the code to be benchmarked." - echo " -config : File with performance counter event specifications." - echo " -fixed_counters: Reads the fixed-function performance counters.\n" - 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 " -alignment_offset : Alignment offset." - echo " -df: Drains front-end buffers between executing code_late_init and code." - 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 " -max: Selects the maximum 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 " -no_normalization: The measurement results are not divided by the number of repetitions." - echo " -remove_empty_events: Removes events from the output that did not occur." - echo " -cpu : Pins the measurement thread to CPU n." - echo " -verbose: Outputs the results of all performance counter readings." + echo " -asm : Assembler code string (in Intel syntax) to be benchmarked." + echo " -asm_init : Assembler code string (in Intel syntax) to be executed once in the beginning." + echo " -asm_late_init : Assembler code string (in Intel syntax) to be executed once immediately before the code to be benchmarked." + echo " -asm_one_time_init : Assembler code string (in Intel syntax) to be executed once before the first measurement." + 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 " -code_late_init : Binary file containing code to be executed once immediately before the code to be benchmarked." + echo " -code_one_time_init : Binary file containing code to be executed once before the first measurement." + echo " -config : File with performance counter event specifications." + echo " -fixed_counters: Reads the fixed-function performance counters.\n" + 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 " -alignment_offset : Alignment offset." + echo " -df: Drains front-end buffers between executing code_late_init and code." + 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 " -max: Selects the maximum 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 " -no_normalization: The measurement results are not divided by the number of repetitions." + echo " -remove_empty_events: Removes events from the output that did not occur." + echo " -cpu : Pins the measurement thread to CPU n." + echo " -verbose: Outputs the results of all performance counter readings." exit 0 else echo "Invalid option: $1"