[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 20/29] Include qemu/main-loop.h less
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [Qemu-devel] [PATCH v2 20/29] Include qemu/main-loop.h less |
Date: |
Wed, 7 Aug 2019 15:18:20 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 |
On 8/6/19 5:14 PM, Markus Armbruster wrote:
> 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 <address@hidden>
> ---
> accel/kvm/kvm-all.c | 1 +
> block.c | 1 +
> block/block-backend.c | 1 +
> block/create.c | 1 +
> block/io.c | 1 +
> block/nbd.c | 1 +
> block/nfs.c | 1 +
> block/nvme.c | 1 +
> block/qcow2.c | 1 +
> block/qed.c | 1 +
> block/sheepdog.c | 1 +
> block/throttle-groups.c | 1 +
> blockdev.c | 1 +
> blockjob.c | 1 +
> chardev/baum.c | 1 +
> chardev/char-pipe.c | 1 +
> chardev/char-win-stdio.c | 1 +
> chardev/char-win.c | 1 +
> dump/dump.c | 1 +
> fsdev/qemu-fsdev-throttle.c | 1 +
> fsdev/qemu-fsdev-throttle.h | 1 -
> hw/9pfs/9p.c | 1 +
> hw/9pfs/codir.c | 1 +
> hw/9pfs/cofile.c | 1 +
> hw/9pfs/cofs.c | 1 +
> hw/9pfs/coth.c | 1 +
> hw/9pfs/coth.h | 1 -
> hw/9pfs/coxattr.c | 1 +
> hw/9pfs/xen-9p-backend.c | 1 +
> hw/arm/omap1.c | 1 +
> hw/block/dataplane/virtio-blk.c | 1 +
> hw/block/dataplane/xen-block.c | 1 +
> hw/block/fdc.c | 1 +
> hw/block/xen-block.c | 1 +
> hw/char/virtio-serial-bus.c | 1 +
> hw/core/machine-qmp-cmds.c | 1 +
> hw/display/qxl.c | 1 +
> hw/dma/etraxfs_dma.c | 1 +
> hw/i386/intel_iommu.c | 1 +
> hw/i386/xen/xen-hvm.c | 1 +
> hw/ide/ahci.c | 1 +
> hw/ide/core.c | 1 +
> hw/ide/qdev.c | 1 +
> hw/intc/s390_flic.c | 1 +
> hw/m68k/mcf5206.c | 1 +
> hw/m68k/mcf5208.c | 1 +
> hw/misc/imx6_src.c | 1 +
> hw/net/fsl_etsec/etsec.c | 1 +
> hw/net/lan9118.c | 1 +
> hw/net/vhost_net.c | 2 +-
> hw/net/virtio-net.c | 1 +
> hw/ppc/ppc.c | 1 +
> hw/ppc/ppc440_uc.c | 1 +
> hw/ppc/spapr_hcall.c | 1 +
> hw/ppc/spapr_rng.c | 1 +
> hw/scsi/mptsas.c | 1 +
> hw/scsi/scsi-disk.c | 1 +
> hw/scsi/vmw_pvscsi.c | 1 +
> hw/timer/allwinner-a10-pit.c | 1 +
> hw/timer/altera_timer.c | 1 +
> hw/timer/etraxfs_timer.c | 1 +
> hw/timer/exynos4210_rtc.c | 1 +
> hw/timer/milkymist-sysctl.c | 1 +
> hw/usb/dev-uas.c | 1 +
> hw/usb/hcd-ehci.c | 1 +
> hw/usb/host-libusb.c | 1 +
> hw/usb/xen-usb.c | 1 +
> hw/vfio/ccw.c | 1 +
> hw/vfio/common.c | 1 +
> hw/vfio/pci.c | 1 +
> hw/vfio/platform.c | 1 +
> hw/virtio/vhost-backend.c | 1 +
> hw/virtio/vhost-user.c | 1 +
> hw/virtio/virtio-crypto.c | 1 +
> hw/virtio/virtio-pmem.c | 1 +
> hw/virtio/virtio.c | 1 +
> hw/xen/xen-legacy-backend.c | 1 +
> hw/xen/xen_pvdev.c | 1 +
> include/block/block_int.h | 1 -
> include/chardev/char-fe.h | 1 +
> include/chardev/char-io.h | 1 +
> include/chardev/char.h | 2 +-
> include/hw/scsi/scsi.h | 1 +
> include/sysemu/sysemu.h | 1 -
> memory.c | 1 +
> migration/block.c | 1 +
> migration/colo.c | 1 +
> migration/migration.c | 1 +
> migration/savevm.c | 1 +
> nbd/nbd-internal.h | 1 -
> net/can/can_socketcan.c | 1 +
> net/tap-win32.c | 1 +
> net/tap.c | 1 +
> qemu-img.c | 1 +
> qom/cpu.c | 1 +
> replay/replay-internal.c | 1 +
> target/arm/helper-a64.c | 1 +
> target/arm/helper.c | 2 ++
> target/arm/kvm.c | 1 +
> target/arm/kvm64.c | 1 +
> target/arm/m_helper.c | 2 ++
> target/arm/psci.c | 2 ++
> target/i386/kvm.c | 1 +
> target/lm32/op_helper.c | 1 +
> target/mips/kvm.c | 1 +
> target/ppc/int_helper.c | 2 ++
> target/ppc/kvm.c | 1 +
> target/ppc/machine.c | 1 +
> target/ppc/mem_helper.c | 2 ++
> target/ppc/misc_helper.c | 2 ++
> target/ppc/mmu_helper.c | 2 ++
> target/ppc/translate.c | 1 +
> target/s390x/kvm.c | 1 +
> tcg/tcg-op-gvec.c | 1 +
> 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 +
> ui/input-linux.c | 1 +
> ui/spice-core.c | 1 +
> ui/spice-display.c | 1 +
> ui/vnc-auth-sasl.h | 1 -
> ui/vnc.c | 1 +
> util/oslib-posix.c | 1 +
> 127 files changed, 128 insertions(+), 8 deletions(-)
>
[...]
> diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
> index 77f5df59b0..ac18a1184a 100644
> --- a/include/sysemu/sysemu.h
> +++ b/include/sysemu/sysemu.h
> @@ -5,7 +5,6 @@
> #include "qapi/qapi-types-run-state.h"
> #include "qemu/timer.h"
> #include "qemu/notify.h"
> -#include "qemu/main-loop.h"
> #include "qemu/bitmap.h"
> #include "qemu/uuid.h"
> #include "qom/object.h"
[...]
You missed to adapt ui/cocoa.m, building fails on OSX:
OBJC ui/cocoa.o
ui/cocoa.m:141:19: warning: implicit declaration of function
'qemu_mutex_iothread_locked' is invalid in C99
[-Wimplicit-function-declaration]
bool locked = qemu_mutex_iothread_locked();
^
ui/cocoa.m:141:19: warning: this function declaration is not a prototype
[-Wstrict-prototypes]
ui/cocoa.m:143:9: warning: implicit declaration of function
'qemu_mutex_lock_iothread' is invalid in C99
[-Wimplicit-function-declaration]
qemu_mutex_lock_iothread();
^
ui/cocoa.m:143:9: warning: this function declaration is not a prototype
[-Wstrict-prototypes]
ui/cocoa.m:147:9: warning: implicit declaration of function
'qemu_mutex_unlock_iothread' is invalid in C99
[-Wimplicit-function-declaration]
qemu_mutex_unlock_iothread();
^
ui/cocoa.m:147:9: warning: this function declaration is not a prototype
[-Wstrict-prototypes]
ui/cocoa.m:153:19: warning: implicit declaration of function
'qemu_mutex_iothread_locked' is invalid in C99
[-Wimplicit-function-declaration]
bool locked = qemu_mutex_iothread_locked();
^
ui/cocoa.m:157:9: warning: implicit declaration of function
'qemu_mutex_lock_iothread' is invalid in C99
[-Wimplicit-function-declaration]
qemu_mutex_lock_iothread();
^
ui/cocoa.m:161:9: warning: implicit declaration of function
'qemu_mutex_unlock_iothread' is invalid in C99
[-Wimplicit-function-declaration]
qemu_mutex_unlock_iothread();
^
- Re: [Qemu-devel] [PATCH v2 22/29] Include hw/boards.h a bit less, (continued)
[Qemu-devel] [PATCH v2 08/29] Include sysemu/reset.h a lot less, Markus Armbruster, 2019/08/06
[Qemu-devel] [PATCH v2 28/29] sysemu: Move the VMChangeStateEntry typedef to qemu/typedefs.h, Markus Armbruster, 2019/08/06
[Qemu-devel] [PATCH v2 20/29] Include qemu/main-loop.h less, Markus Armbruster, 2019/08/06
- Re: [Qemu-devel] [PATCH v2 20/29] Include qemu/main-loop.h less,
Philippe Mathieu-Daudé <=
[Qemu-devel] [PATCH v2 26/29] Clean up inclusion of sysemu/sysemu.h, Markus Armbruster, 2019/08/06
[Qemu-devel] [PATCH v2 27/29] Include sysemu/sysemu.h a lot less, Markus Armbruster, 2019/08/06