summaryrefslogtreecommitdiffstats
path: root/trace
diff options
context:
space:
mode:
authorStefan Hajnoczi2020-11-19 15:14:57 +0100
committerStefan Hajnoczi2020-11-19 17:41:09 +0100
commit4b265c79a85bb35abe19aacea6954c1616521639 (patch)
treefdd78ee2f1785fb77e98d6d911cdb20b47dc70a5 /trace
parentMerge remote-tracking branch 'remotes/cohuck/tags/s390x-20201119' into staging (diff)
downloadqemu-4b265c79a85bb35abe19aacea6954c1616521639.tar.gz
qemu-4b265c79a85bb35abe19aacea6954c1616521639.tar.xz
qemu-4b265c79a85bb35abe19aacea6954c1616521639.zip
trace: use STAP_SDT_V2 to work around symbol visibility
QEMU binaries no longer launch successfully with recent SystemTap releases. This is because modular QEMU builds link the sdt semaphores into the main binary instead of into the shared objects where they are used. The symbol visibility of semaphores is 'hidden' and the dynamic linker prints an error during module loading: $ ./configure --enable-trace-backends=dtrace --enable-modules ... ... Failed to open module: /builddir/build/BUILD/qemu-4.2.0/s390x-softmmu/../block-curl.so: undefined symbol: qemu_curl_close_semaphore The long-term solution is to generate per-module dtrace .o files and link them into the module instead of the main binary. In the short term we can define STAP_SDT_V2 so dtrace(1) produces a .o file with 'default' symbol visibility instead of 'hidden'. This workaround is small and easier to merge for QEMU 5.2 and downstream backports. Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1898700 Cc: wcohen@redhat.com Cc: fche@redhat.com Cc: kraxel@redhat.com Cc: rjones@redhat.com Cc: ddepaula@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Miroslav Rezanina <mrezanin@redhat.com> Message-id: 20201119141457.844452-1-stefanha@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'trace')
-rw-r--r--trace/meson.build4
1 files changed, 2 insertions, 2 deletions
diff --git a/trace/meson.build b/trace/meson.build
index d5fc45c628..843ea14495 100644
--- a/trace/meson.build
+++ b/trace/meson.build
@@ -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