-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> Acked-by: Paolo Bonzini <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Message-Id: <[email protected]> Signed-off-by: Markus Armbruster <[email protected]>
- Loading branch information
Vladimir Sementsov-Ogievskiy
authored and
Markus Armbruster
committed
Jan 27, 2022
1 parent
bd2017b
commit b83a80e
Showing
3 changed files
with
19 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,6 +114,7 @@ foreach module : qapi_all_modules | |
'qapi-events-@[email protected]'.format(module), | ||
'qapi-commands-@[email protected]'.format(module), | ||
'qapi-commands-@[email protected]'.format(module), | ||
'qapi-commands-@[email protected]'.format(module), | ||
] | ||
endif | ||
if module.endswith('-target') | ||
|
@@ -126,7 +127,7 @@ endforeach | |
qapi_files = custom_target('shared QAPI source files', | ||
output: qapi_util_outputs + qapi_specific_outputs + qapi_nonmodule_outputs, | ||
input: [ files('qapi-schema.json') ], | ||
command: [ qapi_gen, '-o', 'qapi', '-b', '@INPUT0@' ], | ||
command: [ qapi_gen, '-o', 'qapi', '-b', '@INPUT0@', '--gen-trace' ], | ||
depend_files: [ qapi_inputs, qapi_gen_depends ]) | ||
|
||
# Now go through all the outputs and add them to the right sourceset. | ||
|
@@ -137,6 +138,9 @@ foreach output : qapi_util_outputs | |
if output.endswith('.h') | ||
genh += qapi_files[i] | ||
endif | ||
if output.endswith('.trace-events') | ||
qapi_trace_events += qapi_files[i] | ||
endif | ||
util_ss.add(qapi_files[i]) | ||
i = i + 1 | ||
endforeach | ||
|
@@ -145,6 +149,9 @@ foreach output : qapi_specific_outputs + qapi_nonmodule_outputs | |
if output.endswith('.h') | ||
genh += qapi_files[i] | ||
endif | ||
if output.endswith('.trace-events') | ||
qapi_trace_events += qapi_files[i] | ||
endif | ||
specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: qapi_files[i]) | ||
i = i + 1 | ||
endforeach |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters