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:
Markus Armbruster 2018-02-11 10:36:01 +01:00 committed by Eric Blake
parent 252dc3105f
commit 9af2398977
115 changed files with 135 additions and 109 deletions

View File

@ -26,7 +26,6 @@
#include "hw/boards.h"
#include "qapi/error.h"
#include "qapi/visitor.h"
#include "qapi-visit.h"
#include "qemu/config-file.h"
#include "qom/object_interfaces.h"
#include "hw/virtio/virtio-crypto.h"

View File

@ -9,12 +9,13 @@
* This work is licensed under the terms of the GNU GPL, version 2 or later.
* See the COPYING file in the top-level directory.
*/
#include "qemu/osdep.h"
#include "sysemu/hostmem.h"
#include "hw/boards.h"
#include "qapi/error.h"
#include "qapi-builtin-visit.h"
#include "qapi/visitor.h"
#include "qapi-visit.h"
#include "qemu/config-file.h"
#include "qom/object_interfaces.h"

View File

@ -41,7 +41,6 @@
#include "qemu/coroutine.h"
#include "block/qapi.h"
#include "qemu/timer.h"
#include "qapi-event.h"
#include "qemu/cutils.h"
#include "qemu/id.h"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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>

View File

@ -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"

View File

@ -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"
/*

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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)
{

View File

@ -14,8 +14,8 @@
#include "sysemu/block-backend.h"
#include "hw/block/block.h"
#include "qapi/error.h"
#include "qapi/qapi-commands-block.h"
#include "sysemu/sysemu.h"
#include "qmp-commands.h"
#include "block/nbd.h"
#include "io/channel-socket.h"
#include "io/net-listener.h"

View File

@ -40,10 +40,12 @@
#include "qemu/error-report.h"
#include "qemu/option.h"
#include "qemu/config-file.h"
#include "qapi/qapi-commands-block.h"
#include "qapi/qapi-commands-transaction.h"
#include "qapi/qapi-visit-block-core.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qnum.h"
#include "qapi/qmp/qstring.h"
#include "qapi-visit.h"
#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
#include "qapi/qmp/qlist.h"
@ -51,7 +53,6 @@
#include "sysemu/sysemu.h"
#include "sysemu/iothread.h"
#include "block/block_int.h"
#include "qmp-commands.h"
#include "block/trace.h"
#include "sysemu/arch_init.h"
#include "sysemu/qtest.h"

View File

@ -30,11 +30,11 @@
#include "block/block_int.h"
#include "sysemu/block-backend.h"
#include "qapi/error.h"
#include "qapi/qapi-events-block-core.h"
#include "qapi/qmp/qerror.h"
#include "qemu/coroutine.h"
#include "qemu/id.h"
#include "qemu/timer.h"
#include "qapi-event.h"
/* Right now, this mutex is only needed to synchronize accesses to job->busy
* and job->sleep_timer, such as concurrent calls to block_job_do_yield and

View File

@ -25,7 +25,6 @@
#include "qemu/error-report.h"
#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
#include "qapi-visit.h"
#include "sysemu/replay.h"
#include "chardev/char-fe.h"

View File

@ -24,8 +24,8 @@
#include "qemu/osdep.h"
#include "chardev/char.h"
#include "qmp-commands.h"
#include "qapi/error.h"
#include "qapi/qapi-commands-char.h"
#include "qemu/base64.h"
#include "qemu/option.h"

View File

@ -31,6 +31,7 @@
#include "qemu/option.h"
#include "qapi/error.h"
#include "qapi/clone-visitor.h"
#include "qapi/qapi-visit-sockets.h"
#include "chardev/char-io.h"

View File

@ -29,9 +29,8 @@
#include "qemu/config-file.h"
#include "qemu/error-report.h"
#include "chardev/char.h"
#include "qmp-commands.h"
#include "qapi-visit.h"
#include "qapi/error.h"
#include "qapi/qapi-commands-char.h"
#include "qapi/qmp/qerror.h"
#include "sysemu/replay.h"
#include "qemu/help_option.h"

2
cpus.c
View File

@ -27,6 +27,7 @@
#include "cpu.h"
#include "monitor/monitor.h"
#include "qapi/error.h"
#include "qapi/qapi-events-run-state.h"
#include "qapi/qmp/qerror.h"
#include "qemu/error-report.h"
#include "sysemu/sysemu.h"
@ -49,7 +50,6 @@
#include "qemu/bitmap.h"
#include "qemu/seqlock.h"
#include "tcg.h"
#include "qapi-event.h"
#include "hw/nmi.h"
#include "sysemu/replay.h"
#include "hw/boards.h"

View File

@ -15,7 +15,7 @@
#ifndef QCRYPTO_CIPHERPRIV_H
#define QCRYPTO_CIPHERPRIV_H
#include "qapi-types.h"
#include "qapi/qapi-types-crypto.h"
typedef struct QCryptoCipherDriver QCryptoCipherDriver;

2
hmp.c
View File

@ -29,11 +29,11 @@
#include "monitor/qdev.h"
#include "qapi/error.h"
#include "qapi/opts-visitor.h"
#include "qapi-builtin-visit.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qerror.h"
#include "qapi/string-input-visitor.h"
#include "qapi/string-output-visitor.h"
#include "qapi-visit.h"
#include "qom/object_interfaces.h"
#include "ui/console.h"
#include "block/nbd.h"

View File

@ -27,8 +27,8 @@
#include "qemu/config-file.h"
#include "qapi/error.h"
#include "qapi/opts-visitor.h"
#include "qapi/qapi-events-run-state.h"
#include "qapi-visit.h"
#include "qapi-event.h"
#include "qemu/error-report.h"
#include "qemu/option.h"

View File

@ -12,6 +12,7 @@
#include "sysemu/block-backend.h"
#include "hw/block/block.h"
#include "qapi/error.h"
#include "qapi/qapi-types-block.h"
#include "qemu/error-report.h"
void blkconf_serial(BlockConf *conf, char **serial)

View File

@ -32,6 +32,7 @@
#include "qemu/osdep.h"
#include "sysemu/block-backend.h"
#include "qapi/qapi-types-block.h"
#include "qemu/bswap.h"
#include "hw/block/block.h"
#include "trace.h"

View File

@ -15,8 +15,8 @@
#include "qemu/error-report.h"
#include "trace.h"
#include "hw/virtio/virtio-serial.h"
#include "qapi-event.h"
#include "qapi/error.h"
#include "qapi/qapi-events-char.h"
#define TYPE_VIRTIO_CONSOLE_SERIAL_PORT "virtserialport"
#define VIRTIO_CONSOLE(obj) \

View File

@ -13,7 +13,7 @@
#include "qemu/osdep.h"
#include "hw/boards.h"
#include "qapi/error.h"
#include "qapi-visit.h"
#include "qapi/qapi-visit-common.h"
#include "qapi/visitor.h"
#include "hw/sysbus.h"
#include "sysemu/sysemu.h"

View File

@ -67,8 +67,8 @@
#include "acpi-build.h"
#include "hw/mem/pc-dimm.h"
#include "qapi/error.h"
#include "qapi/qapi-visit-common.h"
#include "qapi/visitor.h"
#include "qapi-visit.h"
#include "qom/cpu.h"
#include "hw/nmi.h"
#include "hw/i386/intel_iommu.h"

View File

@ -25,7 +25,6 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qapi/visitor.h"
#include "qapi-visit.h"
#include "hw/mem/nvdimm.h"
static void nvdimm_get_label_size(Object *obj, Visitor *v, const char *name,

View File

@ -17,8 +17,8 @@
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "qmp-commands.h"
#include "qapi/error.h"
#include "qapi/qapi-commands-rocker.h"
#include "qapi/qmp/qerror.h"
RockerSwitch *qmp_query_rocker(const char *name, Error **errp)

View File

@ -22,9 +22,9 @@
#include "net/net.h"
#include "net/eth.h"
#include "qapi/error.h"
#include "qapi/qapi-commands-rocker.h"
#include "qemu/iov.h"
#include "qemu/bitops.h"
#include "qmp-commands.h"
#include "rocker.h"
#include "rocker_hw.h"

View File

@ -16,7 +16,7 @@
#include "qemu/osdep.h"
#include "net/clients.h"
#include "qapi/qapi-types-rocker.h"
#include "rocker.h"
#include "rocker_hw.h"
#include "rocker_fp.h"

View File

@ -17,9 +17,9 @@
#include "qemu/osdep.h"
#include "net/eth.h"
#include "qapi/error.h"
#include "qapi/qapi-commands-rocker.h"
#include "qemu/iov.h"
#include "qemu/timer.h"
#include "qmp-commands.h"
#include "rocker.h"
#include "rocker_hw.h"

View File

@ -23,7 +23,7 @@
#include "net/vhost_net.h"
#include "hw/virtio/virtio-bus.h"
#include "qapi/error.h"
#include "qapi-event.h"
#include "qapi/qapi-events-net.h"
#include "hw/virtio/virtio-access.h"
#include "migration/misc.h"

View File

@ -38,7 +38,6 @@
#include "hw/ppc/spapr_vio.h"
#include "hw/ppc/spapr_rtas.h"
#include "hw/ppc/ppc.h"
#include "qapi-event.h"
#include "hw/boards.h"
#include <libfdt.h>

View File

@ -38,6 +38,7 @@
#include "migration/blocker.h"
#include "qapi/error.h"
#include "qapi/clone-visitor.h"
#include "qapi/qapi-visit-tpm.h"
#include "chardev/char-fe.h"
#define DEBUG_TPM 0

View File

@ -30,6 +30,7 @@
#include "tpm_int.h"
#include "hw/hw.h"
#include "qapi/clone-visitor.h"
#include "qapi/qapi-visit-tpm.h"
#include "tpm_util.h"
#define DEBUG_TPM 0

View File

@ -24,9 +24,9 @@
#include "qemu/config-file.h"
#include "qemu/queue.h"
#include "qapi/error.h"
#include "qapi/qapi-events-run-state.h"
#include "sysemu/sysemu.h"
#include "sysemu/watchdog.h"
#include "qapi-event.h"
#include "hw/nmi.h"
#include "qemu/help_option.h"
#include "qmp-commands.h"

View File

@ -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"

View File

@ -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,

View File

@ -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"

View File

@ -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"

View File

@ -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;

View File

@ -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 */

