Skip to content

Commit 3ce2b92

Browse files
fweisbecIngo Molnar
authored andcommitted
ftrace/fastboot: disable tracers self-tests when boot tracer is selected
The tracing engine resets the ring buffer and the tracers touch it too during self-tests. These self-tests happen during tracers registering and work against boot tracing which is logging initcalls. We have to disable tracing self-tests if the boot-tracer is selected. Reported-by: Ingo Molnar <[email protected]> Signed-off-by: Frederic Weisbecker <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
1 parent 3bf77af commit 3ce2b92

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

kernel/trace/Kconfig

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ config BOOT_TRACER
126126
the timings of the initcalls. Its aim is to be parsed by the
127127
/scripts/bootgraph.pl tool to produce pretty graphics about
128128
boot inefficiencies, giving a visual representation of the
129-
delays during initcalls.
129+
delays during initcalls. Note that tracers self tests can't
130+
be enabled if this tracer is selected since only one tracer
131+
should touch the tracing buffer at a time.
130132

131133
config STACK_TRACER
132134
bool "Trace max stack"
@@ -168,8 +170,7 @@ config FTRACE_SELFTEST
168170

169171
config FTRACE_STARTUP_TEST
170172
bool "Perform a startup test on ftrace"
171-
depends on TRACING
172-
depends on DEBUG_KERNEL
173+
depends on TRACING && DEBUG_KERNEL && !BOOT_TRACER
173174
select FTRACE_SELFTEST
174175
help
175176
This option performs a series of startup tests on ftrace. On bootup

0 commit comments

Comments
 (0)