[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 03/28] qapi: Split error.json off common.json
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH 03/28] qapi: Split error.json off common.json |
Date: |
Fri, 26 Jul 2019 16:34:11 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) |
Eric Blake <address@hidden> writes:
> On 7/26/19 7:05 AM, Markus Armbruster wrote:
>> In my "build everything" tree, changing a type in qapi/common.json
>> triggers a recompile of some 3600 out of 6600 objects (not counting
>> tests and objects that don't depend on qemu/osdep.h).
>>
>> One common dependency is QapiErrorClass: it's used only in in
>> qapi/error.h, which uses nothing else, and is widely included.
>>
>> Move QapiErrorClass from common.json to new error.json. Touching
>> common.json now recompiles only some 2900 objects.
>>
>> Cc: Eric Blake <address@hidden>
>> Signed-off-by: Markus Armbruster <address@hidden>
>> ---
>> MAINTAINERS | 2 ++
>> include/qapi/error.h | 2 +-
>> qapi/Makefile.objs | 2 +-
>> qapi/common.json | 24 ------------------------
>> qapi/error.json | 29 +++++++++++++++++++++++++++++
>> qapi/qapi-schema.json | 1 +
>> 6 files changed, 34 insertions(+), 26 deletions(-)
>> create mode 100644 qapi/error.json
>
>
>> +++ b/qapi/qapi-schema.json
>> @@ -80,6 +80,7 @@
>> # stable order, it's best to include each sub-schema just once, or
>> # include it first right here.
>>
>> +{ 'include': 'error.json' }
>> { 'include': 'common.json' }
>> { 'include': 'sockets.json' }
>> { 'include': 'run-state.json' }
>
> Any reason why error.json is needed before common.json? But I don't see
> it as being a problem, so
The QAPI language doesn't require definition before use. We commonly do
it anyway, because we find it easier to read.
error.json uses nothing and defines only enum QapiErrorClass, which is
implicitly used by commands that can fail. I like to put the enum
before the first command. Putting it before any other module is
easiest.
> Reviewed-by: Eric Blake <address@hidden>
Thanks!
- [Qemu-devel] [PATCH 00/28] Tame a few "touch this, recompile the world" headers, Markus Armbruster, 2019/07/26
- [Qemu-devel] [PATCH 10/28] ide: Include hw/ide/internal a bit less outside hw/ide/, Markus Armbruster, 2019/07/26
- [Qemu-devel] [PATCH 17/28] Include qom/object.h slightly less, Markus Armbruster, 2019/07/26
- [Qemu-devel] [PATCH 03/28] qapi: Split error.json off common.json, Markus Armbruster, 2019/07/26
- [Qemu-devel] [PATCH 09/28] Include migration/qemu-file-types.h a lot less, Markus Armbruster, 2019/07/26
- [Qemu-devel] [PATCH 27/28] sysemu: Move the VMChangeStateEntry typedef to qemu/typedefs.h, Markus Armbruster, 2019/07/26
- [Qemu-devel] [PATCH 05/28] queue: Drop superfluous #include qemu/atomic.h, Markus Armbruster, 2019/07/26
- [Qemu-devel] [PATCH 02/28] Include generated QAPI headers less, Markus Armbruster, 2019/07/26
- [Qemu-devel] [PATCH 06/28] trace: Eliminate use of TARGET_FMT_plx, Markus Armbruster, 2019/07/26
- [Qemu-devel] [PATCH 24/28] Include sysemu/hostmem.h less, Markus Armbruster, 2019/07/26