All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-2.0 v2] configure: add workaround for SystemTap PR13296
@ 2014-03-21 15:28 Stefan Hajnoczi
  2014-03-21 16:39 ` Frank Ch. Eigler
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Hajnoczi @ 2014-03-21 15:28 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Frank Ch. Eigler, Stefan Hajnoczi, Peter Maydell

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 <stefanha@redhat.com>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-03-24 12:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-21 15:28 [Qemu-devel] [PATCH for-2.0 v2] configure: add workaround for SystemTap PR13296 Stefan Hajnoczi
2014-03-21 16:39 ` Frank Ch. Eigler
2014-03-24 12:55   ` Stefan Hajnoczi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.