diff options
author | Vladimir Sementsov-Ogievskiy | 2022-01-26 17:11:27 +0100 |
---|---|---|
committer | Markus Armbruster | 2022-01-27 11:26:40 +0100 |
commit | b83a80e831137d57eadd3b91b74d06bf9d4a3f36 (patch) | |
tree | 85024f99894ab4b776ba82a3c584ee911490ccf3 /trace/meson.build | |
parent | qapi/commands: Optionally generate trace for QMP commands (diff) | |
download | qemu-b83a80e831137d57eadd3b91b74d06bf9d4a3f36.tar.gz qemu-b83a80e831137d57eadd3b91b74d06bf9d4a3f36.tar.xz qemu-b83a80e831137d57eadd3b91b74d06bf9d4a3f36.zip |
meson: generate trace events for qmp commands
1. Use --gen-trace when generate qmp commands
2. Add corresponding .trace-events files as outputs in qapi_files
custom target
3. Define global qapi_trace_events list of .trace-events file targets,
to fill in trace/qapi.build and to use in trace/meson.build
4. In trace/meson.build use the new array as an additional source of
.trace_events files to be processed
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20220126161130.3240892-5-vsementsov@virtuozzo.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'trace/meson.build')
-rw-r--r-- | trace/meson.build | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/trace/meson.build b/trace/meson.build index 573dd699c6..c4794a1f2a 100644 --- a/trace/meson.build +++ b/trace/meson.build @@ -2,10 +2,15 @@ specific_ss.add(files('control-target.c')) trace_events_files = [] -foreach dir : [ '.' ] + trace_events_subdirs - trace_events_file = meson.project_source_root() / dir / 'trace-events' +foreach item : [ '.' ] + trace_events_subdirs + qapi_trace_events + if item in qapi_trace_events + trace_events_file = item + group_name = item.full_path().split('/')[-1].underscorify() + else + trace_events_file = meson.project_source_root() / item / 'trace-events' + group_name = item == '.' ? 'root' : item.underscorify() + endif trace_events_files += [ trace_events_file ] - group_name = dir == '.' ? 'root' : dir.underscorify() group = '--group=' + group_name fmt = '@0@-' + group_name + '.@1@' |