diff options
author | Markus Armbruster <armbru@redhat.com> | 2018-02-11 10:36:01 +0100 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2018-03-02 13:45:50 -0600 |
commit | 9af2398977a78d37bf184d6ff6bd04c72bfbf006 (patch) | |
tree | 9d73bacd7a689fb319b81f9fdaa65e39fc21fd89 /include | |
parent | 252dc3105fc494182e236e97fe20f2d6b1d652cb (diff) | |
download | qemu-9af2398977a78d37bf184d6ff6bd04c72bfbf006.zip qemu-9af2398977a78d37bf184d6ff6bd04c72bfbf006.tar.gz qemu-9af2398977a78d37bf184d6ff6bd04c72bfbf006.tar.bz2 |
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 'include')
36 files changed, 36 insertions, 20 deletions
diff --git a/include/block/block.h b/include/block/block.h index 19b3ab9..fac401b 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -2,7 +2,7 @@ #define BLOCK_H #include "block/aio.h" -#include "qapi-types.h" +#include "qapi/qapi-types-block-core.h" #include "qemu/iov.h" #include "qemu/coroutine.h" #include "block/accounting.h" diff --git a/include/block/dirty-bitmap.h b/include/block/dirty-bitmap.h index e3f4bbf..09efec6 100644 --- a/include/block/dirty-bitmap.h +++ b/include/block/dirty-bitmap.h @@ -2,7 +2,7 @@ #define BLOCK_DIRTY_BITMAP_H #include "qemu-common.h" -#include "qapi-types.h" +#include "qapi/qapi-types-block-core.h" #include "qemu/hbitmap.h" BdrvDirtyBitmap *bdrv_create_dirty_bitmap(BlockDriverState *bs, diff --git a/include/block/nbd.h b/include/block/nbd.h index 495564c..2285637 100644 --- a/include/block/nbd.h +++ b/include/block/nbd.h @@ -20,7 +20,7 @@ #ifndef NBD_H #define NBD_H - +#include "qapi/qapi-types-block.h" #include "io/channel-socket.h" #include "crypto/tlscreds.h" diff --git a/include/chardev/char.h b/include/chardev/char.h index a381dc3..ebf1e0b 100644 --- a/include/chardev/char.h +++ b/include/chardev/char.h @@ -1,6 +1,7 @@ #ifndef QEMU_CHAR_H #define QEMU_CHAR_H +#include "qapi/qapi-types-char.h" #include "qemu/main-loop.h" #include "qemu/bitmap.h" #include "qom/object.h" diff --git a/include/crypto/cipher.h b/include/crypto/cipher.h index 984fb82..bce2d4c 100644 --- a/include/crypto/cipher.h +++ b/include/crypto/cipher.h @@ -21,7 +21,7 @@ #ifndef QCRYPTO_CIPHER_H #define QCRYPTO_CIPHER_H -#include "qapi-types.h" +#include "qapi/qapi-types-crypto.h" typedef struct QCryptoCipher QCryptoCipher; diff --git a/include/crypto/hash.h b/include/crypto/hash.h index ca3267f..077ac7b 100644 --- a/include/crypto/hash.h +++ b/include/crypto/hash.h @@ -21,7 +21,7 @@ #ifndef QCRYPTO_HASH_H #define QCRYPTO_HASH_H -#include "qapi-types.h" +#include "qapi/qapi-types-crypto.h" /* See also "QCryptoHashAlgorithm" defined in qapi/crypto.json */ diff --git a/include/crypto/hmac.h b/include/crypto/hmac.h index 5e88905..aa3c97a 100644 --- a/include/crypto/hmac.h +++ b/include/crypto/hmac.h @@ -12,7 +12,7 @@ #ifndef QCRYPTO_HMAC_H #define QCRYPTO_HMAC_H -#include "qapi-types.h" +#include "qapi/qapi-types-crypto.h" typedef struct QCryptoHmac QCryptoHmac; struct QCryptoHmac { diff --git a/include/crypto/secret.h b/include/crypto/secret.h index 07a963e..edd0e13 100644 --- a/include/crypto/secret.h +++ b/include/crypto/secret.h @@ -21,6 +21,7 @@ #ifndef QCRYPTO_SECRET_H #define QCRYPTO_SECRET_H +#include "qapi/qapi-types-crypto.h" #include "qom/object.h" #define TYPE_QCRYPTO_SECRET "secret" diff --git a/include/crypto/tlscreds.h b/include/crypto/tlscreds.h index ad47d88..6b011e1 100644 --- a/include/crypto/tlscreds.h +++ b/include/crypto/tlscreds.h @@ -21,6 +21,7 @@ #ifndef QCRYPTO_TLSCREDS_H #define QCRYPTO_TLSCREDS_H +#include "qapi/qapi-types-crypto.h" #include "qom/object.h" #ifdef CONFIG_GNUTLS diff --git a/include/hw/block/block.h b/include/hw/block/block.h index f532d10..d4f4dff 100644 --- a/include/hw/block/block.h +++ b/include/hw/block/block.h @@ -12,7 +12,7 @@ #define HW_BLOCK_H #include "qemu-common.h" -#include "qapi-types.h" +#include "qapi/qapi-types-block-core.h" /* Configuration */ diff --git a/include/hw/block/fdc.h b/include/hw/block/fdc.h index 68a0c90..3b813c7 100644 --- a/include/hw/block/fdc.h +++ b/include/hw/block/fdc.h @@ -2,7 +2,7 @@ #define HW_FDC_H #include "qemu-common.h" -#include "qapi-types.h" +#include "qapi/qapi-types-block.h" /* fdc.c */ #define MAX_FD 2 diff --git a/include/hw/ppc/spapr_drc.h b/include/hw/ppc/spapr_drc.h index f8d9f5b..f6ff32e 100644 --- a/include/hw/ppc/spapr_drc.h +++ b/include/hw/ppc/spapr_drc.h @@ -14,6 +14,7 @@ #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 1d61a35..40c2c8a 100644 --- a/include/hw/qdev-properties.h +++ b/include/hw/qdev-properties.h @@ -1,6 +1,7 @@ #ifndef QEMU_QDEV_PROPERTIES_H #define QEMU_QDEV_PROPERTIES_H +#include "qapi-types.h" #include "hw/qdev-core.h" /*** qdev-properties.c ***/ diff --git a/include/io/dns-resolver.h b/include/io/dns-resolver.h index 2f69c08..1a16218 100644 --- a/include/io/dns-resolver.h +++ b/include/io/dns-resolver.h @@ -22,6 +22,7 @@ #define QIO_DNS_RESOLVER_H #include "qemu-common.h" +#include "qapi/qapi-types-sockets.h" #include "qom/object.h" #include "io/task.h" diff --git a/include/migration/colo.h b/include/migration/colo.h index 50ace16..2fe48ad 100644 --- a/include/migration/colo.h +++ b/include/migration/colo.h @@ -14,7 +14,7 @@ #define QEMU_COLO_H #include "qemu-common.h" -#include "qapi-types.h" +#include "qapi/qapi-types-migration.h" void colo_info_init(void); diff --git a/include/migration/failover.h b/include/migration/failover.h index ad91ef2..4c37218 100644 --- a/include/migration/failover.h +++ b/include/migration/failover.h @@ -14,7 +14,7 @@ #define QEMU_FAILOVER_H #include "qemu-common.h" -#include "qapi-types.h" +#include "qapi/qapi-types-migration.h" void failover_init_state(void); FailoverStatus failover_set_state(FailoverStatus old_state, diff --git a/include/migration/global_state.h b/include/migration/global_state.h index d307de8..fd22dd3 100644 --- a/include/migration/global_state.h +++ b/include/migration/global_state.h @@ -13,6 +13,7 @@ #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/monitor/monitor.h b/include/monitor/monitor.h index ad64ad8..50f7cea 100644 --- a/include/monitor/monitor.h +++ b/include/monitor/monitor.h @@ -3,6 +3,7 @@ #include "qemu-common.h" #include "block/block.h" +#include "qapi-types.h" #include "qemu/readline.h" extern Monitor *cur_mon; diff --git a/include/net/filter.h b/include/net/filter.h index 0c4a2ea..435acd6 100644 --- a/include/net/filter.h +++ b/include/net/filter.h @@ -9,6 +9,7 @@ #ifndef QEMU_NET_FILTER_H #define QEMU_NET_FILTER_H +#include "qapi/qapi-types-net.h" #include "qom/object.h" #include "qemu-common.h" #include "net/queue.h" diff --git a/include/net/net.h b/include/net/net.h index 3fc48e4..7276430 100644 --- a/include/net/net.h +++ b/include/net/net.h @@ -2,7 +2,7 @@ #define QEMU_NET_H #include "qemu/queue.h" -#include "qapi-types.h" +#include "qapi/qapi-types-net.h" #include "net/queue.h" #include "migration/vmstate.h" diff --git a/include/qapi/clone-visitor.h b/include/qapi/clone-visitor.h index b119d3d..5b665ee 100644 --- a/include/qapi/clone-visitor.h +++ b/include/qapi/clone-visitor.h @@ -12,7 +12,6 @@ #define QAPI_CLONE_VISITOR_H #include "qapi/visitor.h" -#include "qapi-visit.h" /* * The clone visitor is for direct use only by the QAPI_CLONE() macro; diff --git a/include/qapi/error.h b/include/qapi/error.h index c2115a6..bcb86a7 100644 --- a/include/qapi/error.h +++ b/include/qapi/error.h @@ -115,7 +115,7 @@ #ifndef ERROR_H #define ERROR_H -#include "qapi-types.h" +#include "qapi/qapi-types-common.h" /* * Overall category of an error. diff --git a/include/qapi/qmp/qobject.h b/include/qapi/qmp/qobject.h index 38ac688..a2964fb 100644 --- a/include/qapi/qmp/qobject.h +++ b/include/qapi/qmp/qobject.h @@ -32,7 +32,7 @@ #ifndef QOBJECT_H #define QOBJECT_H -#include "qapi-types.h" +#include "qapi-builtin-types.h" struct QObject { QType type; diff --git a/include/qapi/visitor.h b/include/qapi/visitor.h index ecff296..9e57508 100644 --- a/include/qapi/visitor.h +++ b/include/qapi/visitor.h @@ -15,7 +15,7 @@ #ifndef QAPI_VISITOR_H #define QAPI_VISITOR_H -#include "qapi-types.h" +#include "qapi-builtin-types.h" /* * The QAPI schema defines both a set of C data types, and a QMP wire diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h index 8889bcb..e88d4c3 100644 --- a/include/qemu/sockets.h +++ b/include/qemu/sockets.h @@ -9,7 +9,7 @@ int inet_aton(const char *cp, struct in_addr *ia); #endif /* !_WIN32 */ -#include "qapi-types.h" +#include "qapi/qapi-types-sockets.h" /* misc helpers */ int qemu_socket(int domain, int type, int protocol); diff --git a/include/qemu/throttle.h b/include/qemu/throttle.h index 03d45f4..abeb886 100644 --- a/include/qemu/throttle.h +++ b/include/qemu/throttle.h @@ -26,7 +26,7 @@ #define THROTTLE_H #include "qemu-common.h" -#include "qapi-types.h" +#include "qapi/qapi-types-block-core.h" #include "qemu/timer.h" #define THROTTLE_VALUE_MAX 1000000000000000LL diff --git a/include/qom/cpu.h b/include/qom/cpu.h index aff88fa..dc6d495 100644 --- a/include/qom/cpu.h +++ b/include/qom/cpu.h @@ -24,6 +24,7 @@ #include "disas/bfd.h" #include "exec/hwaddr.h" #include "exec/memattrs.h" +#include "qapi/qapi-types-run-state.h" #include "qemu/bitmap.h" #include "qemu/queue.h" #include "qemu/thread.h" diff --git a/include/qom/object.h b/include/qom/object.h index dc73d59..5b5c016 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -14,7 +14,7 @@ #ifndef QEMU_OBJECT_H #define QEMU_OBJECT_H -#include "qapi-types.h" +#include "qapi-builtin-types.h" #include "qemu/queue.h" struct TypeImpl; diff --git a/include/sysemu/dump.h b/include/sysemu/dump.h index c14bcfe..2424e31 100644 --- a/include/sysemu/dump.h +++ b/include/sysemu/dump.h @@ -14,6 +14,8 @@ #ifndef DUMP_H #define DUMP_H +#include "qapi-types.h" + #define MAKEDUMPFILE_SIGNATURE "makedumpfile" #define MAX_SIZE_MDF_HEADER (4096) /* max size of makedumpfile_header */ #define TYPE_FLAT_HEADER (1) /* type of flattened format */ diff --git a/include/sysemu/hostmem.h b/include/sysemu/hostmem.h index d5ab0b9..e1efaf0 100644 --- a/include/sysemu/hostmem.h +++ b/include/sysemu/hostmem.h @@ -14,6 +14,7 @@ #define SYSEMU_HOSTMEM_H #include "sysemu/sysemu.h" /* for MAX_NODES */ +#include "qapi-types.h" #include "qom/object.h" #include "exec/memory.h" #include "qemu/bitmap.h" diff --git a/include/sysemu/replay.h b/include/sysemu/replay.h index dc8ae7b..fb533ed 100644 --- a/include/sysemu/replay.h +++ b/include/sysemu/replay.h @@ -13,6 +13,7 @@ */ #include "sysemu.h" +#include "qapi-types.h" /* replay clock kinds */ enum ReplayClockKind { diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h index 77bb3da..bfbef9e 100644 --- a/include/sysemu/sysemu.h +++ b/include/sysemu/sysemu.h @@ -2,6 +2,7 @@ #define SYSEMU_H /* Misc. things related to the system emulator. */ +#include "qapi/qapi-types-run-state.h" #include "qemu/queue.h" #include "qemu/timer.h" #include "qemu/notify.h" diff --git a/include/sysemu/tpm.h b/include/sysemu/tpm.h index 32b753d..9ae1ab6 100644 --- a/include/sysemu/tpm.h +++ b/include/sysemu/tpm.h @@ -12,6 +12,7 @@ #ifndef QEMU_TPM_H #define QEMU_TPM_H +#include "qapi/qapi-types-tpm.h" #include "qom/object.h" int tpm_config_parse(QemuOptsList *opts_list, const char *optarg); diff --git a/include/sysemu/watchdog.h b/include/sysemu/watchdog.h index 677ace3..a08d163 100644 --- a/include/sysemu/watchdog.h +++ b/include/sysemu/watchdog.h @@ -23,7 +23,7 @@ #define QEMU_WATCHDOG_H #include "qemu/queue.h" -#include "qapi-types.h" +#include "qapi/qapi-types-run-state.h" struct WatchdogTimerModel { QLIST_ENTRY(WatchdogTimerModel) entry; diff --git a/include/ui/console.h b/include/ui/console.h index f29bacd..e0d81f1 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -5,6 +5,7 @@ #include "qom/object.h" #include "qemu/notify.h" #include "qemu/error-report.h" +#include "qapi/qapi-types-ui.h" #ifdef CONFIG_OPENGL # include <epoxy/gl.h> diff --git a/include/ui/input.h b/include/ui/input.h index ceb22b8..16395ab 100644 --- a/include/ui/input.h +++ b/include/ui/input.h @@ -1,7 +1,7 @@ #ifndef INPUT_H #define INPUT_H -#include "qapi-types.h" +#include "qapi/qapi-types-ui.h" #define INPUT_EVENT_MASK_KEY (1<<INPUT_EVENT_KIND_KEY) #define INPUT_EVENT_MASK_BTN (1<<INPUT_EVENT_KIND_BTN) |