qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: "Alex Bennée" <alex.bennee@linaro.org>, qemu-devel@nongnu.org
Cc: Richard Henderson <richard.henderson@linaro.org>,
	BALATON Zoltan <balaton@eik.bme.hu>,
	Aurelien Jarno <aurelien@aurel32.net>,
	Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [RFC PATCH] softfloat: use QEMU_FLATTEN to avoid mistaken isra inlining
Date: Tue, 23 May 2023 16:18:53 +0200	[thread overview]
Message-ID: <7a23a751-a00f-1a30-481e-97add73b3f20@linaro.org> (raw)
In-Reply-To: <20230523131107.3680641-1-alex.bennee@linaro.org>

On 23/5/23 15:11, Alex Bennée wrote:
> Balton discovered that asserts for the extract/deposit calls had a

Zoltan

> significant impact on a lame benchmark on qemu-ppc. Replicating with:
> 
>    ./qemu-ppc64 ~/lsrc/tests/lame.git-svn/builds/ppc64/frontend/lame \
>      -h pts-trondheim-3.wav pts-trondheim-3.mp3
> 
> showed up the pack/unpack routines not eliding the assert checks as it
> should have done causing them to prominently figure in the profile:

Worth mentioning "even using --disable-debug"?

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

>    11.44%  qemu-ppc64  qemu-ppc64               [.] unpack_raw64.isra.0
>    11.03%  qemu-ppc64  qemu-ppc64               [.] parts64_uncanon_normal
>     8.26%  qemu-ppc64  qemu-ppc64               [.] helper_compute_fprf_float64
>     6.75%  qemu-ppc64  qemu-ppc64               [.] do_float_check_status
>     5.34%  qemu-ppc64  qemu-ppc64               [.] parts64_muladd
>     4.75%  qemu-ppc64  qemu-ppc64               [.] pack_raw64.isra.0
>     4.38%  qemu-ppc64  qemu-ppc64               [.] parts64_canonicalize
>     3.62%  qemu-ppc64  qemu-ppc64               [.] float64r32_round_pack_canonical
> 
> After this patch the same test runs 31 seconds faster with a profile
> where the generated code dominates more:
> 
> +   14.12%     0.00%  qemu-ppc64  [unknown]                [.] 0x0000004000619420
> +   13.30%     0.00%  qemu-ppc64  [unknown]                [.] 0x0000004000616850
> +   12.58%    12.19%  qemu-ppc64  qemu-ppc64               [.] parts64_uncanon_normal
> +   10.62%     0.00%  qemu-ppc64  [unknown]                [.] 0x000000400061bf70
> +    9.91%     9.73%  qemu-ppc64  qemu-ppc64               [.] helper_compute_fprf_float64
> +    7.84%     7.82%  qemu-ppc64  qemu-ppc64               [.] do_float_check_status
> +    6.47%     5.78%  qemu-ppc64  qemu-ppc64               [.] parts64_canonicalize.constprop.0
> +    6.46%     0.00%  qemu-ppc64  [unknown]                [.] 0x0000004000620130
> +    6.42%     0.00%  qemu-ppc64  [unknown]                [.] 0x0000004000619400
> +    6.17%     6.04%  qemu-ppc64  qemu-ppc64               [.] parts64_muladd
> +    5.85%     0.00%  qemu-ppc64  [unknown]                [.] 0x00000040006167e0
> +    5.74%     0.00%  qemu-ppc64  [unknown]                [.] 0x0000b693fcffffd3
> +    5.45%     4.78%  qemu-ppc64  qemu-ppc64               [.] float64r32_round_pack_canonical
> 
> Suggested-by: Richard Henderson <richard.henderson@linaro.org>
> Message-Id: <ec9cfe5a-d5f2-466d-34dc-c35817e7e010@linaro.org>
> [AJB: Patchified rth's suggestion]
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Cc: BALATON Zoltan <balaton@eik.bme.hu>
> ---
>   fpu/softfloat.c | 22 +++++++++++-----------
>   1 file changed, 11 insertions(+), 11 deletions(-)




  parent reply	other threads:[~2023-05-23 14:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-23 13:11 [RFC PATCH] softfloat: use QEMU_FLATTEN to avoid mistaken isra inlining Alex Bennée
2023-05-23 13:57 ` BALATON Zoltan
2023-05-23 14:33   ` Richard Henderson
2023-05-23 17:51     ` BALATON Zoltan
2023-05-25 13:22     ` Paolo Bonzini
2023-05-25 13:30       ` Richard Henderson
2023-05-25 23:15       ` BALATON Zoltan
2023-05-25 13:30     ` Paolo Bonzini
2023-05-25 23:19       ` BALATON Zoltan
2023-05-26 11:56   ` BALATON Zoltan
2023-06-22 20:55   ` BALATON Zoltan
2023-06-23  5:50     ` Richard Henderson
2023-05-23 14:18 ` Philippe Mathieu-Daudé [this message]
2023-05-23 15:34 ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7a23a751-a00f-1a30-481e-97add73b3f20@linaro.org \
    --to=philmd@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=aurelien@aurel32.net \
    --cc=balaton@eik.bme.hu \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).