Skip to contentSkip to conversation

tracing: fixes for tracing virt guests

GIT PULL New Steven Rostedt 2 participants 4 messages Sep 23, 2010 x86

lore
Share & tools
lore
#0 lore raw

Ingo,

I actually did these fixes back in July for RHEL, but forgot about them for mainline :-(

Jeremy hit the same bug and set me a fix. It was only part of what I did in July, so I pulled in his fix and added the second part.

Please pull the latest tip/perf/urgent tree, which can be found at:

git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
tip/perf/urgent

Jeremy Fitzhardinge (1):
tracing/x86: Don't use mcount in pvclock.c

Steven Rostedt (1):
tracing/x86: Don't use mcount in kvmclock.c

----

 arch/x86/kernel/Makefile |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
#1 lore raw

PATCH 1/2 tracing/x86: Dont use mcount in pvclock.c

From: Jeremy Fitzhardinge <[email protected]>

When using a paravirt clock, pvclock.c can be used by sched_clock(), which in turn is used by the tracing mechanism for timestamps, which leads to infinite recursion.

Disable mcount/tracing for pvclock.o.

LKML-Reference: <[email protected]>

---
 arch/x86/kernel/Makefile |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/x86/kernel/Makefile +1 -0
index 0925676..882bbff 100644
@@ -11,6 +11,7 @@ ifdef CONFIG_FUNCTION_TRACER
 CFLAGS_REMOVE_tsc.o = -pg
 CFLAGS_REMOVE_rtc.o = -pg
 CFLAGS_REMOVE_paravirt-spinlocks.o = -pg
+CFLAGS_REMOVE_pvclock.o = -pg
 CFLAGS_REMOVE_ftrace.o = -pg
 CFLAGS_REMOVE_early_printk.o = -pg
 endif
Signature · 1 line
1.7.1
#2 lore raw

PATCH 2/2 tracing/x86: Dont use mcount in kvmclock.c

In reply to Steven Rostedt

From: Steven Rostedt <[email protected]>

The guest can use the paravirt clock in kvmclock.c which is used by sched_clock(), which in turn is used by the tracing mechanism for timestamps, which leads to infinite recursion.

Disable mcount/tracing for kvmclock.o.

---
 arch/x86/kernel/Makefile |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/x86/kernel/Makefile +1 -0
index 882bbff..fedf32a 100644
@@ -12,6 +12,7 @@ CFLAGS_REMOVE_tsc.o = -pg
 CFLAGS_REMOVE_rtc.o = -pg
 CFLAGS_REMOVE_paravirt-spinlocks.o = -pg
 CFLAGS_REMOVE_pvclock.o = -pg
+CFLAGS_REMOVE_kvmclock.o = -pg
 CFLAGS_REMOVE_ftrace.o = -pg
 CFLAGS_REMOVE_early_printk.o = -pg
 endif
Signature · 1 line
1.7.1
#3 lore raw
In reply to Steven Rostedt
Quoted 17 lines · Steven Rostedt

Ingo,

I actually did these fixes back in July for RHEL, but forgot about them for mainline :-(

Jeremy hit the same bug and set me a fix. It was only part of what I did in July, so I pulled in his fix and added the second part.

Please pull the latest tip/perf/urgent tree, which can be found at:

git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
tip/perf/urgent

Jeremy Fitzhardinge (1):
tracing/x86: Don't use mcount in pvclock.c

Quoted 6 lines

Steven Rostedt (1):
tracing/x86: Don't use mcount in kvmclock.c

----

 arch/x86/kernel/Makefile |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Pulled, thanks Steve!

Ingo