From d6454270575da1f16a8923c7cb240e46ef243f72 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 12 Aug 2019 07:23:45 +0200 Subject: Include migration/vmstate.h less In my "build everything" tree, changing migration/vmstate.h triggers a recompile of some 2700 out of 6600 objects (not counting tests and objects that don't depend on qemu/osdep.h). hw/hw.h supposedly includes it for convenience. Several other headers include it just to get VMStateDescription. The previous commit made that unnecessary. Include migration/vmstate.h only where it's still needed. Touching it now recompiles only some 1600 objects. Signed-off-by: Markus Armbruster Reviewed-by: Alistair Francis Message-Id: <20190812052359.30071-16-armbru@redhat.com> Tested-by: Philippe Mathieu-Daudé --- hw/core/loader.c | 1 + hw/core/numa.c | 1 + hw/core/or-irq.c | 1 + hw/core/ptimer.c | 2 ++ hw/core/qdev.c | 1 + 5 files changed, 6 insertions(+) (limited to 'hw/core') diff --git a/hw/core/loader.c b/hw/core/loader.c index 830845dd73..84e4f3efac 100644 --- a/hw/core/loader.c +++ b/hw/core/loader.c @@ -47,6 +47,7 @@ #include "qapi/error.h" #include "hw/hw.h" #include "disas/disas.h" +#include "migration/vmstate.h" #include "monitor/monitor.h" #include "sysemu/reset.h" #include "sysemu/sysemu.h" diff --git a/hw/core/numa.c b/hw/core/numa.c index a11431483c..67548064ee 100644 --- a/hw/core/numa.c +++ b/hw/core/numa.c @@ -33,6 +33,7 @@ #include "qapi/qapi-visit-machine.h" #include "sysemu/qtest.h" #include "hw/mem/pc-dimm.h" +#include "migration/vmstate.h" #include "hw/mem/memory-device.h" #include "qemu/option.h" #include "qemu/config-file.h" diff --git a/hw/core/or-irq.c b/hw/core/or-irq.c index 6ed34d9238..02949dae1a 100644 --- a/hw/core/or-irq.c +++ b/hw/core/or-irq.c @@ -25,6 +25,7 @@ #include "qemu/osdep.h" #include "hw/irq.h" #include "hw/or-irq.h" +#include "migration/vmstate.h" #include "qemu/module.h" static void or_irq_handler(void *opaque, int n, int level) diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c index 170fd34d8b..49b60282cf 100644 --- a/hw/core/ptimer.c +++ b/hw/core/ptimer.c @@ -5,10 +5,12 @@ * * This code is licensed under the GNU LGPL. */ + #include "qemu/osdep.h" #include "hw/hw.h" #include "qemu/timer.h" #include "hw/ptimer.h" +#include "migration/vmstate.h" #include "qemu/host-utils.h" #include "sysemu/replay.h" #include "sysemu/qtest.h" diff --git a/hw/core/qdev.c b/hw/core/qdev.c index 5c4b67a408..b1fe40d20d 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -38,6 +38,7 @@ #include "hw/irq.h" #include "hw/boards.h" #include "hw/sysbus.h" +#include "migration/vmstate.h" bool qdev_hotplug = false; static bool qdev_hot_added = false; -- cgit v1.2.3-55-g7522