From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Cc: qemu-devel@nongnu.org,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
richard.henderson@linaro.org
Subject: Re: [PATCH] target-info: set target_arch statically
Date: Wed, 4 Feb 2026 09:10:30 +0000 [thread overview]
Message-ID: <aYMNBmUm81hMXulR@redhat.com> (raw)
In-Reply-To: <20260203194113.3026757-1-pierrick.bouvier@linaro.org>
On Tue, Feb 03, 2026 at 11:41:13AM -0800, Pierrick Bouvier wrote:
> target_arch() function will reparse target_name() every time if it was
> not set to a proper SYS_EMU_TARGET_* value (when using
> target-info-stub.c), which is not efficient.
>
> Since we want to preserve the constness of TargetInfo but C doesn't give
> us flexible compile time expressions, we simply set target_arch using a
> static constructor once instead.
>
> This was found when doing changes to virtio_access_is_big_endian()
> function, having an overhead of 50% after switching to runtime checks.
> With this, overhead left is around 3%, due to indirect function
> calls.
Hmm, this presumably needs to be backported to 10.1.0 / 10.2.0
stable branches, given that performance hit.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2026-02-04 9:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-03 19:41 [PATCH] target-info: set target_arch statically Pierrick Bouvier
2026-02-04 1:36 ` Richard Henderson
2026-02-04 16:36 ` Pierrick Bouvier
2026-02-04 22:22 ` Richard Henderson
2026-02-05 9:52 ` Markus Armbruster
2026-02-05 22:36 ` Richard Henderson
2026-02-06 6:58 ` Renaming targets (was: [PATCH] target-info: set target_arch statically) Markus Armbruster
2026-02-06 7:21 ` Renaming targets Pierrick Bouvier
2026-02-06 7:38 ` Markus Armbruster
2026-02-06 7:52 ` Pierrick Bouvier
2026-02-04 9:10 ` Daniel P. Berrangé [this message]
2026-02-04 16:38 ` [PATCH] target-info: set target_arch statically Pierrick Bouvier
2026-02-04 17:06 ` Anton Johansson via qemu development
2026-02-05 9:29 ` Markus Armbruster
2026-02-05 19:02 ` Pierrick Bouvier
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=aYMNBmUm81hMXulR@redhat.com \
--to=berrange@redhat.com \
--cc=philmd@linaro.org \
--cc=pierrick.bouvier@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.