Skip to contentSkip to conversation

Tracing patches

GIT PULL Applied Stefan Hajnoczi 2 participants 3 messages Apr 1, 2014

lore
Share & tools
lore
#0 lore raw

This SystemTap fix makes the .stp file we generate work again.

The following changes since commit 63678e17cf399ff81b93417fe7bee8d6ef6b6b1b:

configure: add option to disable -fstack-protector flags (2014-03-31 20:16:02 +0100)

are available in the git repository at:

git://github.com/stefanha/qemu.git tags/tracing-pull-request

for you to fetch changes up to 9bcec938aab22a1b7ced916a6895e5029d4ed04f:

trace: add workaround for SystemTap PR13296 (2014-04-01 20:08:25 +0200)

----------------------------------------------------------------
Tracing pull request

----------------------------------------------------------------
Frank Ch. Eigler (1):
trace: add workaround for SystemTap PR13296

 hw/intc/apic_common.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
Signature · 1 line
1.9.0
#1 lore raw

[Qemu-devel] [PULL for-2.0 1/1] trace: add workaround for SystemTap PR13296

From: "Frank Ch. Eigler" <[email protected]>

SystemTap sdt.h sometimes results in compiled probes without sufficient information to extract arguments. This can be solved in a slightly hacky way by encouraging the compiler to place arguments into registers.

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.

---
 hw/intc/apic_common.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
hw/intc/apic_common.c +6 -1
index c623fcc..7ecce2d 100644
@@ -117,7 +117,12 @@ void apic_report_irq_delivered(int delivered)
 
 void apic_reset_irq_delivered(void)
 {
-    trace_apic_reset_irq_delivered(apic_irq_delivered);
+    /* Copy this into a local variable to encourage gcc to emit a plain
+     * register for a sys/sdt.h marker.  For details on this workaround, see:
+     * https://sourceware.org/bugzilla/show_bug.cgi?id=13296
+     */
+    volatile int a_i_d = apic_irq_delivered;
+    trace_apic_reset_irq_delivered(a_i_d);
 
     apic_irq_delivered = 0;
 }
Signature · 1 line
1.9.0
#2 lore raw
In reply to Stefan Hajnoczi
Quoted 6 lines · Stefan Hajnoczi

This SystemTap fix makes the .stp file we generate work again.

The following changes since commit 63678e17cf399ff81b93417fe7bee8d6ef6b6b1b:

configure: add option to disable -fstack-protector flags (2014-03-31 20:16:02 +0100)

Quoted 7 lines

are available in the git repository at:

git://github.com/stefanha/qemu.git tags/tracing-pull-request

for you to fetch changes up to 9bcec938aab22a1b7ced916a6895e5029d4ed04f:

trace: add workaround for SystemTap PR13296 (2014-04-01 20:08:25 +0200)

Applied, thanks. (That is a really ugly hack...)

-- PMM