summary refs log tree commit diff stats
path: root/scripts/qapi/gen.py
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2023-10-09 13:48:25 +0100
committerAlistair Francis <alistair.francis@wdc.com>2023-10-12 12:40:50 +1000
commit614c9466a238641480332b707a7a20a3593bdfb7 (patch)
tree3bdbc58703585d510c3a23999b6081604291503f /scripts/qapi/gen.py
parent9b9741c38f2a92eb99c74f2bf387fc7a12d7f8e2 (diff)
downloadfocaccia-qemu-614c9466a238641480332b707a7a20a3593bdfb7.tar.gz
focaccia-qemu-614c9466a238641480332b707a7a20a3593bdfb7.zip
target/riscv: Use env_archcpu for better performance
RISCV_CPU(cs) uses a checked cast.  When QOM cast debugging is enabled
this adds about 5% total overhead when emulating RV64 on x86-64 host.

Using a RISC-V guest with 16 vCPUs, 16 GB of guest RAM, virtio-blk
disk.  The guest has a copy of the qemu source tree.  The test
involves compiling the qemu source tree with 'make clean; time make -j16'.

Before making this change the compile step took 449 & 447 seconds over
two consecutive runs.

After making this change: 428 & 421 seconds.

The saving is over 5%.

Thanks: Paolo Bonzini
Thanks: Philippe Mathieu-Daudé
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20231009124859.3373696-2-rjones@redhat.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'scripts/qapi/gen.py')
0 files changed, 0 insertions, 0 deletions