aboutsummaryrefslogtreecommitdiff
path: root/target
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 /target
parentec150c7e09071bcf51bfaa8071fe23efb6df69f7 (diff)
downloadqemu-2ae16a6aa4ce688e2ee25dec3ad2f023bece0b14.zip
qemu-2ae16a6aa4ce688e2ee25dec3ad2f023bece0b14.tar.gz
qemu-2ae16a6aa4ce688e2ee25dec3ad2f023bece0b14.tar.bz2
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 'target')
-rw-r--r--target/i386/monitor.c1
-rw-r--r--target/i386/sev_i386.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/target/i386/monitor.c b/target/i386/monitor.c
index 1f3b532..9fb4d64 100644
--- a/target/i386/monitor.c
+++ b/target/i386/monitor.c
@@ -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 */
diff --git a/target/i386/sev_i386.h b/target/i386/sev_i386.h
index 5531344..8ada9d3 100644
--- a/target/i386/sev_i386.h
+++ b/target/i386/sev_i386.h
@@ -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