performance degradation in tcg since Meson switch

Bug #1895703 reported by Philippe Mathieu-Daudé
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Undecided
Unassigned

Bug Description

The buildsys conversion to Meson (1d806cef0e3..7fd51e68c34)
introduced a degradation in performance in some TCG targets:

--------------------------------------------------------
Test Program: matmult_double
--------------------------------------------------------
Target Instructions Previous Latest
                                     1d806cef 7fd51e68
---------- -------------------- ---------- ----------
alpha 3 233 957 639 ----- +7.472%
m68k 3 919 110 506 ----- +18.433%
--------------------------------------------------------

Original report from Ahmed Karaman with further testing done
by Aleksandar Markovic:
https://<email address hidden>/msg740279.html

Tags: buildsys tcg
tags: added: buildsys tcg
Revision history for this message
Paolo Bonzini (bonzini) wrote :

Can I get a sample statically linked m68k binary that exhibits this effect?

Revision history for this message
Ahmed Karaman (ahmedkrmn) wrote :
Revision history for this message
Paolo Bonzini (bonzini) wrote :

I get

$ qemu-m68k ./matmult_double-m68k
Error while loading /home/pbonzini/matmult_double-m68k: Permission denied

Revision history for this message
Peter Maydell (pmaydell) wrote :

Paolo: what are the permissions on matmult_double-m68k on your local fs? (needs to be readable/executable by you)

Revision history for this message
Paolo Bonzini (bonzini) wrote :

Uff, of course...

Revision history for this message
Paolo Bonzini (bonzini) wrote :

This patch shold fix the regression:

diff --git a/configure b/configure
index 0004c46525..0786144043 100755
--- a/configure
+++ b/configure
@@ -7414,6 +7414,7 @@ NINJA=${ninja:-$PWD/ninjatool} $meson setup \
         -Dwerror=$(if test "$werror" = yes; then echo true; else echo false; fi) \
         -Dstrip=$(if test "$strip_opt" = yes; then echo true; else echo false; fi) \
         -Db_pie=$(if test "$pie" = yes; then echo true; else echo false; fi) \
+ -Db_staticpic=$(if test "$pie" = yes; then echo true; else echo false; fi) \
         -Db_coverage=$(if test "$gcov" = yes; then echo true; else echo false; fi) \
  -Dmalloc=$malloc -Dmalloc_trim=$malloc_trim -Dsparse=$sparse \
  -Dkvm=$kvm -Dhax=$hax -Dwhpx=$whpx -Dhvf=$hvf \

Revision history for this message
Peter Maydell (pmaydell) wrote :

This was fixed initially by commit 0c3dd50eaecbfe2, which is the change suggested in Paolo's comment #6, and then refined by commit a5cb7c5afe717d4.

Changed in qemu:
status: New → Fix Committed
Revision history for this message
Thomas Huth (th-huth) wrote :

Released with QEMU v5.2.0.

Changed in qemu:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.