diff options
author | Markus Armbruster <armbru@redhat.com> | 2019-08-12 07:23:57 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2019-08-16 13:31:53 +0200 |
commit | 46517dd4971fc1fdd5b379e72cc377626ad98160 (patch) | |
tree | 85087dd33afe57961b68771ef92e9c9eaf984a39 /hw | |
parent | d5938f29fea29581725426f203a74da746ca03e7 (diff) | |
download | qemu-46517dd4971fc1fdd5b379e72cc377626ad98160.zip qemu-46517dd4971fc1fdd5b379e72cc377626ad98160.tar.gz qemu-46517dd4971fc1fdd5b379e72cc377626ad98160.tar.bz2 |
Include sysemu/sysemu.h a lot less
In my "build everything" tree, changing sysemu/sysemu.h triggers a
recompile of some 5400 out of 6600 objects (not counting tests and
objects that don't depend on qemu/osdep.h).
hw/qdev-core.h includes sysemu/sysemu.h since recent commit e965ffa70a
"qdev: add qdev_add_vm_change_state_handler()". This is a bad idea:
hw/qdev-core.h is widely included.
Move the declaration of qdev_add_vm_change_state_handler() to
sysemu/sysemu.h, and drop the problematic include from hw/qdev-core.h.
Touching sysemu/sysemu.h now recompiles some 1800 objects.
qemu/uuid.h also drops from 5400 to 1800. A few more headers show
smaller improvement: qemu/notify.h drops from 5600 to 5200,
qemu/timer.h from 5600 to 4500, and qapi/qapi-types-run-state.h from
5500 to 5000.
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20190812052359.30071-28-armbru@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/arm/allwinner-a10.c | 1 | ||||
-rw-r--r-- | hw/arm/aspeed_soc.c | 1 | ||||
-rw-r--r-- | hw/arm/kzm.c | 1 | ||||
-rw-r--r-- | hw/arm/msf2-soc.c | 1 | ||||
-rw-r--r-- | hw/arm/stm32f205_soc.c | 1 | ||||
-rw-r--r-- | hw/char/serial-isa.c | 1 | ||||
-rw-r--r-- | hw/char/xen_console.c | 1 | ||||
-rw-r--r-- | hw/core/numa.c | 1 | ||||
-rw-r--r-- | hw/core/vm-change-state-handler.c | 1 | ||||
-rw-r--r-- | hw/display/qxl-render.c | 1 | ||||
-rw-r--r-- | hw/i386/xen/xen-hvm.c | 1 | ||||
-rw-r--r-- | hw/i386/xen/xen-mapcache.c | 1 | ||||
-rw-r--r-- | hw/intc/ioapic.c | 1 | ||||
-rw-r--r-- | hw/pci/pci.c | 1 | ||||
-rw-r--r-- | hw/riscv/sifive_e.c | 1 | ||||
-rw-r--r-- | hw/riscv/sifive_u.c | 1 | ||||
-rw-r--r-- | hw/riscv/spike.c | 1 | ||||
-rw-r--r-- | hw/riscv/virt.c | 1 | ||||
-rw-r--r-- | hw/sparc64/niagara.c | 2 | ||||
-rw-r--r-- | hw/usb/hcd-ehci.h | 1 | ||||
-rw-r--r-- | hw/xen/xen-common.c | 1 | ||||
-rw-r--r-- | hw/xen/xen_devconfig.c | 1 | ||||
-rw-r--r-- | hw/xenpv/xen_machine_pv.c | 1 |
23 files changed, 23 insertions, 1 deletions
diff --git a/hw/arm/allwinner-a10.c b/hw/arm/allwinner-a10.c index 3b0d3ec..73810a4 100644 --- a/hw/arm/allwinner-a10.c +++ b/hw/arm/allwinner-a10.c @@ -23,6 +23,7 @@ #include "hw/sysbus.h" #include "hw/arm/allwinner-a10.h" #include "hw/misc/unimp.h" +#include "sysemu/sysemu.h" static void aw_a10_init(Object *obj) { diff --git a/hw/arm/aspeed_soc.c b/hw/arm/aspeed_soc.c index c6fb370..9ee8104 100644 --- a/hw/arm/aspeed_soc.c +++ b/hw/arm/aspeed_soc.c @@ -22,6 +22,7 @@ #include "qemu/error-report.h" #include "hw/i2c/aspeed_i2c.h" #include "net/net.h" +#include "sysemu/sysemu.h" #define ASPEED_SOC_IOMEM_SIZE 0x00200000 diff --git a/hw/arm/kzm.c b/hw/arm/kzm.c index 59d2102..2f052e1 100644 --- a/hw/arm/kzm.c +++ b/hw/arm/kzm.c @@ -24,6 +24,7 @@ #include "hw/net/lan9118.h" #include "hw/char/serial.h" #include "sysemu/qtest.h" +#include "sysemu/sysemu.h" /* Memory map for Kzm Emulation Baseboard: * 0x00000000-0x7fffffff See i.MX31 SOC for support diff --git a/hw/arm/msf2-soc.c b/hw/arm/msf2-soc.c index 8ae763f..76cc3e0 100644 --- a/hw/arm/msf2-soc.c +++ b/hw/arm/msf2-soc.c @@ -30,6 +30,7 @@ #include "hw/irq.h" #include "hw/arm/msf2-soc.h" #include "hw/misc/unimp.h" +#include "sysemu/sysemu.h" #define MSF2_TIMER_BASE 0x40004000 #define MSF2_SYSREG_BASE 0x40038000 diff --git a/hw/arm/stm32f205_soc.c b/hw/arm/stm32f205_soc.c index be8b7df..f5a5c2d 100644 --- a/hw/arm/stm32f205_soc.c +++ b/hw/arm/stm32f205_soc.c @@ -29,6 +29,7 @@ #include "exec/address-spaces.h" #include "hw/arm/stm32f205_soc.h" #include "hw/qdev-properties.h" +#include "sysemu/sysemu.h" /* At the moment only Timer 2 to 5 are modelled */ static const uint32_t timer_addr[STM_NUM_TIMERS] = { 0x40000000, 0x40000400, diff --git a/hw/char/serial-isa.c b/hw/char/serial-isa.c index 5a0ae02..9e31c51 100644 --- a/hw/char/serial-isa.c +++ b/hw/char/serial-isa.c @@ -26,6 +26,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qemu/module.h" +#include "sysemu/sysemu.h" #include "hw/char/serial.h" #include "hw/isa/isa.h" #include "hw/qdev-properties.h" diff --git a/hw/char/xen_console.c b/hw/char/xen_console.c index 8cc9328..63153df 100644 --- a/hw/char/xen_console.c +++ b/hw/char/xen_console.c @@ -24,6 +24,7 @@ #include <termios.h> #include "qapi/error.h" +#include "sysemu/sysemu.h" #include "chardev/char-fe.h" #include "hw/xen/xen-legacy-backend.h" diff --git a/hw/core/numa.c b/hw/core/numa.c index 450c522..7a63ddc 100644 --- a/hw/core/numa.c +++ b/hw/core/numa.c @@ -25,6 +25,7 @@ #include "qemu/osdep.h" #include "sysemu/hostmem.h" #include "sysemu/numa.h" +#include "sysemu/sysemu.h" #include "exec/cpu-common.h" #include "exec/ramlist.h" #include "qemu/bitmap.h" diff --git a/hw/core/vm-change-state-handler.c b/hw/core/vm-change-state-handler.c index e27ea45..9068d51 100644 --- a/hw/core/vm-change-state-handler.c +++ b/hw/core/vm-change-state-handler.c @@ -17,6 +17,7 @@ #include "qemu/osdep.h" #include "hw/qdev-core.h" +#include "sysemu/sysemu.h" static int qdev_get_dev_tree_depth(DeviceState *dev) { diff --git a/hw/display/qxl-render.c b/hw/display/qxl-render.c index 14ad2b3..473e333 100644 --- a/hw/display/qxl-render.c +++ b/hw/display/qxl-render.c @@ -21,6 +21,7 @@ #include "qemu/osdep.h" #include "qxl.h" +#include "sysemu/sysemu.h" #include "trace.h" static void qxl_blit(PCIQXLDevice *qxl, QXLRect *rect) diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c index 3e15ffc..ca4659b 100644 --- a/hw/i386/xen/xen-hvm.c +++ b/hw/i386/xen/xen-hvm.c @@ -25,6 +25,7 @@ #include "qemu/error-report.h" #include "qemu/main-loop.h" #include "qemu/range.h" +#include "sysemu/sysemu.h" #include "sysemu/xen-mapcache.h" #include "trace.h" #include "exec/address-spaces.h" diff --git a/hw/i386/xen/xen-mapcache.c b/hw/i386/xen/xen-mapcache.c index dc73c86..09656f9 100644 --- a/hw/i386/xen/xen-mapcache.c +++ b/hw/i386/xen/xen-mapcache.c @@ -17,6 +17,7 @@ #include "hw/xen/xen-legacy-backend.h" #include "qemu/bitmap.h" +#include "sysemu/sysemu.h" #include "sysemu/xen-mapcache.h" #include "trace.h" diff --git a/hw/intc/ioapic.c b/hw/intc/ioapic.c index dddd231..1ede055 100644 --- a/hw/intc/ioapic.c +++ b/hw/intc/ioapic.c @@ -30,6 +30,7 @@ #include "hw/pci/msi.h" #include "hw/qdev-properties.h" #include "sysemu/kvm.h" +#include "sysemu/sysemu.h" #include "hw/i386/apic-msidef.h" #include "hw/i386/x86-iommu.h" #include "trace.h" diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 4b6ffab..aa05c2b 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -35,6 +35,7 @@ #include "monitor/monitor.h" #include "net/net.h" #include "sysemu/numa.h" +#include "sysemu/sysemu.h" #include "hw/loader.h" #include "qemu/error-report.h" #include "qemu/range.h" diff --git a/hw/riscv/sifive_e.c b/hw/riscv/sifive_e.c index 862903d..792d75a 100644 --- a/hw/riscv/sifive_e.c +++ b/hw/riscv/sifive_e.c @@ -46,6 +46,7 @@ #include "hw/riscv/boot.h" #include "chardev/char.h" #include "sysemu/arch_init.h" +#include "sysemu/sysemu.h" #include "exec/address-spaces.h" static const struct MemmapEntry { diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive_u.c index 0b3c5df..9910fa6 100644 --- a/hw/riscv/sifive_u.c +++ b/hw/riscv/sifive_u.c @@ -44,6 +44,7 @@ #include "chardev/char.h" #include "sysemu/arch_init.h" #include "sysemu/device_tree.h" +#include "sysemu/sysemu.h" #include "exec/address-spaces.h" #include <libfdt.h> diff --git a/hw/riscv/spike.c b/hw/riscv/spike.c index 9cc786b..7c04bd5 100644 --- a/hw/riscv/spike.c +++ b/hw/riscv/spike.c @@ -40,6 +40,7 @@ #include "sysemu/arch_init.h" #include "sysemu/device_tree.h" #include "sysemu/qtest.h" +#include "sysemu/sysemu.h" #include "exec/address-spaces.h" #include <libfdt.h> diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index c72198b..9bced28 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -37,6 +37,7 @@ #include "chardev/char.h" #include "sysemu/arch_init.h" #include "sysemu/device_tree.h" +#include "sysemu/sysemu.h" #include "exec/address-spaces.h" #include "hw/pci/pci.h" #include "hw/pci-host/gpex.h" diff --git a/hw/sparc64/niagara.c b/hw/sparc64/niagara.c index 1efcff6..167143b 100644 --- a/hw/sparc64/niagara.c +++ b/hw/sparc64/niagara.c @@ -35,7 +35,7 @@ #include "sysemu/block-backend.h" #include "qemu/error-report.h" #include "sysemu/qtest.h" - +#include "sysemu/sysemu.h" typedef struct NiagaraBoardState { MemoryRegion hv_ram; diff --git a/hw/usb/hcd-ehci.h b/hw/usb/hcd-ehci.h index 0298238..fdbcfdc 100644 --- a/hw/usb/hcd-ehci.h +++ b/hw/usb/hcd-ehci.h @@ -21,6 +21,7 @@ #include "qemu/timer.h" #include "hw/usb.h" #include "sysemu/dma.h" +#include "sysemu/sysemu.h" #include "hw/pci/pci.h" #include "hw/sysbus.h" diff --git a/hw/xen/xen-common.c b/hw/xen/xen-common.c index 32503cf..76621da 100644 --- a/hw/xen/xen-common.c +++ b/hw/xen/xen-common.c @@ -14,6 +14,7 @@ #include "hw/xen/xen-legacy-backend.h" #include "chardev/char.h" #include "sysemu/accel.h" +#include "sysemu/sysemu.h" #include "migration/misc.h" #include "migration/global_state.h" diff --git a/hw/xen/xen_devconfig.c b/hw/xen/xen_devconfig.c index 315dbc9..46ee4a7 100644 --- a/hw/xen/xen_devconfig.c +++ b/hw/xen/xen_devconfig.c @@ -2,6 +2,7 @@ #include "hw/xen/xen-legacy-backend.h" #include "qemu/option.h" #include "sysemu/blockdev.h" +#include "sysemu/sysemu.h" /* ------------------------------------------------------------- */ diff --git a/hw/xenpv/xen_machine_pv.c b/hw/xenpv/xen_machine_pv.c index 524d608..3a8af1a 100644 --- a/hw/xenpv/xen_machine_pv.c +++ b/hw/xenpv/xen_machine_pv.c @@ -28,6 +28,7 @@ #include "hw/xen/xen-legacy-backend.h" #include "hw/xen/xen-bus.h" #include "sysemu/block-backend.h" +#include "sysemu/sysemu.h" static void xen_init_pv(MachineState *machine) { |