From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45256) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WR1zb-0001jC-IB for qemu-devel@nongnu.org; Fri, 21 Mar 2014 12:08:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WR1zV-0003FV-Nm for qemu-devel@nongnu.org; Fri, 21 Mar 2014 12:08:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1161) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WR1zV-0003FP-Fl for qemu-devel@nongnu.org; Fri, 21 Mar 2014 12:08:17 -0400 From: Stefan Hajnoczi Date: Fri, 21 Mar 2014 16:28:24 +0100 Message-Id: <1395415704-17528-1-git-send-email-stefanha@redhat.com> Subject: [Qemu-devel] [PATCH for-2.0 v2] configure: add workaround for SystemTap PR13296 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 --- 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