Skip to contentSkip to conversation

tracing/function-graph-tracer: don't profile branches on graph tracer

PATCH In review Frederic Weisbecker 3 participants 3 messages Mar 22, 2009 – Mar 23, 2009 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tracing/function-graph-tracer: don't profile branches on graph tracer

Impact: fix slow tracing

The core kernel tracing is protected against soft branch profiling, but not the x86 ftrace arch part. Let's fix it.

---
 arch/x86/kernel/Makefile |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/x86/kernel/Makefile +1 -0
index 599e9a7..8d9b3f9 100644
@@ -13,6 +13,7 @@ CFLAGS_REMOVE_rtc.o = -pg
 CFLAGS_REMOVE_paravirt-spinlocks.o = -pg
 CFLAGS_REMOVE_ftrace.o = -pg
 CFLAGS_REMOVE_early_printk.o = -pg
+CFLAGS_ftrace.o += -DDISABLE_BRANCH_PROFILING
 endif
 
 #
Signature · 1 line
1.6.1
#1 lore raw
Quoted 4 lines · Frederic Weisbecker

Impact: fix slow tracing

The core kernel tracing is protected against soft branch profiling, but not the x86 ftrace arch part. Let's fix it.

right now we should simply disable the branch profiler if any function tracing variant is enabled.

We should probably mark it CONFIG_BROKEN until it's properly per-cpu-ized.

Ingo

#2 lore raw
In reply to Frederic Weisbecker
Quoted 15 lines · Frederic Weisbecker

Impact: fix slow tracing

The core kernel tracing is protected against soft branch profiling, but not the x86 ftrace arch part. Let's fix it.

---
 arch/x86/kernel/Makefile |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/x86/kernel/Makefile +0 -0
index 599e9a7..8d9b3f9 100644

arch/x86/kernel/Makefile CFLAGS_REMOVE_rtc.o = -pg · line 18

Quoted 6 lines
arch/x86/kernel/Makefile +1 -0
@@ -13,6 +13,7 @@ CFLAGS_REMOVE_rtc.o = -pg
 CFLAGS_REMOVE_paravirt-spinlocks.o = -pg
 CFLAGS_REMOVE_ftrace.o = -pg
 CFLAGS_REMOVE_early_printk.o = -pg
+CFLAGS_ftrace.o += -DDISABLE_BRANCH_PROFILING
 endif
 

Actually, I prefer not to do this. I do use the branch profiling on ftrace, to see where the hot paths are.

-- Steve