mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
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>
This commit is contained in:
parent
252dc3105f
commit
9af2398977
115 changed files with 135 additions and 109 deletions
|
@ -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"
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#define HW_BLOCK_H
|
||||
|
||||
#include "qemu-common.h"
|
||||
#include "qapi-types.h"
|
||||
#include "qapi/qapi-types-block-core.h"
|
||||
|
||||
/* Configuration */
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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 ***/
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include "qemu-common.h"
|
||||
#include "block/block.h"
|
||||
#include "qapi-types.h"
|
||||
#include "qemu/readline.h"
|
||||
|
||||
extern Monitor *cur_mon;
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#ifndef QOBJECT_H
|
||||
#define QOBJECT_H
|
||||
|
||||
#include "qapi-types.h"
|
||||
#include "qapi-builtin-types.h"
|
||||
|
||||
struct QObject {
|
||||
QType type;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
*/
|
||||
|
||||
#include "sysemu.h"
|
||||
#include "qapi-types.h"
|
||||
|
||||
/* replay clock kinds */
|
||||
enum ReplayClockKind {
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue