mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
bench-all and linux-kernel-module-cheat-regressoin repo
This commit is contained in:
47
README.adoc
47
README.adoc
@@ -4792,52 +4792,11 @@ One possibility we could play with is to build loadable modules instead of built
|
||||
cat out/bench-boot.txt
|
||||
....
|
||||
|
||||
Output on <<p51>> fb317f4778633692b91c9174224dccc6a3a02893:
|
||||
Benchmark results will be kept at: https://github.com/cirosantilli/linux-kernel-module-cheat-regression
|
||||
|
||||
....
|
||||
cmd ./run -a x86_64 -E '/poweroff.out'
|
||||
time 4.00
|
||||
exit_status 0
|
||||
cmd ./run -a x86_64 -E '/poweroff.out' -K
|
||||
time 1.32
|
||||
exit_status 0
|
||||
cmd ./run -a x86_64 -E '/poweroff.out' -T exec_tb
|
||||
time 5.00
|
||||
exit_status 0
|
||||
instructions 7014180
|
||||
cmd ./run -a x86_64 -E 'm5 exit' -g
|
||||
time 389.39
|
||||
exit_status 0
|
||||
instructions 645396324
|
||||
cmd ./run -a arm -E '/poweroff.out'
|
||||
time 1.82
|
||||
exit_status 0
|
||||
cmd ./run -a arm -E '/poweroff.out' -T exec_tb
|
||||
time 2.11
|
||||
exit_status 0
|
||||
instructions 687532
|
||||
cmd ./run -a arm -E 'm5 exit' -g
|
||||
time 88.59
|
||||
exit_status 0
|
||||
instructions 142359498
|
||||
cmd ./run -a aarch64 -E '/poweroff.out'
|
||||
time 1.34
|
||||
exit_status 0
|
||||
cmd ./run -a aarch64 -E '/poweroff.out' -T exec_tb
|
||||
time 1.35
|
||||
exit_status 0
|
||||
instructions 179564
|
||||
cmd ./run -a aarch64 -E 'm5 exit' -g
|
||||
time 58.18
|
||||
exit_status 0
|
||||
instructions 116389714
|
||||
cmd ./run -a aarch64 -E 'm5 exit' -g -- --cpu-type=HPI --caches --l2cache --l1d_size=1024kB --l1i_size=1024kB --l2_size=1024kB --l3_size=1024kB
|
||||
time 355.81
|
||||
exit_status 0
|
||||
instructions 116508439
|
||||
....
|
||||
Output fb317f4778633692b91c9174224dccc6a3a02893:
|
||||
|
||||
TODO the following takes more than 1 hour to finish:
|
||||
TODO the following takes more than 1 hour to finish on the <<p51>>:
|
||||
|
||||
....
|
||||
cmd ./run -a arm -E 'm5 exit' -g -- --caches --cpu-type=HPI
|
||||
|
||||
31
bench-all
Executable file
31
bench-all
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
# Run all benchmarks for this repo, and save the results to the
|
||||
# benchmark repo, which should be cloned at ../linux-kernel-module-cheat-benchmarks.
|
||||
#
|
||||
# We will only include here things which are likely to change due to Buildroot / Linux
|
||||
# kernel configuration changes. This excludes for example:
|
||||
#
|
||||
# * ./gem5-bench-caches: basically only benchmarks gem5 itself,
|
||||
# since it makes no syscalls on the main loop (checked with strace).
|
||||
# * gem5 built time
|
||||
set -eu
|
||||
. common
|
||||
#./build-all
|
||||
#./bench-boot
|
||||
sha="$(git log -1 --format="%H")"
|
||||
benchmark_repo=../linux-kernel-module-cheat-regression
|
||||
last_dir="$(ls "$benchmark_repo" | grep -E '^[0-9]' | tail -n 1)"
|
||||
if [ -n "$last_dir" ]; then
|
||||
seq_id="$(("$(echo "$last_dir" | sed -E 's/_.*//')" + 1))"
|
||||
else
|
||||
seq_id=0
|
||||
fi
|
||||
seq_id="$(printf '%0.4d' "$seq_id")"
|
||||
sha="$(git log -1 --format="%H")"
|
||||
new_dir="${benchmark_repo}/${seq_id}_${sha}"
|
||||
mkdir "$new_dir"
|
||||
cp "$common_bench_boot" "$new_dir"
|
||||
cd "$benchmark_repo"
|
||||
git add .
|
||||
git commit -m "$new_dir"
|
||||
git push
|
||||
@@ -1,21 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
. common
|
||||
results_file="${out_dir}/bench-boot.txt"
|
||||
caches='--caches --l2cache --l1d_size=1024kB --l1i_size=1024kB --l2_size=1024kB --l3_size=1024kB'
|
||||
bench() (
|
||||
common_bench_cmd "./run -a ${1}" "$results_file"
|
||||
common_bench_cmd "./run -a ${1}" "$common_bench_boot"
|
||||
)
|
||||
gem5_insts() (
|
||||
printf "instructions $(./gem5-stat -a "$1" sim_insts)\n" >> "$results_file"
|
||||
printf "instructions $(./gem5-stat -a "$1" sim_insts)\n" >> "$common_bench_boot"
|
||||
)
|
||||
qemu_insts() (
|
||||
arch="$1"
|
||||
./qemu-trace2txt -a "$arch"
|
||||
set_common_vars "$arch"
|
||||
printf "instructions $(wc -l "${qemu_trace_txt_file}" | cut -d' ' -f1)\n" >> "$results_file"
|
||||
printf "instructions $(wc -l "${qemu_trace_txt_file}" | cut -d' ' -f1)\n" >> "$common_bench_boot"
|
||||
)
|
||||
rm -f "${results_file}"
|
||||
rm -f "${common_bench_boot}"
|
||||
|
||||
arch=x86_64
|
||||
bench "$arch -E '/poweroff.out'"
|
||||
|
||||
Reference in New Issue
Block a user