View File

@ -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 {

View File

@ -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"

View File

@ -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

View File

@ -12,7 +12,7 @@
#define HW_BLOCK_H
#include "qemu-common.h"
#include "qapi-types.h"
#include "qapi/qapi-types-block-core.h"
/* Configuration */

View File

@ -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

View File

@ -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"

View File

@ -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 ***/

View File

@ -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"

View File

@ -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);

View File

@ -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,

View File

@ -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);

View File

@ -3,6 +3,7 @@
#include "qemu-common.h"
#include "block/block.h"
#include "qapi-types.h"
#include "qemu/readline.h"
extern Monitor *cur_mon;

View File

@ -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"

View File

@ -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"

View File

@ -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;

View File

@ -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.

View File

@ -32,7 +32,7 @@
#ifndef QOBJECT_H
#define QOBJECT_H
#include "qapi-types.h"
#include "qapi-builtin-types.h"
struct QObject {
QType type;

View File

@ -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

View File

@ -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);

View File

@ -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

View File

@ -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"

View File

@ -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;

View File

@ -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 */

View File

@ -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"

View File

@ -13,6 +13,7 @@
*/
#include "sysemu.h"
#include "qapi-types.h"
/* replay clock kinds */
enum ReplayClockKind {

View File

@ -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"

View File

@ -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);

