[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH for-2.0 v2] configure: add workaround for SystemTap
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PATCH for-2.0 v2] configure: add workaround for SystemTap PR13296 |
Date: |
Fri, 21 Mar 2014 16:28:24 +0100 |
SystemTap sdt.h sometimes results in compiled probes without sufficient
information to extract arguments. See code comment for details on this
workaround.
This patch fixes the apic_reset_irq_delivered() trace event on Fedora 20
with gcc-4.8.2-7.fc20 and systemtap-sdt-devel-2.4-2.fc20 on x86_64.
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
configure | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/configure b/configure
index aae617e..6c86431 100755
--- a/configure
+++ b/configure
@@ -3635,6 +3635,22 @@ if test "$trace_backend" = "dtrace"; then
trace_backend_stap="no"
if has 'stap' ; then
trace_backend_stap="yes"
+
+ # Sometimes sdt.h probes produce insufficient information to access probe
+ # arguments. The compiler can be forced to place probe arguments in
+ # registers to avoid the issue. This workaround has a performance cost so
+ # it should be dropped if SystemTap is able to resolve the underlying
+ # issue.
+ #
+ # On host architectures that are starved for registers, it may not be
+ # possible to force arguments into registers and this causes a compiler
+ # error. Only apply this workaround on x86_64 where the problem has been
+ # observed.
+ #
+ # https://sourceware.org/bugzilla/show_bug.cgi?id=13296
+ if test "$ARCH" = "x86_64"; then
+ QEMU_CFLAGS="-DSTAP_SDT_ARG_CONSTRAINT=r $QEMU_CFLAGS"
+ fi
fi
fi
--
1.8.5.3
- [Qemu-devel] [PATCH for-2.0 v2] configure: add workaround for SystemTap PR13296,
Stefan Hajnoczi <=