Skip to content
This repository was archived by the owner on Oct 3, 2024. It is now read-only.

Commit 0a6d7d4

Browse files
committed
ftrace: Be more specific about arch impact when function tracer is enabled
It was brought up that on ARMv7, that because the FUNCTION_TRACER does not use nops to keep function tracing disabled because of the use of a link register, it does have some performance impact. The start of functions when -pg is used to compile the kernel is: push {lr} bl 8010e7c0 <__gnu_mcount_nc> When function tracing is tuned off, it becomes: push {lr} add sp, sp, #4 Which just puts the stack back to its normal location. But these two instructions at the start of every function does incur some overhead. Be more honest in the Kconfig FUNCTION_TRACER description and specify that the overhead being in the noise was x86 specific, but other architectures may vary. Link: https://lore.kernel.org/all/[email protected]/ Link: https://lkml.kernel.org/r/[email protected] Reported-by: Sascha Hauer <[email protected]> Acked-by: Sascha Hauer <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent 495fcec commit 0a6d7d4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kernel/trace/Kconfig

+2-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ config FUNCTION_TRACER
194194
sequence is then dynamically patched into a tracer call when
195195
tracing is enabled by the administrator. If it's runtime disabled
196196
(the bootup default), then the overhead of the instructions is very
197-
small and not measurable even in micro-benchmarks.
197+
small and not measurable even in micro-benchmarks (at least on
198+
x86, but may have impact on other architectures).
198199

199200
config FUNCTION_GRAPH_TRACER
200201
bool "Kernel Function Graph Tracer"

0 commit comments

Comments
 (0)