mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 12:23:53 -06:00
qapi: generate trace events by default
We don't generate trace events for tests/ and qga/ because that it is not simple and not necessary. We have corresponding comments in both tests/meson.build and qga/meson.build. Still to not miss possible future qapi code generation call, and not to forget to enable trace events generation, let's enable it by default. So, turn option --gen-trace into opposite --no-trace-events and use new option only in tests/ and qga/ where we already have good comments why we don't generate trace events code. Note that this commit enables trace-events generation for qapi-gen.py call from tests/qapi-schema/meson.build and storage-daemon/meson.build. Still, both are kind of noop: tests/qapi-schema/ doesn't seem to generate any QMP command code and no .trace-events files anyway, storage-daemon/ uses common QMP command implementations and just generate empty .trace-events Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20220126161130.3240892-8-vsementsov@virtuozzo.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
378dfa482d
commit
761a1a488e
4 changed files with 9 additions and 7 deletions
|
@ -76,10 +76,10 @@ def main() -> int:
|
|||
dest='unmask',
|
||||
help="expose non-ABI names in introspection")
|
||||
|
||||
# Option --gen-trace exists so we can avoid solving build system
|
||||
# Option --suppress-tracing exists so we can avoid solving build system
|
||||
# problems. TODO Drop it when we no longer need it.
|
||||
parser.add_argument('--gen-trace', action='store_true',
|
||||
help="add trace events to qmp marshals")
|
||||
parser.add_argument('--suppress-tracing', action='store_true',
|
||||
help="suppress adding trace events to qmp marshals")
|
||||
|
||||
parser.add_argument('schema', action='store')
|
||||
args = parser.parse_args()
|
||||
|
@ -96,7 +96,7 @@ def main() -> int:
|
|||
prefix=args.prefix,
|
||||
unmask=args.unmask,
|
||||
builtins=args.builtins,
|
||||
gen_tracing=args.gen_trace)
|
||||
gen_tracing=not args.suppress_tracing)
|
||||
except QAPIError as err:
|
||||
print(f"{sys.argv[0]}: {str(err)}", file=sys.stderr)
|
||||
return 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue