Pull request

Fix --enable-modules --enable-trace-backends=dtrace with recent SystemTap
 releases.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAl+2oaUACgkQnKSrs4Gr
 c8jk2wf/SatkefAwjsp10/4RdIUxa5SqiqIGfXA43ImZXlVu+f9uicoFF6UJ1kDH
 6n20fRzgs+tbu0iNhVM8Ok9jqM8NW/ryevr2dGShElpq90Cp0C7hz3/sYnTzzF42
 aQiYgkMLSRQnNilEwt4OB4WrXOGOgQEVYkaLPzPyUFWRqf4GwcsAuC1oSZIHh9Im
 6LvAanGZBvl/OD+COlvOuSdlqfyv0xe3YLysWkXxtSvGB2hjJ47AZ+py4kc2gUrn
 v30oXg8RoQ991W4/y4foUa4Zdjj2WHXsEkSoiyfjYeMfC7hWHZYiCfBfRprk9YHU
 YTitnI1DhMqPSJs3YRa+bNeaa6hJmA==
 =7Ikq
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/stefanha-gitlab/tags/tracing-pull-request' into staging

Pull request

Fix --enable-modules --enable-trace-backends=dtrace with recent SystemTap
releases.

# gpg: Signature made Thu 19 Nov 2020 16:47:33 GMT
# gpg:                using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full]
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>" [full]
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8

* remotes/stefanha-gitlab/tags/tracing-pull-request:
  trace: use STAP_SDT_V2 to work around symbol visibility

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2020-11-19 17:08:42 +00:00
commit 7fbd7e7103
2 changed files with 9 additions and 2 deletions

7
configure vendored
View file

@ -4832,6 +4832,13 @@ if have_backend "dtrace"; then
trace_backend_stap="no"
if has 'stap' ; then
trace_backend_stap="yes"
# Workaround to avoid dtrace(1) producing a file with 'hidden' symbol
# visibility. Define STAP_SDT_V2 to produce 'default' symbol visibility
# instead. QEMU --enable-modules depends on this because the SystemTap
# semaphores are linked into the main binary and not the module's shared
# object.
QEMU_CFLAGS="$QEMU_CFLAGS -DSTAP_SDT_V2"
fi
fi

View file

@ -38,13 +38,13 @@ foreach dir : [ '.' ] + trace_events_subdirs
trace_dtrace_h = custom_target(fmt.format('trace-dtrace', 'h'),
output: fmt.format('trace-dtrace', 'h'),
input: trace_dtrace,
command: [ 'dtrace', '-o', '@OUTPUT@', '-h', '-s', '@INPUT@' ])
command: [ 'dtrace', '-DSTAP_SDT_V2', '-o', '@OUTPUT@', '-h', '-s', '@INPUT@' ])
trace_ss.add(trace_dtrace_h)
if host_machine.system() != 'darwin'
trace_dtrace_o = custom_target(fmt.format('trace-dtrace', 'o'),
output: fmt.format('trace-dtrace', 'o'),
input: trace_dtrace,
command: [ 'dtrace', '-o', '@OUTPUT@', '-G', '-s', '@INPUT@' ])
command: [ 'dtrace', '-DSTAP_SDT_V2', '-o', '@OUTPUT@', '-G', '-s', '@INPUT@' ])
trace_ss.add(trace_dtrace_o)
endif