Files
linux-kernel-module-cheat/count-boot-instructions
2018-03-26 10:19:51 +01:00

18 lines
432 B
Bash
Executable File

#!/usr/bin/env bash
set -eu
. common
arch=x86_64
while getopts a: OPT; do
case "$OPT" in
a)
arch="$OPTARG"
;;
esac
done
set_common_vars "$arch" false
time ./run -a "$arch" -e 'init=/poweroff.out' -- -trace exec_tb,file=trace
time ./qemu/scripts/simpletrace.py "${out_dir}/build/host-qemu-custom/trace-events-all" trace >trace.txt
wc -l trace.txt
sed '/0x1000000/q' trace.txt >trace-boot.txt
wc -l trace-boot.txt