Include migration/qemu-file-types.h a lot less

In my "build everything" tree, changing migration/qemu-file-types.h
triggers a recompile of some 2600 out of 6600 objects (not counting
tests and objects that don't depend on qemu/osdep.h).

The culprit is again hw/hw.h, which supposedly includes it for
convenience.

Include migration/qemu-file-types.h only where it's needed.  Touching
it now recompiles less than 200 objects.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20190812052359.30071-10-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
This commit is contained in:
Markus Armbruster 2019-08-12 07:23:39 +02:00
parent 71e8a91585
commit ca77ee28e0
31 changed files with 30 additions and 1 deletions

View File

@ -40,6 +40,7 @@
#include "hw/acpi/memory_hotplug.h" #include "hw/acpi/memory_hotplug.h"
#include "hw/acpi/acpi_dev_interface.h" #include "hw/acpi/acpi_dev_interface.h"
#include "hw/xen/xen.h" #include "hw/xen/xen.h"
#include "migration/qemu-file-types.h"
#include "qom/cpu.h" #include "qom/cpu.h"
#include "trace.h" #include "trace.h"

View File

@ -26,6 +26,7 @@
# include <scsi/sg.h> # include <scsi/sg.h>
#endif #endif
#include "hw/virtio/virtio-bus.h" #include "hw/virtio/virtio-bus.h"
#include "migration/qemu-file-types.h"
#include "hw/virtio/virtio-access.h" #include "hw/virtio/virtio-access.h"
/* Config size before the discard support (hide associated config fields) */ /* Config size before the discard support (hide associated config fields) */

View File

@ -22,6 +22,7 @@
#include "qapi/error.h" #include "qapi/error.h"
#include "qemu/iov.h" #include "qemu/iov.h"
#include "qemu/module.h" #include "qemu/module.h"
#include "migration/qemu-file-types.h"
#include "monitor/monitor.h" #include "monitor/monitor.h"
#include "qemu/error-report.h" #include "qemu/error-report.h"
#include "qemu/queue.h" #include "qemu/queue.h"

View File

@ -18,6 +18,7 @@
#include "trace.h" #include "trace.h"
#include "sysemu/dma.h" #include "sysemu/dma.h"
#include "hw/virtio/virtio.h" #include "hw/virtio/virtio.h"
#include "migration/qemu-file-types.h"
#include "hw/virtio/virtio-gpu.h" #include "hw/virtio/virtio-gpu.h"
#include "hw/virtio/virtio-gpu-bswap.h" #include "hw/virtio/virtio-gpu-bswap.h"
#include "hw/virtio/virtio-gpu-pixman.h" #include "hw/virtio/virtio-gpu-pixman.h"

View File

@ -31,6 +31,7 @@
#include "sysemu/kvm.h" #include "sysemu/kvm.h"
#include "hw/qdev.h" #include "hw/qdev.h"
#include "hw/sysbus.h" #include "hw/sysbus.h"
#include "migration/qemu-file-types.h"
static int apic_irq_delivered; static int apic_irq_delivered;
bool apic_report_tpr_access; bool apic_report_tpr_access;

View File

@ -22,6 +22,7 @@
#include "hw/s390x/s390_flic.h" #include "hw/s390x/s390_flic.h"
#include "hw/s390x/adapter.h" #include "hw/s390x/adapter.h"
#include "hw/s390x/css.h" #include "hw/s390x/css.h"
#include "migration/qemu-file-types.h"
#include "trace.h" #include "trace.h"
#define FLIC_SAVE_INITIAL_SIZE getpagesize() #define FLIC_SAVE_INITIAL_SIZE getpagesize()

View File

@ -38,6 +38,7 @@
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "hw/hw.h" #include "hw/hw.h"
#include "hw/nvram/eeprom93xx.h" #include "hw/nvram/eeprom93xx.h"
#include "migration/qemu-file-types.h"
/* Debug EEPROM emulation. */ /* Debug EEPROM emulation. */
//~ #define DEBUG_EEPROM //~ #define DEBUG_EEPROM

View File

@ -31,6 +31,7 @@
#include "hw/boards.h" #include "hw/boards.h"
#include "hw/nvram/fw_cfg.h" #include "hw/nvram/fw_cfg.h"
#include "hw/sysbus.h" #include "hw/sysbus.h"
#include "migration/qemu-file-types.h"
#include "trace.h" #include "trace.h"
#include "qemu/error-report.h" #include "qemu/error-report.h"
#include "qemu/option.h" #include "qemu/option.h"

View File

@ -32,6 +32,7 @@
#include "qapi/error.h" #include "qapi/error.h"
#include "qemu/range.h" #include "qemu/range.h"
#include "hw/xen/xen.h" #include "hw/xen/xen.h"
#include "migration/qemu-file-types.h"
#include "hw/pci-host/pam.h" #include "hw/pci-host/pam.h"
#include "sysemu/reset.h" #include "sysemu/reset.h"
#include "sysemu/sysemu.h" #include "sysemu/sysemu.h"

View File

@ -20,6 +20,7 @@
#include "hw/pci/msix.h" #include "hw/pci/msix.h"
#include "hw/pci/pci.h" #include "hw/pci/pci.h"
#include "hw/xen/xen.h" #include "hw/xen/xen.h"
#include "migration/qemu-file-types.h"
#include "qemu/range.h" #include "qemu/range.h"
#include "qapi/error.h" #include "qapi/error.h"
#include "trace.h" #include "trace.h"

View File

@ -29,6 +29,7 @@
#include "hw/pci/pci_bridge.h" #include "hw/pci/pci_bridge.h"
#include "hw/pci/pci_bus.h" #include "hw/pci/pci_bus.h"
#include "hw/pci/pci_host.h" #include "hw/pci/pci_host.h"
#include "migration/qemu-file-types.h"
#include "monitor/monitor.h" #include "monitor/monitor.h"
#include "net/net.h" #include "net/net.h"
#include "sysemu/sysemu.h" #include "sysemu/sysemu.h"

View File

@ -4,6 +4,7 @@
#include "qemu/range.h" #include "qemu/range.h"
#include "qemu/error-report.h" #include "qemu/error-report.h"
#include "hw/pci/shpc.h" #include "hw/pci/shpc.h"
#include "migration/qemu-file-types.h"
#include "hw/pci/pci.h" #include "hw/pci/pci.h"
#include "hw/pci/pci_bus.h" #include "hw/pci/pci_bus.h"
#include "hw/pci/msi.h" #include "hw/pci/msi.h"

View File

@ -42,6 +42,7 @@
#include "sysemu/hw_accel.h" #include "sysemu/hw_accel.h"
#include "kvm_ppc.h" #include "kvm_ppc.h"
#include "migration/misc.h" #include "migration/misc.h"
#include "migration/qemu-file-types.h"
#include "migration/global_state.h" #include "migration/global_state.h"
#include "migration/register.h" #include "migration/register.h"
#include "mmu-hash64.h" #include "mmu-hash64.h"

View File

@ -18,6 +18,7 @@
#include "qapi/qmp/qdict.h" #include "qapi/qmp/qdict.h"
#include "qemu/error-report.h" #include "qemu/error-report.h"
#include "sysemu/kvm.h" #include "sysemu/kvm.h"
#include "migration/qemu-file-types.h"
#include "migration/register.h" #include "migration/register.h"
#define S390_SKEYS_BUFFER_SIZE (128 * KiB) /* Room for 128k storage keys */ #define S390_SKEYS_BUFFER_SIZE (128 * KiB) /* Room for 128k storage keys */

View File

@ -14,6 +14,7 @@
#include "qemu/error-report.h" #include "qemu/error-report.h"
#include "qemu/module.h" #include "qemu/module.h"
#include "sysemu/kvm.h" #include "sysemu/kvm.h"
#include "migration/qemu-file-types.h"
#include "migration/register.h" #include "migration/register.h"
void s390_init_tod(void) void s390_init_tod(void)

View File

@ -17,6 +17,7 @@
#include "sysemu/kvm.h" #include "sysemu/kvm.h"
#include "net/net.h" #include "net/net.h"
#include "hw/virtio/virtio.h" #include "hw/virtio/virtio.h"
#include "migration/qemu-file-types.h"
#include "hw/virtio/virtio-net.h" #include "hw/virtio/virtio-net.h"
#include "hw/sysbus.h" #include "hw/sysbus.h"
#include "qemu/bitops.h" #include "qemu/bitops.h"

View File

@ -34,6 +34,7 @@
#include "trace.h" #include "trace.h"
#include "qapi/error.h" #include "qapi/error.h"
#include "mptsas.h" #include "mptsas.h"
#include "migration/qemu-file-types.h"
#include "mpi.h" #include "mpi.h"
#define NAA_LOCALLY_ASSIGNED_ID 0x3ULL #define NAA_LOCALLY_ASSIGNED_ID 0x3ULL

View File

@ -5,6 +5,7 @@
#include "qemu/module.h" #include "qemu/module.h"
#include "qemu/option.h" #include "qemu/option.h"
#include "hw/scsi/scsi.h" #include "hw/scsi/scsi.h"
#include "migration/qemu-file-types.h"
#include "scsi/constants.h" #include "scsi/constants.h"
#include "hw/qdev.h" #include "hw/qdev.h"
#include "sysemu/block-backend.h" #include "sysemu/block-backend.h"

View File

@ -25,6 +25,7 @@
#include "qemu/error-report.h" #include "qemu/error-report.h"
#include "qemu/module.h" #include "qemu/module.h"
#include "hw/scsi/scsi.h" #include "hw/scsi/scsi.h"
#include "migration/qemu-file-types.h"
#include "hw/scsi/emulation.h" #include "hw/scsi/emulation.h"
#include "scsi/constants.h" #include "scsi/constants.h"
#include "sysemu/sysemu.h" #include "sysemu/sysemu.h"

View File

@ -17,6 +17,7 @@
#include "qemu/error-report.h" #include "qemu/error-report.h"
#include "qemu/module.h" #include "qemu/module.h"
#include "hw/scsi/scsi.h" #include "hw/scsi/scsi.h"
#include "migration/qemu-file-types.h"
#include "hw/scsi/emulation.h" #include "hw/scsi/emulation.h"
#include "sysemu/block-backend.h" #include "sysemu/block-backend.h"
#include "trace.h" #include "trace.h"

View File

@ -17,6 +17,7 @@
#include "qapi/error.h" #include "qapi/error.h"
#include "standard-headers/linux/virtio_ids.h" #include "standard-headers/linux/virtio_ids.h"
#include "hw/virtio/virtio-scsi.h" #include "hw/virtio/virtio-scsi.h"
#include "migration/qemu-file-types.h"
#include "qemu/error-report.h" #include "qemu/error-report.h"
#include "qemu/iov.h" #include "qemu/iov.h"
#include "qemu/module.h" #include "qemu/module.h"

View File

@ -30,6 +30,7 @@
#include "qemu/timer.h" #include "qemu/timer.h"
#include "hw/timer/i8254.h" #include "hw/timer/i8254.h"
#include "hw/timer/i8254_internal.h" #include "hw/timer/i8254_internal.h"
#include "migration/qemu-file-types.h"
/* val must be 0 or 1 */ /* val must be 0 or 1 */
void pit_set_gate(ISADevice *dev, int channel, int val) void pit_set_gate(ISADevice *dev, int channel, int val)

View File

@ -24,6 +24,7 @@
#include "hw/hw.h" #include "hw/hw.h"
#include "qemu/timer.h" #include "qemu/timer.h"
#include "hw/i2c/i2c.h" #include "hw/i2c/i2c.h"
#include "migration/qemu-file-types.h"
#include "sysemu/sysemu.h" #include "sysemu/sysemu.h"
#include "ui/console.h" #include "ui/console.h"
#include "qemu/bcd.h" #include "qemu/bcd.h"

View File

@ -41,6 +41,7 @@
#include <usbredirfilter.h> #include <usbredirfilter.h>
#include "hw/usb.h" #include "hw/usb.h"
#include "migration/qemu-file-types.h"
/* ERROR is defined below. Remove any previous definition. */ /* ERROR is defined below. Remove any previous definition. */
#undef ERROR #undef ERROR

View File

@ -26,6 +26,7 @@
#include "hw/virtio/virtio-bus.h" #include "hw/virtio/virtio-bus.h"
#include "hw/virtio/virtio-access.h" #include "hw/virtio/virtio-access.h"
#include "migration/blocker.h" #include "migration/blocker.h"
#include "migration/qemu-file-types.h"
#include "sysemu/dma.h" #include "sysemu/dma.h"
#include "trace.h" #include "trace.h"

View File

@ -23,6 +23,7 @@
#include "standard-headers/linux/virtio_mmio.h" #include "standard-headers/linux/virtio_mmio.h"
#include "hw/sysbus.h" #include "hw/sysbus.h"
#include "hw/virtio/virtio.h" #include "hw/virtio/virtio.h"
#include "migration/qemu-file-types.h"
#include "qemu/host-utils.h" #include "qemu/host-utils.h"
#include "qemu/module.h" #include "qemu/module.h"
#include "sysemu/kvm.h" #include "sysemu/kvm.h"

View File

@ -19,6 +19,7 @@
#include "standard-headers/linux/virtio_pci.h" #include "standard-headers/linux/virtio_pci.h"
#include "hw/virtio/virtio.h" #include "hw/virtio/virtio.h"
#include "migration/qemu-file-types.h"
#include "hw/pci/pci.h" #include "hw/pci/pci.h"
#include "hw/pci/pci_bus.h" #include "hw/pci/pci_bus.h"
#include "qapi/error.h" #include "qapi/error.h"

View File

@ -19,6 +19,7 @@
#include "qemu/error-report.h" #include "qemu/error-report.h"
#include "qemu/module.h" #include "qemu/module.h"
#include "hw/virtio/virtio.h" #include "hw/virtio/virtio.h"
#include "migration/qemu-file-types.h"
#include "qemu/atomic.h" #include "qemu/atomic.h"
#include "hw/virtio/virtio-bus.h" #include "hw/virtio/virtio-bus.h"
#include "hw/virtio/virtio-access.h" #include "hw/virtio/virtio-access.h"

View File

@ -11,7 +11,6 @@
#include "exec/memory.h" #include "exec/memory.h"
#include "hw/irq.h" #include "hw/irq.h"
#include "migration/vmstate.h" #include "migration/vmstate.h"
#include "migration/qemu-file-types.h"
void QEMU_NORETURN hw_error(const char *fmt, ...) GCC_FMT_ATTR(1, 2); void QEMU_NORETURN hw_error(const char *fmt, ...) GCC_FMT_ATTR(1, 2);

View File

@ -4,6 +4,7 @@
#define MIGRATION_CPU_H #define MIGRATION_CPU_H
#include "exec/cpu-defs.h" #include "exec/cpu-defs.h"
#include "migration/qemu-file-types.h"
#if TARGET_LONG_BITS == 64 #if TARGET_LONG_BITS == 64
#define qemu_put_betl qemu_put_be64 #define qemu_put_betl qemu_put_be64

View File

@ -38,6 +38,7 @@
#include "hw/ppc/spapr.h" #include "hw/ppc/spapr.h"
#include "hw/ppc/spapr_cpu_core.h" #include "hw/ppc/spapr_cpu_core.h"
#include "hw/ppc/ppc.h" #include "hw/ppc/ppc.h"
#include "migration/qemu-file-types.h"
#include "sysemu/watchdog.h" #include "sysemu/watchdog.h"
#include "trace.h" #include "trace.h"
#include "exec/gdbstub.h" #include "exec/gdbstub.h"