View File

@ -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;

View File

@ -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>

View File

@ -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)

View File

@ -20,6 +20,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qapi/qapi-visit-sockets.h"
#include "io/channel-socket.h"
#include "io/channel-watch.h"
#include "trace.h"

View File

@ -21,6 +21,7 @@
#include "qemu/osdep.h"
#include "io/dns-resolver.h"
#include "qapi/clone-visitor.h"
#include "qapi/qapi-visit-sockets.h"
#include "qemu/sockets.h"
#include "qapi/error.h"
#include "qemu/cutils.h"

View File

@ -15,8 +15,8 @@
#include "migration/failover.h"
#include "qemu/main-loop.h"
#include "migration.h"
#include "qmp-commands.h"
#include "qapi/error.h"
#include "qapi/qapi-commands-migration.h"
#include "qapi/qmp/qerror.h"
#include "qemu/error-report.h"
#include "trace.h"

View File

@ -13,6 +13,7 @@
#include "qemu/osdep.h"
#include "sysemu/sysemu.h"
#include "qapi/error.h"
#include "qapi/qapi-commands-migration.h"
#include "qemu-file-channel.h"
#include "migration.h"
#include "qemu-file.h"
@ -24,7 +25,6 @@
#include "qemu/error-report.h"
#include "migration/failover.h"
#include "replication.h"
#include "qmp-commands.h"
static bool vmstate_loading;

View File

@ -31,15 +31,15 @@
#include "migration/vmstate.h"
#include "block/block.h"
#include "qapi/error.h"
#include "qapi/qapi-commands-migration.h"
#include "qapi/qapi-events-migration.h"
#include "qapi/qmp/qerror.h"
#include "qapi/qmp/qnull.h"
#include "qemu/rcu.h"
#include "block.h"
#include "postcopy-ram.h"
#include "qemu/thread.h"
#include "qmp-commands.h"
#include "trace.h"
#include "qapi-event.h"
#include "exec/target_page.h"
#include "io/channel-buffer.h"
#include "migration/colo.h"

