qapi/gen: Add FOO.trace-events output module
commit4e86df17326d2afaf74622c082d906ed3f96d1d7
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Wed, 26 Jan 2022 16:11:24 +0000 (26 17:11 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Thu, 27 Jan 2022 10:24:18 +0000 (27 11:24 +0100)
treef0ee9acbae8b620050de83639f49521474f42b3d
parent7e7237cd2bebede25f43a550ccb1219070da427e
qapi/gen: Add FOO.trace-events output module

We are going to generate trace events for QMP commands. We should
generate both trace_*() function calls and trace-events files listing
events for trace generator.

So, add an output module FOO.trace-events for each FOO schema module.

Since we're going to add trace events only to command marshallers,
make the trace-events output optional, so we don't generate so many
useless empty files.

Currently nobody set add_trace_events to True, so new functionality is
disabled. It will be enabled for QAPISchemaGenCommandVisitor
in a further commit.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20220126161130.3240892-2-vsementsov@virtuozzo.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
scripts/qapi/gen.py