diff options
author | Markus Armbruster <armbru@redhat.com> | 2019-08-12 07:23:50 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2019-08-16 13:31:52 +0200 |
commit | db725815985654007ade0fd53590d613fd657208 (patch) | |
tree | e39bcf77a808fa0002cea415b2a487cf5c7eaf4b /tests | |
parent | dc5e9ac716c5c5312ab29fb9f311f8176064fe04 (diff) | |
download | qemu-db725815985654007ade0fd53590d613fd657208.zip qemu-db725815985654007ade0fd53590d613fd657208.tar.gz qemu-db725815985654007ade0fd53590d613fd657208.tar.bz2 |
Include qemu/main-loop.h less
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 <armbru@redhat.com>
Message-Id: <20190812052359.30071-21-armbru@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-bdrv-drain.c | 1 | ||||
-rw-r--r-- | tests/test-bdrv-graph-mod.c | 1 | ||||
-rw-r--r-- | tests/test-block-backend.c | 1 | ||||
-rw-r--r-- | tests/test-block-iothread.c | 1 | ||||
-rw-r--r-- | tests/test-image-locking.c | 1 | ||||
-rw-r--r-- | tests/test-replication.c | 1 | ||||
-rw-r--r-- | tests/test-throttle.c | 1 |
7 files changed, 7 insertions, 0 deletions
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" |