]> Git Repo - qemu.git/commitdiff
Include generated QAPI headers less
authorMarkus Armbruster <[email protected]>
Mon, 12 Aug 2019 05:23:32 +0000 (07:23 +0200)
committerMarkus Armbruster <[email protected]>
Fri, 16 Aug 2019 11:31:51 +0000 (13:31 +0200)
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 <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Tested-by: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <20190812052359[email protected]>

18 files changed:
hw/core/qdev-properties.c
hw/i386/kvm/i8254.c
hw/ide/qdev.c
include/authz/listfile.h
include/block/block.h
include/hw/acpi/acpi_dev_interface.h
include/hw/mem/memory-device.h
include/hw/ppc/spapr_drc.h
include/hw/qdev-properties.h
include/hw/virtio/virtio-pmem.h
include/migration/global_state.h
include/qemu/job.h
include/sysemu/arch_init.h
include/ui/egl-helpers.h
monitor/monitor-internal.h
target/i386/monitor.c
target/i386/sev_i386.h
ui/vnc.h

index 81c97f48a7f09fea32ae6c5e491d78a960d6ac7a..8510ad14b0536d636eb37480726b4bb9e082504b 100644 (file)
@@ -3,6 +3,8 @@
 #include "hw/qdev.h"
 #include "qapi/error.h"
 #include "hw/pci/pci.h"
+#include "qapi/qapi-types-block.h"
+#include "qapi/qapi-types-misc.h"
 #include "qapi/qmp/qerror.h"
 #include "qemu/ctype.h"
 #include "qemu/error-report.h"
index c29956ab779f89bbdaad45c448bb4bff1dfc7c26..27e36a2abf6867d8219760dbe6ddfc59181a900d 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "qemu/osdep.h"
 #include <linux/kvm.h>
+#include "qapi/qapi-types-misc.h"
 #include "qapi/error.h"
 #include "qemu/module.h"
 #include "qemu/timer.h"
index 9d8502785d290bcd13fb103dc8d4b8d144e54ee2..eea22c09f4f2df5bdeece949e7c74337f0f0ac94 100644 (file)
@@ -21,6 +21,7 @@
 #include "hw/hw.h"
 #include "sysemu/dma.h"
 #include "qapi/error.h"
+#include "qapi/qapi-types-block.h"
 #include "qemu/error-report.h"
 #include "qemu/module.h"
 #include "hw/ide/internal.h"
index 33b728d873fbe3c0cd4a91014149a9473065dd95..24ae2e606cf7def3ccd005c130e0a18031e7f03a 100644 (file)
@@ -22,7 +22,6 @@
 #define QAUTHZ_LISTFILE_H
 
 #include "authz/list.h"
-#include "qapi/qapi-types-authz.h"
 #include "qemu/filemonitor.h"
 
 #define TYPE_QAUTHZ_LIST_FILE "authz-list-file"
index 50a07c1c33858aeb228215f61ab424ce5a268f55..ae79b70e2d025b9a342ea346acdccc94f7390863 100644 (file)
@@ -2,7 +2,6 @@
 #define BLOCK_H
 
 #include "block/aio.h"
-#include "qapi/qapi-types-block-core.h"
 #include "block/aio-wait.h"
 #include "qemu/iov.h"
 #include "qemu/coroutine.h"
index 43ff119179f1f20a4c58d4efa22f979d1c575daf..6465072b7d82b8d3b0bac34708f853a3ccca2eaf 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef ACPI_DEV_INTERFACE_H
 #define ACPI_DEV_INTERFACE_H
 
+#include "qapi/qapi-types-misc.h"
 #include "qom/object.h"
 #include "hw/boards.h"
 
index 0293a96abb237ac84d25cf914bebf3282553a144..2ada6e7bde02827ed71f2fc19175f4ed14f2a70b 100644 (file)
@@ -13,6 +13,7 @@
 #ifndef MEMORY_DEVICE_H
 #define MEMORY_DEVICE_H
 
+#include "qapi/qapi-types-misc.h"
 #include "qom/object.h"
 #include "hw/qdev.h"
 
index c2c543a59168d494f42b043db26364e1bd853e76..576c711b86fef498b9aa6a6791c53aaf64d2a4a2 100644 (file)
@@ -14,7 +14,6 @@
 #define HW_SPAPR_DRC_H
 
 #include <libfdt.h>
-#include "qapi/qapi-types-run-state.h"
 #include "qom/object.h"
 #include "sysemu/sysemu.h"
 #include "hw/qdev.h"
