From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH v2 00/11] qom: Constify class_data
Date: Mon, 10 Feb 2025 18:21:42 +0100 [thread overview]
Message-ID: <58008d22-a006-4e42-aed0-1cad51458a8a@linaro.org> (raw)
In-Reply-To: <443902c7-8697-44d4-9f7d-9bddb93607aa@linaro.org>
On 10/2/25 18:02, Richard Henderson wrote:
> On 2/10/25 05:46, Philippe Mathieu-Daudé wrote:
>> On 10/2/25 14:31, Philippe Mathieu-Daudé wrote:
>>> Since v1:
>>> - Make XtensaConfigList::config not const (Max)
>>> - Update / test rust (Paolo)
>>> - Constify InterfaceInfo[]
>>>
>>> Following Richard's suggestion [*], make QOM class data *const*.
>>>
>>> [*] https://lore.kernel.org/qemu-devel/f4ec871d-e759-44bc-
>>> a10b-872322330a3f@linaro.org/
>>
>> I'm only seeing +3KiB in .rodata for each binary...
>>
>>> Philippe Mathieu-Daudé (11):
>>> target/i386: Constify X86CPUModel uses
>>> target/sparc: Constify SPARCCPUClass::cpu_def
>>> target/xtensa: Finalize config in xtensa_register_core()
>>> target/riscv: Declare RISCVCPUClass::misa_mxl_max as RISCVMXL
>>> target/riscv: Convert misa_mxl_max using GLib macros
>>> hw: Declare various const data as 'const'
>>> hw: Make class data 'const'
>>> qom: Have class_base_init() take a const data argument
>>> qom: Have class_init() take a const data argument
>>> qom: Constify TypeInfo::class_data
>>> qom: Constify InterfaceInfo[] interfaces
>
> There is some additional data that can be made const after this [1],
> though still not lots. But the additional data that Paolo was going to
> add for 99 riscv bottles of beer on the wall would have been quite a bit
> more than 3k.
>
>
> r~
>
>
> [1]
>
> -static M48txxInfo m48txx_isa_info[] = {
> +static const M48txxInfo m48txx_isa_info[] = {
>
> -static M48txxInfo m48txx_sysbus_info[] = {
> +static const M48txxInfo m48txx_sysbus_info[] = {
>
> -static struct EHCIPCIInfo ehci_pci_info[] = {
> +static const struct EHCIPCIInfo ehci_pci_info[] = {
>
> -static UHCIInfo uhci_info[] = {
> +static const UHCIInfo uhci_info[] = {
>
> -static UHCIInfo uhci_info[] = {
> +static const UHCIInfo uhci_info[] = {
Doh, I took not for these but forgot 🤦🏻
> -static StreamSinkClass xilinx_axidma_data_stream_class = {
> +static const StreamSinkClass xilinx_axidma_data_stream_class = {
>
> -static StreamSinkClass xilinx_axidma_control_stream_class = {
> +static const StreamSinkClass xilinx_axidma_control_stream_class = {
>
next prev parent reply other threads:[~2025-02-10 17:22 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-10 13:31 [PATCH v2 00/11] qom: Constify class_data Philippe Mathieu-Daudé
2025-02-10 13:31 ` [PATCH v2 01/11] target/i386: Constify X86CPUModel uses Philippe Mathieu-Daudé
2025-02-10 16:30 ` Richard Henderson
2025-02-10 13:31 ` [PATCH v2 02/11] target/sparc: Constify SPARCCPUClass::cpu_def Philippe Mathieu-Daudé
2025-02-10 16:30 ` Richard Henderson
2025-02-10 13:31 ` [PATCH v2 03/11] target/xtensa: Finalize config in xtensa_register_core() Philippe Mathieu-Daudé
2025-02-10 16:30 ` Richard Henderson
2025-02-10 17:02 ` Max Filippov
2025-02-10 13:31 ` [PATCH v2 04/11] target/riscv: Declare RISCVCPUClass::misa_mxl_max as RISCVMXL Philippe Mathieu-Daudé
2025-02-10 16:31 ` Richard Henderson
2025-02-10 13:31 ` [PATCH v2 05/11] target/riscv: Convert misa_mxl_max using GLib macros Philippe Mathieu-Daudé
2025-02-10 16:34 ` Richard Henderson
2025-02-10 13:31 ` [PATCH v2 06/11] hw: Declare various const data as 'const' Philippe Mathieu-Daudé
2025-02-10 16:35 ` Richard Henderson
2025-02-10 13:31 ` [PATCH v2 07/11] hw: Make class data 'const' Philippe Mathieu-Daudé
2025-02-10 16:36 ` Richard Henderson
2025-02-10 13:31 ` [PATCH v2 08/11] qom: Have class_base_init() take a const data argument Philippe Mathieu-Daudé
2025-02-10 16:36 ` Richard Henderson
2025-02-10 13:31 ` [PATCH v2 09/11] qom: Have class_init() " Philippe Mathieu-Daudé
2025-02-10 16:51 ` Richard Henderson
2025-02-10 17:22 ` Philippe Mathieu-Daudé
2025-02-10 13:31 ` [PATCH v2 10/11] qom: Constify TypeInfo::class_data Philippe Mathieu-Daudé
2025-02-10 16:54 ` Richard Henderson
2025-02-10 13:31 ` [PATCH v2 11/11] qom: Constify InterfaceInfo[] interfaces Philippe Mathieu-Daudé
2025-02-10 16:55 ` Richard Henderson
2025-02-10 13:46 ` [PATCH v2 00/11] qom: Constify class_data Philippe Mathieu-Daudé
2025-02-10 17:02 ` Richard Henderson
2025-02-10 17:21 ` Philippe Mathieu-Daudé [this message]
2025-03-06 13:16 ` Philippe Mathieu-Daudé
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=58008d22-a006-4e42-aed0-1cad51458a8a@linaro.org \
--to=philmd@linaro.org \
--cc=pbonzini@redhat.com \
--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).