summaryrefslogtreecommitdiff
path: root/trace
diff options
context:
space:
mode:
authorTanish Desai <tanishdesai37@gmail.com>2025-09-29 17:49:31 +0200
committerStefan Hajnoczi <stefanha@redhat.com>2025-10-01 11:22:07 -0400
commit54140102d2e57bd2e34823e4537d2191cdcd5f08 (patch)
tree404273b713b3c959c0a55468fbe140a9c3033e72 /trace
parente2e182bef73f24d885f7f2ca589d8ec004c24877 (diff)
downloadqemu-54140102d2e57bd2e34823e4537d2191cdcd5f08.tar.gz
qemu-54140102d2e57bd2e34823e4537d2191cdcd5f08.zip
rust: add trace crate
The trace crate is a minimal container for dependencies of tracepoints (so that they do not have to be imported in all the crates that use tracepoints); it also contains a macro called "include_trace!" that is able to find the right include file from the trace/ directory. [Write commit message, add #[allow()]. - Paolo] Signed-off-by: Tanish Desai <tanishdesai37@gmail.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-ID: <20250929154938.594389-10-pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'trace')
-rw-r--r--trace/meson.build8
1 files changed, 7 insertions, 1 deletions
diff --git a/trace/meson.build b/trace/meson.build
index 9c42a57a05..d89a0db82a 100644
--- a/trace/meson.build
+++ b/trace/meson.build
@@ -1,5 +1,5 @@
system_ss.add(files('control-target.c', 'trace-hmp-cmds.c'))
-
+trace_rs_targets = []
trace_events_files = []
foreach item : [ '.' ] + trace_events_subdirs + qapi_trace_events
if item in qapi_trace_events
@@ -24,6 +24,11 @@ foreach item : [ '.' ] + trace_events_subdirs + qapi_trace_events
input: trace_events_file,
command: [ tracetool, group, '--format=c', '@INPUT@', '@OUTPUT@' ],
depend_files: tracetool_depends)
+ trace_rs = custom_target(fmt.format('trace', 'rs'),
+ output: fmt.format('trace', 'rs'),
+ input: trace_events_file,
+ command: [ tracetool, group, '--format=rs', '@INPUT@', '@OUTPUT@' ],
+ depend_files: tracetool_depends)
if 'ust' in get_option('trace_backends')
trace_ust_h = custom_target(fmt.format('trace-ust', 'h'),
output: fmt.format('trace-ust', 'h'),
@@ -34,6 +39,7 @@ foreach item : [ '.' ] + trace_events_subdirs + qapi_trace_events
genh += trace_ust_h
endif
trace_ss.add(trace_h, trace_c)
+ trace_rs_targets += trace_rs
if 'dtrace' in get_option('trace_backends')
trace_dtrace = custom_target(fmt.format('trace-dtrace', 'dtrace'),
output: fmt.format('trace-dtrace', 'dtrace'),