mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-28 20:44:26 +01:00
bench-boot: continue progress, renamte to test-boot
This commit is contained in:
@@ -10993,8 +10993,8 @@ We tried to automate it on Travis with link:.travis.yml[] but it hits the curren
|
|||||||
Run all kernel boot benchmarks for one arch:
|
Run all kernel boot benchmarks for one arch:
|
||||||
|
|
||||||
....
|
....
|
||||||
./build-bench-boot --size 3 && ./bench-boot --size 3
|
./build-test-boot --size 3 && ./test-boot --size 3
|
||||||
cat "$(./getvar bench_boot)"
|
cat "$(./getvar test_boot_benchmark_file)"
|
||||||
....
|
....
|
||||||
|
|
||||||
Sample results at 8fb9db39316d43a6dbd571e04dd46ae73915027f:
|
Sample results at 8fb9db39316d43a6dbd571e04dd46ae73915027f:
|
||||||
|
|||||||
@@ -117,8 +117,8 @@ fi
|
|||||||
if "$bench_linux_boot"; then
|
if "$bench_linux_boot"; then
|
||||||
cd "${root_dir}"
|
cd "${root_dir}"
|
||||||
"${root_dir}/build" --all-archs all
|
"${root_dir}/build" --all-archs all
|
||||||
"${root_dir}/bench-boot" --size 3
|
"${root_dir}/test-boot" --size 3
|
||||||
cp "$(${root_dir}/getvar bench_boot)" "$new_dir"
|
cp "$(${root_dir}/getvar test_boot_benchmark_file)" "$new_dir"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if "$update_repo"; then
|
if "$update_repo"; then
|
||||||
|
|||||||
@@ -9,5 +9,5 @@ while [ $# -gt 0 ]; do
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
./build-bench-boot --size "$test_size"
|
./build-test-boot --size "$test_size"
|
||||||
./build --all-archs test-gdb
|
./build --all-archs test-gdb
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ consts['buildroot_out_dir'] = os.path.join(consts['out_dir'], 'buildroot')
|
|||||||
consts['gem5_m5_build_dir'] = os.path.join(consts['out_dir'], 'util', 'm5')
|
consts['gem5_m5_build_dir'] = os.path.join(consts['out_dir'], 'util', 'm5')
|
||||||
consts['run_dir_base'] = os.path.join(consts['out_dir'], 'run')
|
consts['run_dir_base'] = os.path.join(consts['out_dir'], 'run')
|
||||||
consts['crosstool_ng_out_dir'] = os.path.join(consts['out_dir'], 'crosstool-ng')
|
consts['crosstool_ng_out_dir'] = os.path.join(consts['out_dir'], 'crosstool-ng')
|
||||||
consts['bench_boot'] = os.path.join(consts['out_dir'], 'bench-boot.txt')
|
consts['test_boot_benchmark_file'] = os.path.join(consts['out_dir'], 'test-boot.txt')
|
||||||
consts['packages_dir'] = os.path.join(consts['root_dir'], 'buildroot_packages')
|
consts['packages_dir'] = os.path.join(consts['root_dir'], 'buildroot_packages')
|
||||||
consts['kernel_modules_subdir'] = 'kernel_modules'
|
consts['kernel_modules_subdir'] = 'kernel_modules'
|
||||||
consts['kernel_modules_source_dir'] = os.path.join(consts['root_dir'], consts['kernel_modules_subdir'])
|
consts['kernel_modules_source_dir'] = os.path.join(consts['root_dir'], consts['kernel_modules_subdir'])
|
||||||
|
|||||||
2
test
2
test
@@ -9,7 +9,7 @@ while [ $# -gt 0 ]; do
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
./bench-boot --size "$test_size"
|
./test-boot --size "$test_size"
|
||||||
./test-modules --all-archs --all-emulators
|
./test-modules --all-archs --all-emulators
|
||||||
./test-gdb --all-archs --all-emulators
|
./test-gdb --all-archs --all-emulators
|
||||||
./test-baremetal --all-archs --all-emulators
|
./test-baremetal --all-archs --all-emulators
|
||||||
|
|||||||
@@ -30,16 +30,18 @@ Size of the tests to run. Scale:
|
|||||||
self.run(**kwargs)
|
self.run(**kwargs)
|
||||||
|
|
||||||
def timed_main(self):
|
def timed_main(self):
|
||||||
|
# TODO bring this benchmark code back to life. Likely should go inside run with an option
|
||||||
|
#
|
||||||
#bench() (
|
#bench() (
|
||||||
# "${root_dir}/bench-cmd" "./run --arch ${1}${extra_args}" "$self.env['bench_boot']"
|
# "${root_dir}/bench-cmd" "./run --arch ${1}${extra_args}" "$self.env['test_boot_benchmark_file']"
|
||||||
#)
|
#)
|
||||||
#
|
#
|
||||||
#newline() (
|
#newline() (
|
||||||
# echo >> "$self.env['bench_boot']"
|
# echo >> "$self.env['test_boot_benchmark_file']"
|
||||||
#)
|
#)
|
||||||
#
|
#
|
||||||
#gem5_insts() (
|
#gem5_insts() (
|
||||||
# printf "instructions $(./gem5-stat --arch "$1" sim_insts)\n" >> "$self.env['bench_boot']"
|
# printf "instructions $(./gem5-stat --arch "$1" sim_insts)\n" >> "$self.env['test_boot_benchmark_file']"
|
||||||
# newline
|
# newline
|
||||||
#)
|
#)
|
||||||
#
|
#
|
||||||
@@ -47,12 +49,11 @@ Size of the tests to run. Scale:
|
|||||||
# common_arch="$1"
|
# common_arch="$1"
|
||||||
# ./qemu-trace2txt --arch "$common_arch"
|
# ./qemu-trace2txt --arch "$common_arch"
|
||||||
# common_qemu_trace_txt_file="$("$getvar" --arch "$common_arch" qemu_trace_txt_file)"
|
# common_qemu_trace_txt_file="$("$getvar" --arch "$common_arch" qemu_trace_txt_file)"
|
||||||
# printf "instructions $(wc -l "${common_qemu_trace_txt_file}" | cut -d' ' -f1)\n" >> "$self.env['bench_boot']"
|
# printf "instructions $(wc -l "${common_qemu_trace_txt_file}" | cut -d' ' -f1)\n" >> "$self.env['test_boot_benchmark_file']"
|
||||||
# newline
|
# newline
|
||||||
#)
|
#)
|
||||||
#
|
#
|
||||||
#rm -f "${self.env['bench_boot']}"
|
#rm -f "${self.env['test_boot_benchmark_file']}"
|
||||||
|
|
||||||
self.run = self.import_path_main('run')
|
self.run = self.import_path_main('run')
|
||||||
run_args = self.get_common_args()
|
run_args = self.get_common_args()
|
||||||
if self.env['emulator'] == 'gem5':
|
if self.env['emulator'] == 'gem5':
|
||||||
@@ -66,59 +67,34 @@ Size of the tests to run. Scale:
|
|||||||
# TODO: find out why it fails.
|
# TODO: find out why it fails.
|
||||||
if self.env['emulator'] != 'gem5':
|
if self.env['emulator'] != 'gem5':
|
||||||
self._bench(kvm=True, **run_args)
|
self._bench(kvm=True, **run_args)
|
||||||
# newline
|
|
||||||
if self.env['emulator'] == 'qemu' and self.env['size'] >= 2:
|
if self.env['emulator'] == 'qemu' and self.env['size'] >= 2:
|
||||||
self._bench(trace='exec_tb', **run_args)
|
self._bench(trace='exec_tb', **run_args)
|
||||||
# qemu_insts "$arch"
|
|
||||||
if self.env['emulator'] == 'gem5' and self.env['size'] >= 3:
|
if self.env['emulator'] == 'gem5' and self.env['size'] >= 3:
|
||||||
self._bench(
|
if self.env['arch'] == 'x86_64':
|
||||||
extra_emulator_args=[
|
cpu_types = ['DerivO3CPU']
|
||||||
'--cpu-type',
|
elif self.env['is_arm']:
|
||||||
|
cpu_types = [
|
||||||
'DerivO3CPU',
|
'DerivO3CPU',
|
||||||
'--caches',
|
'HPI',
|
||||||
'--l2cache',
|
]
|
||||||
'--l1d_size=1024kB',
|
for cpu_type in cpu_types:
|
||||||
'--l1i_size=1024kB',
|
self._bench(
|
||||||
'--l2_size=1024kB',
|
extra_emulator_args=[
|
||||||
'--l3_size=1024kB',
|
'--cpu-type', cpu_type,
|
||||||
],
|
'--caches',
|
||||||
**run_args
|
'--l2cache',
|
||||||
)
|
'--l1d_size=1024kB',
|
||||||
# gem5_insts "$arch"
|
'--l1i_size=1024kB',
|
||||||
|
'--l2_size=1024kB',
|
||||||
#arch=arm
|
'--l3_size=1024kB',
|
||||||
#bench "$arch --eval '/poweroff.out'"
|
],
|
||||||
#newline
|
**run_args
|
||||||
#if [ self.env['size'] -ge 2 ]; then
|
)
|
||||||
# bench "$arch --eval '/poweroff.out' --trace exec_tb"
|
if self.env['arch'] == 'aarch64':
|
||||||
# qemu_insts "$arch"
|
# Do a fuller testing for aarch64.
|
||||||
# bench "$arch --eval 'm5 exit' --emulator gem5"
|
for build_type in ['debug', 'fast']:
|
||||||
# gem5_insts "$arch"
|
self._bench(gem5_build_type=build_type, **run_args)
|
||||||
#fi
|
self._bench(gem5_script='biglittle', **run_args)
|
||||||
#if [ self.env['size'] -ge 3 ]; then
|
|
||||||
# bench "$arch --eval 'm5 exit' --emulator gem5 -- --cpu-type=HPI ${caches}"
|
|
||||||
# gem5_insts "$arch"
|
|
||||||
#fi
|
|
||||||
|
|
||||||
#arch=aarch64
|
|
||||||
#bench "$arch --eval '/poweroff.out'"
|
|
||||||
#newline
|
|
||||||
#if [ self.env['size'] -ge 2 ]; then
|
|
||||||
# bench "$arch --eval '/poweroff.out' --trace exec_tb"
|
|
||||||
# qemu_insts "$arch"
|
|
||||||
# bench "$arch --eval 'm5 exit' --emulator gem5"
|
|
||||||
# gem5_insts "$arch"
|
|
||||||
#fi
|
|
||||||
#if [ self.env['size'] -ge 3 ]; then
|
|
||||||
# bench "$arch --eval 'm5 exit' --emulator gem5 -- --cpu-type=HPI ${caches}"
|
|
||||||
# gem5_insts "$arch"
|
|
||||||
# #bench "$arch --eval 'm5 exit' --emulator gem5 --gem5-script biglittle"
|
|
||||||
# #gem5_insts "$arch"
|
|
||||||
# bench "$arch --eval 'm5 exit' --emulator gem5 --gem5-build-type fast"
|
|
||||||
# gem5_insts "$arch"
|
|
||||||
# bench "$arch --eval 'm5 exit' --emulator gem5 --gem5-build-type debug"
|
|
||||||
# gem5_insts "$arch"
|
|
||||||
#fi
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
Main().cli_exit()
|
Main().cli_exit()
|
||||||
Reference in New Issue
Block a user