tracing/function-graph-tracer: don't profile branches on graph tracer
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
@@ -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
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
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.
Signed-off-by Frederic Weisbecker <[email protected]>--- arch/x86/kernel/Makefile | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)arch/x86/kernel/Makefile +0
-0
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