index 1eae5ab056d08599f754a1fb9c1d4644d354e04d..bb34a614e2cc719c1a502d0b7be59f3d59f36814 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef QEMU_QDEV_PROPERTIES_H
 #define QEMU_QDEV_PROPERTIES_H
 
-#include "qapi/qapi-types-block.h"
-#include "qapi/qapi-types-misc.h"
 #include "hw/qdev-core.h"
 
 /*** qdev-properties.c ***/
index 19b6ee6d758f0a79d6e6194b72ad2bb57f5442aa..8bf2ae780f02fcb10ae85112e498af55dd4077c0 100644 (file)
@@ -15,6 +15,7 @@
 #define HW_VIRTIO_PMEM_H
 
 #include "hw/virtio/virtio.h"
+#include "qapi/qapi-types-misc.h"
 #include "sysemu/hostmem.h"
 
 #define TYPE_VIRTIO_PMEM "virtio-pmem"
index fd22dd303457b7cb73ff8cb80f233deb5167069d..d307de8350ed214812dcca59c5ef260d42dfc8c5 100644 (file)
@@ -13,7 +13,6 @@
 #ifndef QEMU_MIGRATION_GLOBAL_STATE_H
 #define QEMU_MIGRATION_GLOBAL_STATE_H
 
-#include "qapi/qapi-types-run-state.h"
 #include "sysemu/sysemu.h"
 
 void register_global_state(void);
index 9e7cd1e4a059522d350cbcf018d77860859789e8..73c67d31755f49c1e8f2df167408a2db8e2b26fa 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef JOB_H
 #define JOB_H
 
-#include "qapi/qapi-types-block-core.h"
+#include "qapi/qapi-types-job.h"
 #include "qemu/queue.h"
 #include "qemu/coroutine.h"
 #include "block/aio.h"
index 10cbafe970ae0141c7d5cb18ba42ad095dd32232..62c6fe4cf12d7f019021dab56dba34f71630b835 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef QEMU_ARCH_INIT_H
 #define QEMU_ARCH_INIT_H
 
-#include "qapi/qapi-types-misc.h"
 
 enum {
     QEMU_ARCH_ALL = -1,
index 58bd3a1ec4bc6ff7da024f42cb84b208d270b9d7..dad19e9873fb801bd46f02d3025a2a41948c62bc 100644 (file)
@@ -4,7 +4,6 @@
 #include <epoxy/gl.h>
 #include <epoxy/egl.h>
 #include <gbm.h>
-#include "qapi/qapi-types-ui.h"
 #include "ui/console.h"
 #include "ui/shader.h"
 
index 7760b22ba3d86f529eba6ac5bde50021a38b4f33..d78f5ca19027c3174ff0e11e316267699af6058f 100644 (file)
@@ -27,7 +27,6 @@
 
 #include "chardev/char-fe.h"
 #include "monitor/monitor.h"
-#include "qapi/qapi-types-misc.h"
 #include "qapi/qmp/dispatch.h"
 #include "qapi/qmp/json-parser.h"
 #include "qemu/readline.h"
index 1f3b532fc221ea596a2d396ad00a72baf39b7fa1..9fb4d641d510789e845632d929055e5a49472f32 100644 (file)
@@ -33,6 +33,7 @@
 #include "sysemu/sev.h"
 #include "qapi/error.h"
 #include "sev_i386.h"
+#include "qapi/qapi-commands-misc-target.h"
 #include "qapi/qapi-commands-misc.h"
 
 /* Perform linear address sign extension */
index 55313441ae431858a56a157e9c1ca1369e4bb0f1..8ada9d385d0e8631f78c96a826598b3a01056825 100644 (file)
@@ -19,7 +19,7 @@
 #include "sysemu/kvm.h"
 #include "sysemu/sev.h"
 #include "qemu/error-report.h"
-#include "qapi/qapi-commands-misc-target.h"
+#include "qapi/qapi-types-misc-target.h"
 
 #define SEV_POLICY_NODBG        0x1
 #define SEV_POLICY_NOKS         0x2
index 2f84db314216508f984925c2d9a446b69252d512..18f1b1d6d04c6892152ab8da7df8dd945344f6cf 100644 (file)
--- a/ui/vnc.h
+++ b/ui/vnc.h
@@ -27,7 +27,6 @@
 #ifndef QEMU_VNC_H
 #define QEMU_VNC_H
 
-#include "qapi/qapi-types-ui.h"
 #include "qemu/queue.h"
 #include "qemu/thread.h"
 #include "ui/console.h"
This page took 0.0481 seconds and 4 git commands to generate.