#
7137a960 |
| 09-Oct-2020 |
John Snow <jsnow@redhat.com> |
qapi: Prefer explicit relative imports
All of the QAPI include statements are changed to be package-aware, as explicit relative imports.
A quirk of Python packages is that the name of the package e
qapi: Prefer explicit relative imports
All of the QAPI include statements are changed to be package-aware, as explicit relative imports.
A quirk of Python packages is that the name of the package exists only *outside* of the package. This means that to a module inside of the qapi folder, there is inherently no such thing as the "qapi" package. The reason these imports work is because the "qapi" package exists in the context of the caller -- the execution shim, where sys.path includes a directory that has a 'qapi' folder in it.
When we write "from qapi import sibling", we are NOT referencing the folder 'qapi', but rather "any package named qapi in sys.path". If you should so happen to have a 'qapi' package in your path, it will use *that* package.
When we write "from .sibling import foo", we always reference explicitly our sibling module; guaranteeing consistency in *where* we are importing these modules from.
This can be useful when working with virtual environments and packages in development mode. In development mode, a package is installed as a series of symlinks that forwards to your same source files. The problem arises because code quality checkers will follow "import qapi.x" to the "installed" version instead of the sibling file and -- even though they are the same file -- they have different module paths, and this causes cyclic import problems, false positive type mismatch errors, and more.
It can also be useful when dealing with hierarchical packages, e.g. if we allow qemu.core.qmp, qemu.qapi.parser, etc.
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Cleber Rosa <crosa@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20201009161558.107041-6-jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
#
cbf97d5b |
| 16-Jul-2020 |
Markus Armbruster <armbru@redhat.com> |
qapi: Fix visit_type_STRUCT() not to fail for null object
To make deallocating partially constructed objects work, the visit_type_STRUCT() need to succeed without doing anything when passed a null o
qapi: Fix visit_type_STRUCT() not to fail for null object
To make deallocating partially constructed objects work, the visit_type_STRUCT() need to succeed without doing anything when passed a null object.
Commit cdd2b228b9 "qapi: Smooth visitor error checking in generated code" broke that. To reproduce, run tests/test-qobject-input-visitor with AddressSanitizer:
==4353==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 16 byte(s) in 1 object(s) allocated from: #0 0x7f192d0c5d28 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xded28) #1 0x7f192cd21b10 in g_malloc0 (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x51b10) #2 0x556725f6bbee in visit_next_list qapi/qapi-visit-core.c:86 #3 0x556725f49e15 in visit_type_UserDefOneList tests/test-qapi-visit.c:474 #4 0x556725f4489b in test_visitor_in_fail_struct_in_list tests/test-qobject-input-visitor.c:1086 #5 0x7f192cd42f29 (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x72f29)
SUMMARY: AddressSanitizer: 16 byte(s) leaked in 1 allocation(s).
Test case /visitor/input/fail/struct-in-list feeds a list with a bad element to the QObject input visitor. Visiting that element duly fails, and aborts the visit with the list only partially constructed: the faulty object is null. Cleaning up the partially constructed list visits that null object, fails, and aborts the visit before the list node gets freed.
Fix the the generated visit_type_STRUCT() to succeed for null objects.
Fixes: cdd2b228b973d2a29edf7696ef6e8b08ec329019 Reported-by: Li Qiang <liq3ea@163.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200716150617.4027356-1-armbru@redhat.com> Tested-by: Li Qiang <liq3ea@gmail.com> Reviewed-by: Li Qiang <liq3ea@gmail.com>
show more ...
|
#
cdd2b228 |
| 07-Jul-2020 |
Markus Armbruster <armbru@redhat.com> |
qapi: Smooth visitor error checking in generated code
Use visitor functions' return values to check for failure. Eliminate error_propagate() that are now unnecessary. Delete @err that are now unus
qapi: Smooth visitor error checking in generated code
Use visitor functions' return values to check for failure. Eliminate error_propagate() that are now unnecessary. Delete @err that are now unused.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20200707160613.848843-41-armbru@redhat.com>
show more ...
|
#
012d4c96 |
| 07-Jul-2020 |
Markus Armbruster <armbru@redhat.com> |
qapi: Make visitor functions taking Error ** return bool, not void
See recent commit "error: Document Error API usage rules" for rationale.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Revi
qapi: Make visitor functions taking Error ** return bool, not void
See recent commit "error: Document Error API usage rules" for rationale.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20200707160613.848843-18-armbru@redhat.com>
show more ...
|
#
7111a86e |
| 24-Apr-2020 |
Markus Armbruster <armbru@redhat.com> |
qapi: Assert non-input visitors see only valid alternate tags
An alternate type's visit_type_FOO() fails when it runs into an invalid ->type.
This is appropriate with an input visitor: visit_start_
qapi: Assert non-input visitors see only valid alternate tags
An alternate type's visit_type_FOO() fails when it runs into an invalid ->type.
This is appropriate with an input visitor: visit_start_alternate() sets ->type according to the input, and bad input can lead to bad ->type.
It should never happen with an output, clone or dealloc visitor: if it did, the alternate being output, cloned or deallocated would be messed up beyond repair. Assert that.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20200424084338.26803-12-armbru@redhat.com>
show more ...
|
#
c978bd52 |
| 24-Apr-2020 |
Markus Armbruster <armbru@redhat.com> |
qapi: Clean up visitor's recovery from input with invalid type
An alternate type's visit_type_FOO() fails when it runs into an invalid ->type. If it's an input visit, we then need to free the the o
qapi: Clean up visitor's recovery from input with invalid type
An alternate type's visit_type_FOO() fails when it runs into an invalid ->type. If it's an input visit, we then need to free the the object we got from visit_start_alternate(). We do that with qapi_free_FOO(), which uses the dealloc visitor.
Trouble is that object is in a bad state: its ->type is invalid. So the dealloc visitor will run into the same error again, and the error recovery skips deallocating the alternate's (invalid) alternative. Works, because qapi_free_FOO() ignores the error.
Avoid it instead: free the messed up object with by g_free().
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200424084338.26803-11-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
show more ...
|
#
8e08bf4e |
| 24-Apr-2020 |
Markus Armbruster <armbru@redhat.com> |
qapi: Assert incomplete object occurs only in dealloc visitor
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20200424084338.26803-7-arm
qapi: Assert incomplete object occurs only in dealloc visitor
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20200424084338.26803-7-armbru@redhat.com>
show more ...
|
#
7b3bc9e2 |
| 17-Mar-2020 |
Markus Armbruster <armbru@redhat.com> |
qapi: Consistently put @features parameter right after @ifcond
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Bla
qapi: Consistently put @features parameter right after @ifcond
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20200317115459.31821-14-armbru@redhat.com>
show more ...
|
#
013b4efc |
| 17-Mar-2020 |
Markus Armbruster <armbru@redhat.com> |
qapi: Add feature flags to remaining definitions
In v4.1.0, we added feature flags just to struct types (commit 6a8c0b5102^..f3ed93d545), to satisfy an immediate need (commit c9d4070991 "file-posix:
qapi: Add feature flags to remaining definitions
In v4.1.0, we added feature flags just to struct types (commit 6a8c0b5102^..f3ed93d545), to satisfy an immediate need (commit c9d4070991 "file-posix: Add dynamic-auto-read-only QAPI feature"). In v4.2.0, we added them to commands (commit 23394b4c39 "qapi: Add feature flags to commands") to satisfy another immediate need (commit d76744e65e "qapi: Allow introspecting fix for savevm's cooperation with blockdev").
Add them to the remaining definitions: enumeration types, union types, alternate types, and events.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20200317115459.31821-13-armbru@redhat.com>
show more ...
|
#
2cae67bc |
| 04-Mar-2020 |
Markus Armbruster <armbru@redhat.com> |
qapi: Use super() now we have Python 3
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200304155932.20452-4-armbru@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com>
|
#
3bef3aae |
| 20-Nov-2019 |
Markus Armbruster <armbru@redhat.com> |
qapi: Simplify QAPISchemaModularCVisitor
Since the previous commit, QAPISchemaVisitor.visit_module() is called just once. Simplify QAPISchemaModularCVisitor accordingly.
Signed-off-by: Markus Armb
qapi: Simplify QAPISchemaModularCVisitor
Since the previous commit, QAPISchemaVisitor.visit_module() is called just once. Simplify QAPISchemaModularCVisitor accordingly.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20191120182551.23795-7-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
show more ...
|
#
e6c42b96 |
| 18-Oct-2019 |
Markus Armbruster <armbru@redhat.com> |
qapi: Split up scripts/qapi/common.py
The QAPI code generator clocks in at some 3100 SLOC in 8 source files. Almost 60% of the code is in qapi/common.py. Split it into more focused modules:
* Move
qapi: Split up scripts/qapi/common.py
The QAPI code generator clocks in at some 3100 SLOC in 8 source files. Almost 60% of the code is in qapi/common.py. Split it into more focused modules:
* Move QAPISchemaPragma and QAPISourceInfo to qapi/source.py.
* Move QAPIError and its sub-classes to qapi/error.py.
* Move QAPISchemaParser and QAPIDoc to parser.py. Use the opportunity to put QAPISchemaParser first.
* Move check_expr() & friends to qapi/expr.py. Use the opportunity to put the code into a more sensible order.
* Move QAPISchema & friends to qapi/schema.py
* Move QAPIGen and its sub-classes, ifcontext, QAPISchemaModularCVisitor, and QAPISchemaModularCVisitor to qapi/gen.py
* Delete camel_case(), it's unused since commit e98859a9b9 "qapi: Clean up after recent conversions to QAPISchemaVisitor"
A number of helper functions remain in qapi/common.py. I considered moving the code generator helpers to qapi/gen.py, but decided not to. Perhaps we should rewrite them as methods of QAPIGen some day.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20191018074345.24034-7-armbru@redhat.com> [Add "# -*- coding: utf-8 -*-" lines]
show more ...
|
#
6a8c0b51 |
| 06-Jun-2019 |
Kevin Wolf <kwolf@redhat.com> |
qapi: Add feature flags to struct types
Sometimes, the behaviour of QEMU changes without a change in the QMP syntax (usually by allowing values or operations that previously resulted in an error). Q
qapi: Add feature flags to struct types
Sometimes, the behaviour of QEMU changes without a change in the QMP syntax (usually by allowing values or operations that previously resulted in an error). QMP clients may still need to know whether they can rely on the changed behavior.
Let's add feature flags to the QAPI schema language, so that we can make such changes visible with schema introspection.
An example for a schema definition using feature flags looks like this:
{ 'struct': 'TestType', 'data': { 'number': 'int' }, 'features': [ 'allow-negative-numbers' ] }
Introspection information then looks like this:
{ "name": "TestType", "meta-type": "object", "members": [ { "name": "number", "type": "int" } ], "features": [ "allow-negative-numbers" ] }
This patch implements feature flags only for struct types. We'll implement them more widely as needed.
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20190606153803.5278-2-armbru@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
#
a8d25326 |
| 23-May-2019 |
Markus Armbruster <armbru@redhat.com> |
Include qemu-common.h exactly where needed
No header includes qemu-common.h after this commit, as prescribed by qemu-common.h's file comment.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Me
Include qemu-common.h exactly where needed
No header includes qemu-common.h after this commit, as prescribed by qemu-common.h's file comment.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190523143508.25387-5-armbru@redhat.com> [Rebased with conflicts resolved automatically, except for include/hw/arm/xlnx-zynqmp.h hw/arm/nrf51_soc.c hw/arm/msf2-soc.c block/qcow2-refcount.c block/qcow2-cluster.c block/qcow2-cache.c target/arm/cpu.h target/lm32/cpu.h target/m68k/cpu.h target/mips/cpu.h target/moxie/cpu.h target/nios2/cpu.h target/openrisc/cpu.h target/riscv/cpu.h target/tilegx/cpu.h target/tricore/cpu.h target/unicore32/cpu.h target/xtensa/cpu.h; bsd-user/main.c and net/tap-bsd.c fixed up]
show more ...
|
#
c2e196a9 |
| 14-Feb-2019 |
Markus Armbruster <armbru@redhat.com> |
qapi: Prepare for system modules other than 'builtin'
The next commit wants to generate qapi-emit-events.{c.h}. To enable that, extend QAPISchemaModularCVisitor to support additional "system module
qapi: Prepare for system modules other than 'builtin'
The next commit wants to generate qapi-emit-events.{c.h}. To enable that, extend QAPISchemaModularCVisitor to support additional "system modules", i.e. modules that don't correspond to a (user-defined) QAPI schema module.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190214152251.2073-5-armbru@redhat.com>
show more ...
|
#
dcac6471 |
| 14-Feb-2019 |
Markus Armbruster <armbru@redhat.com> |
qapi: Clean up modular built-in code generation a bit
We neglect to call .visit_module() for the special module we use for built-ins. Harmless, but clean it up anyway. The tests/qapi-schema/*.out
qapi: Clean up modular built-in code generation a bit
We neglect to call .visit_module() for the special module we use for built-ins. Harmless, but clean it up anyway. The tests/qapi-schema/*.out now show the built-in module as 'module None'.
Subclasses of QAPISchemaModularCVisitor need to ._add_module() this special module to enable code generation for built-ins. When this hasn't been done, QAPISchemaModularCVisitor.visit_module() does nothing for the special module. That looks like built-ins could accidentally be generated into the wrong module when a subclass neglects to call ._add_module(). Can't happen, because built-ins are all visited before any other module. But that's non-obvious. Switch off code generation explicitly.
Rename QAPISchemaModularCVisitor._begin_module() to ._begin_user_module().
New QAPISchemaModularCVisitor._is_builtin_module(), for clarity.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190214152251.2073-4-armbru@redhat.com>
show more ...
|
#
8ee06f61 |
| 13-Dec-2018 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
qapi: Add #if conditions to generated code members
Wrap generated enum and struct members and their supporting code with #if/#endif, using the .ifcond members added in the previous patches.
We do e
qapi: Add #if conditions to generated code members
Wrap generated enum and struct members and their supporting code with #if/#endif, using the .ifcond members added in the previous patches.
We do enum and struct in a single patch because union tag enum and the associated variants tie them together, and dealing with that to split the patch doesn't seem worthwhile.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20181213123724.4866-18-marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
#
1962bd39 |
| 13-Dec-2018 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
qapi: change enum visitor and gen_enum* to take QAPISchemaMember
This will allow to add and access more properties associated with enum values/members, like the associated 'if' condition. We may wan
qapi: change enum visitor and gen_enum* to take QAPISchemaMember
This will allow to add and access more properties associated with enum values/members, like the associated 'if' condition. We may want to have a specialized type QAPISchemaEnumMember, for now this will do.
Modify gen_enum() and gen_enum_lookup() for the same reason.
Suggested-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20181213123724.4866-3-marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
#
b736e25a |
| 21-Jun-2018 |
Markus Armbruster <armbru@redhat.com> |
qapi: Fix some pycodestyle-3 complaints
Fix the following issues:
common.py:873:13: E129 visually indented line with same indent as next logical line common.py:1766:5: E741 ambiguous variab
qapi: Fix some pycodestyle-3 complaints
Fix the following issues:
common.py:873:13: E129 visually indented line with same indent as next logical line common.py:1766:5: E741 ambiguous variable name 'l' common.py:1784:1: E305 expected 2 blank lines after class or function definition, found 1 common.py:1833:1: E305 expected 2 blank lines after class or function definition, found 1 common.py:1843:1: E305 expected 2 blank lines after class or function definition, found 1 visit.py:181:18: E127 continuation line over-indented for visual indent
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20180621083551.775-1-armbru@redhat.com> [Fixup squashed in:] Message-ID: <871sd0nzw9.fsf@dusky.pond.sub.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
show more ...
|
#
9f88c662 |
| 03-Jul-2018 |
Markus Armbruster <armbru@redhat.com> |
qapi-types: add #if conditions to types & visitors
Types & visitors are coupled and must be handled together to avoid temporary build regression.
Wrap generated types/visitor code with #if/#endif u
qapi-types: add #if conditions to types & visitors
Types & visitors are coupled and must be handled together to avoid temporary build regression.
Wrap generated types/visitor code with #if/#endif using the context helpers. Derived from a patch by Marc-André.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180703155648.11933-12-marcandre.lureau@redhat.com>
show more ...
|
#
fbf09a2f |
| 03-Jul-2018 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
qapi: add 'ifcond' to visitor methods
Modify the test visitor to check correct passing of values.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armb
qapi: add 'ifcond' to visitor methods
Modify the test visitor to check correct passing of values.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180703155648.11933-5-marcandre.lureau@redhat.com> [Accidental change to roms/seabios dropped] Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
#
800877bb |
| 18-Jun-2018 |
Anton Nefedov <anton.nefedov@virtuozzo.com> |
qapi: allow empty branches in flat unions
It often happens that just a few discriminator values imply extra data in a flat union. Existing checks did not make possible to leave other values uncovere
qapi: allow empty branches in flat unions
It often happens that just a few discriminator values imply extra data in a flat union. Existing checks did not make possible to leave other values uncovered. Such cases had to be worked around by either stating a dummy (empty) type or introducing another (subset) discriminator enumeration.
Both options create redundant entities in qapi files for little profit.
With this patch it is not necessary anymore to add designated union fields for every possible value of a discriminator enumeration.
Signed-off-by: Anton Nefedov <anton.nefedov@virtuozzo.com> Message-Id: <1529311206-76847-2-git-send-email-anton.nefedov@virtuozzo.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
#
a48e7542 |
| 21-Mar-2018 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
qapi/visit: remove useless prefix argument
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20180321115211.17937-2-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbrus
qapi/visit: remove useless prefix argument
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20180321115211.17937-2-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
#
eb815e24 |
| 11-Feb-2018 |
Markus Armbruster <armbru@redhat.com> |
qapi: Move qapi-schema.json to qapi/, rename generated files
Move qapi-schema.json to qapi/, so it's next to its modules, and all files get generated to qapi/, not just the ones generated for module
qapi: Move qapi-schema.json to qapi/, rename generated files
Move qapi-schema.json to qapi/, so it's next to its modules, and all files get generated to qapi/, not just the ones generated for modules.
Consistently name the generated files qapi-MODULE.EXT: qmp-commands.[ch] become qapi-commands.[ch], qapi-event.[ch] become qapi-events.[ch], and qmp-introspect.[ch] become qapi-introspect.[ch]. This gets rid of the temporary hacks in scripts/qapi/commands.py, scripts/qapi/events.py, and scripts/qapi/common.py.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180211093607.27351-28-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> [eblake: Fix trailing dot in tpm.c, undo temporary hack for OSX toolchain] Signed-off-by: Eric Blake <eblake@redhat.com>
show more ...
|
#
9af23989 |
| 11-Feb-2018 |
Markus Armbruster <armbru@redhat.com> |
Include less of the generated modular QAPI headers
In my "build everything" tree, a change to the types in qapi-schema.json triggers a recompile of about 4800 out of 5100 objects.
The previous comm
Include less of the generated modular QAPI headers
In my "build everything" tree, a change to the types in qapi-schema.json triggers a recompile of about 4800 out of 5100 objects.
The previous commit split up qmp-commands.h, qmp-event.h, qmp-visit.h, qapi-types.h. Each of these headers still includes all its shards. Reduce compile time by including just the shards we actually need.
To illustrate the benefits: adding a type to qapi/migration.json now recompiles some 2300 instead of 4800 objects. The next commit will improve it further.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180211093607.27351-24-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> [eblake: rebase to master] Signed-off-by: Eric Blake <eblake@redhat.com>
show more ...
|