[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 02/29] Include generated QAPI headers less
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2 02/29] Include generated QAPI headers less |
Date: |
Tue, 6 Aug 2019 16:50:59 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 |
On 8/6/19 10:14 AM, Markus Armbruster wrote:
> Some of the generated qapi-types-MODULE.h are included all over the
> place. Changing a QAPI type can trigger massive recompiling. Top
> scorers recompile more than 1000 out of some 6600 objects (not
> counting tests and objects that don't depend on qemu/osdep.h):
>
> 6300 qapi/qapi-builtin-types.h
> 5700 qapi/qapi-types-run-state.h
> 3900 qapi/qapi-types-common.h
> 3300 qapi/qapi-types-sockets.h
> 3000 qapi/qapi-types-misc.h
> 3000 qapi/qapi-types-crypto.h
> 3000 qapi/qapi-types-job.h
> 3000 qapi/qapi-types-block-core.h
> 2800 qapi/qapi-types-block.h
> 1300 qapi/qapi-types-net.h
>
> Clean up headers to include generated QAPI headers only where needed.
> Impact is negligible except for hw/qdev-properties.h.
>
> This header includes qapi/qapi-types-block.h and
> qapi/qapi-types-misc.h. They are used only in expansions of property
> definition macros such as DEFINE_PROP_BLOCKDEV_ON_ERROR() and
> DEFINE_PROP_OFF_AUTO(). Moving their inclusion from
> hw/qdev-properties.h to the users of these macros avoids pointless
> recompiles. This is how other property definition macros, such as
> DEFINE_PROP_NETDEV(), already work.
>
> Improves things for some of the top scorers:
>
> 3600 qapi/qapi-types-common.h
> 2800 qapi/qapi-types-sockets.h
> 900 qapi/qapi-types-misc.h
> 2200 qapi/qapi-types-crypto.h
> 2100 qapi/qapi-types-job.h
> 2100 qapi/qapi-types-block-core.h
> 270 qapi/qapi-types-block.h
>
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v2 00/29] Tame a few "touch this, recompile the world" headers, Markus Armbruster, 2019/08/06
- [Qemu-devel] [PATCH v2 03/29] qapi: Split error.json off common.json, Markus Armbruster, 2019/08/06
- [Qemu-devel] [PATCH v2 04/29] memory: Fix type of IOMMUMemoryRegionClass member @parent_class, Markus Armbruster, 2019/08/06
- [Qemu-devel] [PATCH v2 05/29] queue: Drop superfluous #include qemu/atomic.h, Markus Armbruster, 2019/08/06
- [Qemu-devel] [PATCH v2 02/29] Include generated QAPI headers less, Markus Armbruster, 2019/08/06
- [Qemu-devel] [PATCH v2 09/29] Include migration/qemu-file-types.h a lot less, Markus Armbruster, 2019/08/06
- [Qemu-devel] [PATCH v2 13/29] Clean up inclusion of exec/cpu-common.h, Markus Armbruster, 2019/08/06
- [Qemu-devel] [PATCH v2 11/29] typedefs: Separate incomplete types and function types, Markus Armbruster, 2019/08/06
- [Qemu-devel] [PATCH v2 01/29] include: Make headers more self-contained, Markus Armbruster, 2019/08/06