Files
linux-kernel-module-cheat/bench-boot
Ciro Santilli af210a7671 Move arm to virt armv7, unify arm QEMU and gem5 builds
gem5 requires armv7, and we learnt that the versatiledb we were using
was pre-v7.

We could have moved to -M vexpress-*, but in the end decided to go for
-M virt due to its simpliciy, and uniformity with aarch64.

platform_device: does not work anymore and was removed, since it was tied
to versatilepb.

We left a mention on the README and removed all in tree source. The QEMU
patch is still left as it was.

As a consequence, the linux tree had no other patches, and we now use
vanilla linux by default, which is a great thing for reproducibility.

Another consequence is the /poweroff.out works for arm -M virt,
and we removed all mentions of the problem.
2018-04-19 23:38:17 +01:00

49 lines
1.3 KiB
Bash
Executable File

#!/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"
)
gem5_insts() (
printf "instructions $(./gem5-stat -a "$1" sim_insts)\n" >> "$results_file"
)
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"
)
rm -f "${results_file}"
arch=x86_64
bench "$arch -E '/poweroff.out'"
bench "$arch -E '/poweroff.out' -K"
bench "$arch -E '/poweroff.out' -T exec_tb"
qemu_insts "$arch"
bench "$arch -E 'm5 exit' -g"
gem5_insts "$arch"
# Was taking more than one hour.
#bench "$arch -E 'm5 exit' -g -- --cpu-type=DerivO3CPU ${caches}"
#gem5_insts "$arch"
arch=arm
bench "$arch -E '/poweroff.out'"
bench "$arch -E '/poweroff.out' -T exec_tb"
qemu_insts "$arch"
bench "$arch -E 'm5 exit' -g"
gem5_insts "$arch"
# Was taking more than one hour.
#bench "$arch -E 'm5 exit' -g -- --cpu-type=HPI ${caches}"
#gem5_insts "$arch"
arch=aarch64
bench "$arch -E '/poweroff.out'"
bench "$arch -E '/poweroff.out' -T exec_tb"
qemu_insts "$arch"
bench "$arch -E 'm5 exit' -g"
gem5_insts "$arch"
bench "$arch -E 'm5 exit' -g -- --cpu-type=HPI ${caches}"
gem5_insts "$arch"