aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2019-08-12 07:23:32 +0200
committerMarkus Armbruster <armbru@redhat.com>2019-08-16 13:31:51 +0200
commit2ae16a6aa4ce688e2ee25dec3ad2f023bece0b14 (patch)
treec522f0f34558a2a4e621216300e812674fb51c17 /include
parentec150c7e09071bcf51bfaa8071fe23efb6df69f7 (diff)
Include generated QAPI headers less
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 <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190812052359.30071-3-armbru@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/authz/listfile.h1
-rw-r--r--include/block/block.h1
-rw-r--r--include/hw/acpi/acpi_dev_interface.h1
-rw-r--r--include/hw/mem/memory-device.h1
-rw-r--r--include/hw/ppc/spapr_drc.h1
-rw-r--r--include/hw/qdev-properties.h2
-rw-r--r--include/hw/virtio/virtio-pmem.h1
-rw-r--r--include/migration/global_state.h1
-rw-r--r--include/qemu/job.h2
-rw-r--r--include/sysemu/arch_init.h1
-rw-r--r--include/ui/egl-helpers.h1
11 files changed, 4 insertions, 9 deletions
diff --git a/include/authz/listfile.h b/include/authz/listfile.h
index 33b728d873..24ae2e606c 100644
--- a/include/authz/listfile.h
+++ b/include/authz/listfile.h
@@ -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"
diff --git a/include/block/block.h b/include/block/block.h
index 50a07c1c33..ae79b70e2d 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -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"
diff --git a/include/hw/acpi/acpi_dev_interface.h b/include/hw/acpi/acpi_dev_interface.h
index 43ff119179..6465072b7d 100644
--- a/include/hw/acpi/acpi_dev_interface.h
+++ b/include/hw/acpi/acpi_dev_interface.h
@@ -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"
diff --git a/include/hw/mem/memory-device.h b/include/hw/mem/memory-device.h
index 0293a96abb..2ada6e7bde 100644
--- a/include/hw/mem/memory-device.h
+++ b/include/hw/mem/memory-device.h
@@ -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"
diff --git a/include/hw/ppc/spapr_drc.h b/include/hw/ppc/spapr_drc.h
index c2c543a591..576c711b86 100644
--- a/include/hw/ppc/spapr_drc.h
+++ b/include/hw/ppc/spapr_drc.h
@@ -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"
diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h
index 1eae5ab056..bb34a614e2 100644
--- a/include/hw/qdev-properties.h
+++ b/include/hw/qdev-properties.h
@@ -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 ***/
diff --git a/include/hw/virtio/virtio-pmem.h b/include/hw/virtio/virtio-pmem.h
index 19b6ee6d75..8bf2ae780f 100644
--- a/include/hw/virtio/virtio-pmem.h
+++ b/include/hw/virtio/virtio-pmem.h
@@ -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"
diff --git a/include/migration/global_state.h b/include/migration/global_state.h
index fd22dd3034..d307de8350 100644
--- a/include/migration/global_state.h
+++ b/include/migration/global_state.h
@@ -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);
diff --git a/include/qemu/job.h b/include/qemu/job.h
index 9e7cd1e4a0..73c67d3175 100644
--- a/include/qemu/job.h
+++ b/include/qemu/job.h
@@ -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"
diff --git a/include/sysemu/arch_init.h b/include/sysemu/arch_init.h
index 10cbafe970..62c6fe4cf1 100644
--- a/include/sysemu/arch_init.h
+++ b/include/sysemu/arch_init.h
@@ -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,
diff --git a/include/ui/egl-helpers.h b/include/ui/egl-helpers.h
index 58bd3a1ec4..dad19e9873 100644
--- a/include/ui/egl-helpers.h
+++ b/include/ui/egl-helpers.h
@@ -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"