summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorMarkus Armbruster2018-02-11 10:36:01 +0100
committerEric Blake2018-03-02 20:45:50 +0100
commit9af2398977a78d37bf184d6ff6bd04c72bfbf006 (patch)
tree9d73bacd7a689fb319b81f9fdaa65e39fc21fd89 /block
parentqapi: Generate separate .h, .c for each module (diff)
downloadqemu-9af2398977a78d37bf184d6ff6bd04c72bfbf006.tar.gz
qemu-9af2398977a78d37bf184d6ff6bd04c72bfbf006.tar.xz
qemu-9af2398977a78d37bf184d6ff6bd04c72bfbf006.zip
Include less of the generated modular QAPI headers
In my "build everything" tree, a change to the types in qapi-schema.json triggers a recompile of about 4800 out of 5100 objects. The previous commit split up qmp-commands.h, qmp-event.h, qmp-visit.h, qapi-types.h. Each of these headers still includes all its shards. Reduce compile time by including just the shards we actually need. To illustrate the benefits: adding a type to qapi/migration.json now recompiles some 2300 instead of 4800 objects. The next commit will improve it further. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180211093607.27351-24-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> [eblake: rebase to master] Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/block-backend.c2
-rw-r--r--block/crypto.c2
-rw-r--r--block/nbd.c2
-rw-r--r--block/nfs.c2
-rw-r--r--block/qapi.c4
-rw-r--r--block/qcow2.c3
-rw-r--r--block/quorum.c2
-rw-r--r--block/sheepdog.c2
-rw-r--r--block/ssh.c2
-rw-r--r--block/throttle-groups.c2
-rw-r--r--block/write-threshold.c4
11 files changed, 13 insertions, 14 deletions
diff --git a/block/block-backend.c b/block/block-backend.c
index 0266ac990b..94ffbb6a60 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -17,8 +17,8 @@
#include "block/throttle-groups.h"
#include "sysemu/blockdev.h"
#include "sysemu/sysemu.h"
-#include "qapi-event.h"
#include "qapi/error.h"
+#include "qapi/qapi-events-block.h"
#include "qemu/id.h"
#include "qemu/option.h"
#include "trace.h"
diff --git a/block/crypto.c b/block/crypto.c
index 3df66947c5..aeac482e7b 100644
--- a/block/crypto.c
+++ b/block/crypto.c
@@ -24,9 +24,9 @@
#include "sysemu/block-backend.h"
#include "crypto/block.h"
#include "qapi/opts-visitor.h"
+#include "qapi/qapi-visit-crypto.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qobject-input-visitor.h"
-#include "qapi-visit.h"
#include "qapi/error.h"
#include "qemu/option.h"
#include "block/crypto.h"
diff --git a/block/nbd.c b/block/nbd.c
index 69b5fd5e8f..d4e4172c08 100644
--- a/block/nbd.c
+++ b/block/nbd.c
@@ -33,7 +33,7 @@
#include "block/block_int.h"
#include "qemu/module.h"
#include "qemu/option.h"
-#include "qapi-visit.h"
+#include "qapi/qapi-visit-sockets.h"
#include "qapi/qobject-input-visitor.h"
#include "qapi/qobject-output-visitor.h"
#include "qapi/qmp/qdict.h"
diff --git a/block/nfs.c b/block/nfs.c
index 6576a73d6e..bbdb4fadad 100644
--- a/block/nfs.c
+++ b/block/nfs.c
@@ -35,9 +35,9 @@
#include "qemu/uri.h"
#include "qemu/cutils.h"
#include "sysemu/sysemu.h"
+#include "qapi/qapi-visit-block-core.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qstring.h"
-#include "qapi-visit.h"
#include "qapi/qobject-input-visitor.h"
#include "qapi/qobject-output-visitor.h"
#include <nfsc/libnfs.h>
diff --git a/block/qapi.c b/block/qapi.c
index 1fdeb1ef2f..4c9923d262 100644
--- a/block/qapi.c
+++ b/block/qapi.c
@@ -27,10 +27,10 @@
#include "block/block_int.h"
#include "block/throttle-groups.h"
#include "block/write-threshold.h"
-#include "qmp-commands.h"
-#include "qapi-visit.h"
#include "qapi/error.h"
+#include "qapi/qapi-commands-block-core.h"
#include "qapi/qobject-output-visitor.h"
+#include "qapi/qapi-visit-block-core.h"
#include "qapi/qmp/qbool.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qlist.h"
diff --git a/block/qcow2.c b/block/qcow2.c
index fd79c0ebaa..3dd098b74f 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -30,15 +30,14 @@
#include "block/qcow2.h"
#include "qemu/error-report.h"
#include "qapi/error.h"
+#include "qapi/qapi-events-block-core.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qstring.h"
-#include "qapi-event.h"
#include "trace.h"
#include "qemu/option_int.h"
#include "qemu/cutils.h"
#include "qemu/bswap.h"
#include "qapi/opts-visitor.h"
-#include "qapi-visit.h"
#include "block/crypto.h"
/*
diff --git a/block/quorum.c b/block/quorum.c
index 19f1c34425..14333c18aa 100644
--- a/block/quorum.c
+++ b/block/quorum.c
@@ -18,11 +18,11 @@
#include "qemu/option.h"
#include "block/block_int.h"
#include "qapi/error.h"
+#include "qapi/qapi-events-block.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qerror.h"
#include "qapi/qmp/qlist.h"
#include "qapi/qmp/qstring.h"
-#include "qapi-event.h"
#include "crypto/hash.h"
#define HASH_LENGTH 32
diff --git a/block/sheepdog.c b/block/sheepdog.c
index ac02b10fe0..215223053b 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -13,8 +13,8 @@
*/
#include "qemu/osdep.h"
-#include "qapi-visit.h"
#include "qapi/error.h"
+#include "qapi/qapi-visit-sockets.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qobject-input-visitor.h"
#include "qemu/uri.h"
diff --git a/block/ssh.c b/block/ssh.c
index b63addcf94..b11d4c5e86 100644
--- a/block/ssh.c
+++ b/block/ssh.c
@@ -34,7 +34,7 @@
#include "qemu/cutils.h"
#include "qemu/sockets.h"
#include "qemu/uri.h"
-#include "qapi-visit.h"
+#include "qapi/qapi-visit-sockets.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qstring.h"
#include "qapi/qobject-input-visitor.h"
diff --git a/block/throttle-groups.c b/block/throttle-groups.c
index f26bcb5eee..36cc0430c3 100644
--- a/block/throttle-groups.c
+++ b/block/throttle-groups.c
@@ -30,7 +30,7 @@
#include "qemu/thread.h"
#include "sysemu/qtest.h"
#include "qapi/error.h"
-#include "qapi-visit.h"
+#include "qapi/qapi-visit-block-core.h"
#include "qom/object.h"
#include "qom/object_interfaces.h"
diff --git a/block/write-threshold.c b/block/write-threshold.c
index db3de0fa6d..1d48fc2077 100644
--- a/block/write-threshold.c
+++ b/block/write-threshold.c
@@ -15,9 +15,9 @@
#include "qemu/coroutine.h"
#include "block/write-threshold.h"
#include "qemu/notify.h"
-#include "qapi-event.h"
#include "qapi/error.h"
-#include "qmp-commands.h"
+#include "qapi/qapi-commands-block-core.h"
+#include "qapi/qapi-events-block-core.h"
uint64_t bdrv_write_threshold_get(const BlockDriverState *bs)
{