View File

@ -15,6 +15,7 @@
#define QEMU_MIGRATION_H
#include "qemu-common.h"
#include "qapi/qapi-types-migration.h"
#include "qemu/thread.h"
#include "exec/cpu-common.h"
#include "qemu/coroutine_int.h"

View File

@ -29,7 +29,6 @@
#include "qemu/osdep.h"
#include "cpu.h"
#include <zlib.h>
#include "qapi-event.h"
#include "qemu/cutils.h"
#include "qemu/bitops.h"
#include "qemu/bitmap.h"
@ -44,6 +43,7 @@
#include "migration/page_cache.h"
#include "qemu/error-report.h"
#include "qapi/error.h"
#include "qapi/qapi-events-migration.h"
#include "qapi/qmp/qerror.h"
#include "trace.h"
#include "exec/ram_addr.h"

View File

@ -30,7 +30,7 @@
#define QEMU_MIGRATION_RAM_H
#include "qemu-common.h"
#include "qapi-types.h"
#include "qapi/qapi-types-migration.h"
#include "exec/cpu-common.h"
extern MigrationStats ram_counters;

View File

@ -25,7 +25,6 @@
#include "net/queue.h"
#include "chardev/char-fe.h"
#include "qemu/sockets.h"
#include "qapi-visit.h"
#include "net/colo.h"
#include "sysemu/iothread.h"

View File

@ -13,8 +13,8 @@
#include "qemu-common.h"
#include "qemu/timer.h"
#include "qemu/iov.h"
#include "qapi-builtin-visit.h"
#include "qapi/qmp/qerror.h"
#include "qapi-visit.h"
#include "qom/object.h"
#define TYPE_FILTER_BUFFER "filter-buffer"

View File

@ -14,7 +14,6 @@
#include "net/net.h"
#include "qemu-common.h"
#include "qapi/error.h"
#include "qapi-visit.h"
#include "qom/object.h"
#include "qemu/main-loop.h"
#include "qemu/error-report.h"

View File

@ -16,7 +16,6 @@
#include "net/net.h"
#include "qemu-common.h"
#include "qemu/error-report.h"
#include "qapi-visit.h"
#include "qom/object.h"
#include "qemu/main-loop.h"
#include "qemu/iov.h"

View File

@ -33,18 +33,18 @@
#include "monitor/monitor.h"
#include "qemu/help_option.h"
#include "qapi/qapi-commands-net.h"
#include "qapi/qapi-visit-net.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qerror.h"
#include "qemu/error-report.h"
#include "qemu/sockets.h"
#include "qemu/cutils.h"
#include "qemu/config-file.h"
#include "qmp-commands.h"
#include "hw/qdev.h"
#include "qemu/iov.h"
#include "qemu/main-loop.h"
#include "qemu/option.h"
#include "qapi-visit.h"
#include "qapi/error.h"
#include "qapi/opts-visitor.h"
#include "sysemu/sysemu.h"

View File

@ -27,7 +27,7 @@
#define NET_TAP_INT_H
#include "qemu-common.h"
#include "qapi-types.h"
#include "qapi/qapi-types-net.h"
int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
int vnet_hdr_required, int mq_required, Error **errp);

View File

