From: "Daniel P. Berrangé" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Daniel P. Berrangé" <berrange@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Eric Blake" <eblake@redhat.com>, "John Snow" <jsnow@redhat.com>,
"Mads Ynddal" <mads@ynddal.dk>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Cleber Rosa" <crosa@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH 2/2] meson: generate .stp files for tools too
Date: Mon, 8 Jan 2024 17:13:56 +0000 [thread overview]
Message-ID: <20240108171356.1037059-3-berrange@redhat.com> (raw)
In-Reply-To: <20240108171356.1037059-1-berrange@redhat.com>
The qemu-img, qemu-io, qemu-nbd, qemu-storage-daemon tools all have
support for systemtap tracing built-in, so should be given corresponding
.stp files to define their probes.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
meson.build | 61 +++++++++++++++++++++++++++++++++++------------------
1 file changed, 40 insertions(+), 21 deletions(-)
diff --git a/meson.build b/meson.build
index 535f15da69..4db6907a20 100644
--- a/meson.build
+++ b/meson.build
@@ -3752,6 +3752,7 @@ if targetos == 'darwin'
entitlement = find_program('scripts/entitlement.sh')
endif
+traceable = []
emulators = {}
foreach target : target_dirs
config_target = config_target_mak[target]
@@ -3919,27 +3920,11 @@ foreach target : target_dirs
emulators += {exe['name']: emulator}
endif
- if stap.found()
- foreach stp: [
- {'ext': '.stp-build', 'fmt': 'stap', 'bin': meson.current_build_dir() / exe['name'], 'install': false},
- {'ext': '.stp', 'fmt': 'stap', 'bin': get_option('prefix') / get_option('bindir') / exe['name'], 'install': true},
- {'ext': '-simpletrace.stp', 'fmt': 'simpletrace-stap', 'bin': '', 'install': true},
- {'ext': '-log.stp', 'fmt': 'log-stap', 'bin': '', 'install': true},
- ]
- custom_target(exe['name'] + stp['ext'],
- input: trace_events_all,
- output: exe['name'] + stp['ext'],
- install: stp['install'],
- install_dir: get_option('datadir') / 'systemtap/tapset',
- command: [
- tracetool, '--group=all', '--format=' + stp['fmt'],
- '--binary=' + stp['bin'],
- '--probe-prefix=qemu.' + target_type + '.' + target_name,
- '@INPUT@', '@OUTPUT@'
- ],
- depend_files: tracetool_depends)
- endforeach
- endif
+ traceable += [{
+ 'exe': exe['name'],
+ 'probe-prefix': 'qemu.' + target_type + '.' + target_name,
+ }]
+
endforeach
endforeach
@@ -3974,6 +3959,14 @@ if have_tools
install: true)
subdir('storage-daemon')
+
+ foreach exe: [ 'qemu-img', 'qemu-io', 'qemu-nbd', 'qemu-storage-daemon']
+ traceable += [{
+ 'exe': exe,
+ 'probe-prefix': 'qemu.' + exe.substring(5).replace('-', '_')
+ }]
+ endforeach
+
subdir('contrib/rdmacm-mux')
subdir('contrib/elf2dmp')
@@ -4006,6 +3999,32 @@ if have_tools
endif
endif
+if stap.found()
+ foreach t: traceable
+ foreach stp: [
+ {'ext': '.stp-build', 'fmt': 'stap', 'bin': meson.current_build_dir() / t['exe'], 'install': false},
+ {'ext': '.stp', 'fmt': 'stap', 'bin': get_option('prefix') / get_option('bindir') / t['exe'], 'install': true},
+ {'ext': '-simpletrace.stp', 'fmt': 'simpletrace-stap', 'bin': '', 'install': true},
+ {'ext': '-log.stp', 'fmt': 'log-stap', 'bin': '', 'install': true},
+ ]
+ cmd = [
+ tracetool, '--group=all', '--format=' + stp['fmt'],
+ '--binary=' + stp['bin'],
+ '--probe-prefix=' + t['probe-prefix'],
+ '@INPUT@', '@OUTPUT@'
+ ]
+
+ custom_target(t['exe'] + stp['ext'],
+ input: trace_events_all,
+ output: t['exe'] + stp['ext'],
+ install: stp['install'],
+ install_dir: get_option('datadir') / 'systemtap/tapset',
+ command: cmd,
+ depend_files: tracetool_depends)
+ endforeach
+ endforeach
+endif
+
subdir('scripts')
subdir('tools')
subdir('pc-bios')
--
2.43.0
next prev parent reply other threads:[~2024-01-08 17:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-08 17:13 [PATCH 0/2] trace: fix ability to use systemtap with qemu tools Daniel P. Berrangé
2024-01-08 17:13 ` [PATCH 1/2] tracetool: remove redundant --target-type / --target-name args Daniel P. Berrangé
2024-01-08 21:50 ` John Snow
2024-03-12 18:50 ` Stefan Hajnoczi
2024-01-08 17:13 ` Daniel P. Berrangé [this message]
2024-01-09 16:45 ` [PATCH 2/2] meson: generate .stp files for tools too Eric Blake
2024-02-16 13:09 ` [PATCH 0/2] trace: fix ability to use systemtap with qemu tools Daniel P. Berrangé
2024-03-12 11:34 ` Daniel P. Berrangé
2024-03-12 18:42 ` Stefan Hajnoczi
2024-03-12 18:52 ` Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240108171356.1037059-3-berrange@redhat.com \
--to=berrange@redhat.com \
--cc=crosa@redhat.com \
--cc=eblake@redhat.com \
--cc=jsnow@redhat.com \
--cc=mads@ynddal.dk \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).