From db725815985654007ade0fd53590d613fd657208 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 12 Aug 2019 07:23:50 +0200 Subject: Include qemu/main-loop.h less MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In my "build everything" tree, changing qemu/main-loop.h triggers a recompile of some 5600 out of 6600 objects (not counting tests and objects that don't depend on qemu/osdep.h). It includes block/aio.h, which in turn includes qemu/event_notifier.h, qemu/notify.h, qemu/processor.h, qemu/qsp.h, qemu/queue.h, qemu/thread-posix.h, qemu/thread.h, qemu/timer.h, and a few more. Include qemu/main-loop.h only where it's needed. Touching it now recompiles only some 1700 objects. For block/aio.h and qemu/event_notifier.h, these numbers drop from 5600 to 2800. For the others, they shrink only slightly. Signed-off-by: Markus Armbruster Message-Id: <20190812052359.30071-21-armbru@redhat.com> Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- tests/test-bdrv-drain.c | 1 + tests/test-bdrv-graph-mod.c | 1 + tests/test-block-backend.c | 1 + tests/test-block-iothread.c | 1 + tests/test-image-locking.c | 1 + tests/test-replication.c | 1 + tests/test-throttle.c | 1 + 7 files changed, 7 insertions(+) (limited to 'tests') diff --git a/tests/test-bdrv-drain.c b/tests/test-bdrv-drain.c index 03fa114..481b750 100644 --- a/tests/test-bdrv-drain.c +++ b/tests/test-bdrv-drain.c @@ -27,6 +27,7 @@ #include "block/blockjob_int.h" #include "sysemu/block-backend.h" #include "qapi/error.h" +#include "qemu/main-loop.h" #include "iothread.h" static QemuEvent done_event; diff --git a/tests/test-bdrv-graph-mod.c b/tests/test-bdrv-graph-mod.c index cfeec36..a007754 100644 --- a/tests/test-bdrv-graph-mod.c +++ b/tests/test-bdrv-graph-mod.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" +#include "qemu/main-loop.h" #include "block/block_int.h" #include "sysemu/block-backend.h" diff --git a/tests/test-block-backend.c b/tests/test-block-backend.c index 5b5d684..2fb1a44 100644 --- a/tests/test-block-backend.c +++ b/tests/test-block-backend.c @@ -26,6 +26,7 @@ #include "block/block.h" #include "sysemu/block-backend.h" #include "qapi/error.h" +#include "qemu/main-loop.h" static void test_drain_aio_error_flush_cb(void *opaque, int ret) { diff --git a/tests/test-block-iothread.c b/tests/test-block-iothread.c index 1949d5e..e81b5b8 100644 --- a/tests/test-block-iothread.c +++ b/tests/test-block-iothread.c @@ -28,6 +28,7 @@ #include "sysemu/block-backend.h" #include "qapi/error.h" #include "qapi/qmp/qdict.h" +#include "qemu/main-loop.h" #include "iothread.h" static int coroutine_fn bdrv_test_co_prwv(BlockDriverState *bs, diff --git a/tests/test-image-locking.c b/tests/test-image-locking.c index 7614cbf..ba057bd 100644 --- a/tests/test-image-locking.c +++ b/tests/test-image-locking.c @@ -29,6 +29,7 @@ #include "sysemu/block-backend.h" #include "qapi/error.h" #include "qapi/qmp/qdict.h" +#include "qemu/main-loop.h" static BlockBackend *open_image(const char *path, uint64_t perm, uint64_t shared_perm, diff --git a/tests/test-replication.c b/tests/test-replication.c index f085d19..4747d8a 100644 --- a/tests/test-replication.c +++ b/tests/test-replication.c @@ -13,6 +13,7 @@ #include "qapi/error.h" #include "qapi/qmp/qdict.h" #include "qemu/option.h" +#include "qemu/main-loop.h" #include "replication.h" #include "block/block_int.h" #include "block/qdict.h" diff --git a/tests/test-throttle.c b/tests/test-throttle.c index a288122..083e1f9 100644 --- a/tests/test-throttle.c +++ b/tests/test-throttle.c @@ -18,6 +18,7 @@ #include "qapi/error.h" #include "qemu/throttle.h" #include "qemu/error-report.h" +#include "qemu/main-loop.h" #include "qemu/module.h" #include "block/throttle-groups.h" #include "sysemu/block-backend.h" -- cgit v1.1