mirror_qemu/include/block
Markus Armbruster 2ae16a6aa4 Include generated QAPI headers less
Some of the generated qapi-types-MODULE.h are included all over the
place.  Changing a QAPI type can trigger massive recompiling.  Top
scorers recompile more than 1000 out of some 6600 objects (not
counting tests and objects that don't depend on qemu/osdep.h):

    6300 qapi/qapi-builtin-types.h
    5700 qapi/qapi-types-run-state.h
    3900 qapi/qapi-types-common.h
    3300 qapi/qapi-types-sockets.h
    3000 qapi/qapi-types-misc.h
    3000 qapi/qapi-types-crypto.h
    3000 qapi/qapi-types-job.h
    3000 qapi/qapi-types-block-core.h
    2800 qapi/qapi-types-block.h
    1300 qapi/qapi-types-net.h

Clean up headers to include generated QAPI headers only where needed.
Impact is negligible except for hw/qdev-properties.h.

This header includes qapi/qapi-types-block.h and
qapi/qapi-types-misc.h.  They are used only in expansions of property
definition macros such as DEFINE_PROP_BLOCKDEV_ON_ERROR() and
DEFINE_PROP_OFF_AUTO().  Moving their inclusion from
hw/qdev-properties.h to the users of these macros avoids pointless
recompiles.  This is how other property definition macros, such as
DEFINE_PROP_NETDEV(), already work.

Improves things for some of the top scorers:

    3600 qapi/qapi-types-common.h
    2800 qapi/qapi-types-sockets.h
     900 qapi/qapi-types-misc.h
    2200 qapi/qapi-types-crypto.h
    2100 qapi/qapi-types-job.h
    2100 qapi/qapi-types-block-core.h
     270 qapi/qapi-types-block.h

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190812052359.30071-3-armbru@redhat.com>
2019-08-16 13:31:51 +02:00
..
accounting.h block/accounting: introduce latency histogram 2018-03-19 14:58:37 -05:00
aio-wait.h Clean up decorations and whitespace around header guards 2019-05-13 08:58:55 +02:00
aio.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
block.h Include generated QAPI headers less 2019-08-16 13:31:51 +02:00
block_backup.h block/backup: drop unused synchronization interface 2018-12-14 11:52:40 +01:00
block_int.h block: Do not poll in bdrv_do_drained_end() 2019-07-19 13:19:16 +02:00
blockjob.h blockdev: blockdev_mark_auto_del: drop usage of bs->job 2019-06-18 16:41:10 +02:00
blockjob_int.h block: Really pause block jobs on drain 2018-06-18 15:03:25 +02:00
dirty-bitmap.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
nbd.h qemu-nbd: Look up flag names in array 2019-05-07 09:43:42 -05:00
nvme.h nvme: add Get/Set Feature Timestamp support 2019-06-04 15:22:09 +02:00
qapi.h block/qapi: Clean up how we print to monitor or stdout 2019-04-18 22:18:59 +02:00
qdict.h block: Factor out qobject_input_visitor_new_flat_confused() 2018-06-15 14:49:44 +02:00
raw-aio.h include: Make headers more self-contained 2019-08-16 13:31:51 +02:00
snapshot.h block/snapshot: remove bdrv_snapshot_delete_by_id_or_name 2019-02-25 15:03:18 +01:00
thread-pool.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
throttle-groups.h throttle-groups: fix restart coroutine iothread race 2019-01-24 10:02:28 +00:00
write-threshold.h include: Make headers more self-contained 2019-08-16 13:31:51 +02:00