OK, direct the annoying traces to the output folder

Otherwise it was getting messy to distinguish between trace-events
and trace-<pid> in the .gitignore.

Now only the latest trace will be kept, with a fixed name.
This commit is contained in:
Ciro Santilli
2018-03-28 23:06:45 +01:00
parent f74e001789
commit 01a84e7f79
5 changed files with 64 additions and 55 deletions

1
.gitignore vendored
View File

@@ -9,7 +9,6 @@ gitignore*
# Specific files.
/9p
/README.html
/trace-[0-9]*
# GEM5
/m5out

7
run
View File

@@ -25,7 +25,8 @@ initramfs=false
memory=256M
nographic=true
root=''
while getopts a:c:DdE:e:f:G:ghIiKkm:x OPT; do
trace_enable=''
while getopts a:c:DdE:e:f:G:ghIiKkm:T:x OPT; do
case "$OPT" in
a)
arch="$OPTARG"
@@ -78,6 +79,9 @@ while getopts a:c:DdE:e:f:G:ghIiKkm:x OPT; do
m)
memory="$OPTARG"
;;
T)
trace_enable="$OPTARG"
;;
x)
nographic=false
;;
@@ -169,6 +173,7 @@ ${debug_vm} \
-monitor telnet::45454,server,nowait \
-netdev user,hostfwd=tcp::45455-:45455,hostfwd=tcp::45456-:22,id=net0 \
-smp ${cpus} \
-trace enable=${trace_enable},file='${lkmc_out_dir}/trace.bin' \
-virtfs local,path=9p,mount_tag=host_scratch,security_model=mapped,id=host_scratch \
-virtfs local,path=${out_dir}/build,mount_tag=host_out,security_model=mapped,id=host_out \
"

View File

@@ -35,5 +35,10 @@
|`-K` | |Use KVM. Only works if guest arch == host arch.
|`-k` | |Enable KGDB.
|`-m` | |Set the memory size of the guest. E.g.: `-m 512M`. Default: `256M`.
|`-T` | |Enable extra QEMU trace events.
`./configure --enable-trace-backends=simple` seems to enable
some by default, e.g. `pr_manager_run`, and I don't know how to
get rid of them. But those events are rare and should not impact
performance, so we just ignore them for now.
|`-x` | |Run in graphic mode. Mnemonic: X11.
|===

View File

@@ -10,7 +10,7 @@ while getopts a: OPT; do
esac
done
set_common_vars "$arch" false
time ./run -a "$arch" -e 'init=/poweroff.out' -- -trace exec_tb,file="${lkmc_out_dir}/trace.bin"
time ./run -a "$arch" -e 'init=/poweroff.out' -T exec_tb
time ./qemu/scripts/simpletrace.py "${out_dir}/build/host-qemu-custom/trace-events-all" "${lkmc_out_dir}/trace.bin" >"${lkmc_out_dir}/trace.txt"
# Instruction count.