@ -14,10 +14,10 @@
#include "net/vhost-user.h"
#include "chardev/char-fe.h"
#include "qapi/error.h"
#include "qapi/qapi-commands-net.h"
#include "qemu/config-file.h"
#include "qemu/error-report.h"
#include "qemu/option.h"
#include "qmp-commands.h"
#include "trace.h"
typedef struct VhostUserState {

View File

@ -27,7 +27,7 @@
#include "qemu-version.h"
#include "qapi/error.h"
#include "qapi-visit.h"
#include "qapi/qapi-visit-block-core.h"
#include "qapi/qobject-output-visitor.h"
#include "qapi/qmp/qjson.h"
#include "qapi/qmp/qdict.h"

View File

@ -16,9 +16,9 @@
#include "qom/object_interfaces.h"
#include "qemu/cutils.h"
#include "qapi/visitor.h"
#include "qapi-visit.h"
#include "qapi/string-input-visitor.h"
#include "qapi/string-output-visitor.h"
#include "qapi-builtin-visit.h"
#include "qapi/qmp/qerror.h"
#include "trace.h"

View File

@ -5,7 +5,6 @@
#include "qom/object_interfaces.h"
#include "qemu/module.h"
#include "qemu/option.h"
#include "qapi-visit.h"
#include "qapi/opts-visitor.h"
#include "qemu/config-file.h"

View File

@ -16,6 +16,7 @@
#include "qemu/notify.h"
#include "ui/input.h"
#include "qapi/clone-visitor.h"
#include "qapi/qapi-visit-ui.h"
void replay_save_input_event(InputEvent *evt)
{

View File

@ -15,6 +15,7 @@
#ifndef REPLICATION_H
#define REPLICATION_H
#include "qapi/qapi-types-block-core.h"
#include "qemu/queue.h"
typedef struct ReplicationOps ReplicationOps;

View File

@ -241,6 +241,9 @@ class QAPISchemaGenCommandVisitor(QAPISchemaModularCVisitor):
def _begin_module(self, name):
self._visited_ret_types[self._genc] = set()
commands = self._module_basename('qapi-commands', name)
types = self._module_basename('qapi-types', name)
visit = self._module_basename('qapi-visit', name)
self._genc.add(mcgen('''
#include "qemu/osdep.h"
#include "qemu-common.h"
@ -251,18 +254,17 @@ class QAPISchemaGenCommandVisitor(QAPISchemaModularCVisitor):
#include "qapi/qobject-input-visitor.h"
#include "qapi/dealloc-visitor.h"
#include "qapi/error.h"
#include "%(prefix)sqapi-types.h"
#include "%(prefix)sqapi-visit.h"
#include "%(prefix)sqmp-commands.h"
#include "%(visit)s.h"
#include "%(commands)s.h"
''',
prefix=self._prefix))
commands=commands, visit=visit))
self._genh.add(mcgen('''
#include "%(prefix)sqapi-types.h"
#include "%(types)s.h"
#include "qapi/qmp/dispatch.h"
''',
prefix=self._prefix))
types=types))
def visit_end(self):
(genc, genh) = self._module[self._main_module]

View File

@ -165,24 +165,26 @@ class QAPISchemaGenEventVisitor(QAPISchemaModularCVisitor):
return basename
def _begin_module(self, name):
types = self._module_basename('qapi-types', name)
visit = self._module_basename('qapi-visit', name)
self._genc.add(mcgen('''
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "%(prefix)sqapi-event.h"
#include "%(prefix)sqapi-visit.h"
#include "%(visit)s.h"
#include "qapi/error.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qobject-output-visitor.h"
#include "qapi/qmp-event.h"
''',
prefix=self._prefix))
visit=visit, prefix=self._prefix))
self._genh.add(mcgen('''
#include "qapi/util.h"
#include "%(prefix)sqapi-types.h"
#include "%(types)s.h"
''',
prefix=self._prefix))
types=types))
def visit_end(self):
self._genh.add(gen_enum(self._enum_name, self._event_names))

View File

@ -185,13 +185,15 @@ class QAPISchemaGenTypeVisitor(QAPISchemaModularCVisitor):
'''))
def _begin_module(self, name):
types = self._module_basename('qapi-types', name)
visit = self._module_basename('qapi-visit', name)
self._genc.preamble_add(mcgen('''
#include "qemu/osdep.h"
#include "qapi/dealloc-visitor.h"
#include "%(prefix)sqapi-types.h"
#include "%(prefix)sqapi-visit.h"
#include "%(types)s.h"
#include "%(visit)s.h"
''',
prefix=self._prefix))
types=types, visit=visit))
self._genh.preamble_add(mcgen('''
#include "qapi-builtin-types.h"
'''))

View File

@ -284,20 +284,22 @@ class QAPISchemaGenVisitVisitor(QAPISchemaModularCVisitor):
prefix=prefix))
def _begin_module(self, name):
types = self._module_basename('qapi-types', name)
visit = self._module_basename('qapi-visit', name)
self._genc.preamble_add(mcgen('''
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
#include "%(prefix)sqapi-visit.h"
#include "%(visit)s.h"
''',
prefix=self._prefix))
visit=visit, prefix=self._prefix))
self._genh.preamble_add(mcgen('''
#include "qapi-builtin-visit.h"
#include "%(prefix)sqapi-types.h"
#include "%(types)s.h"
''',
prefix=self._prefix))
types=types))
def visit_enum_type(self, name, info, values, prefix):
self._genh.add(gen_visit_decl(name, scalar=True))

Some files were not shown because too many files have changed in this diff Show More