Since commit 0c0c52306f
("powerpc: Only support DYNAMIC_FTRACE not
static"), CONFIG_DYNAMIC_FTRACE is always selected when
CONFIG_FUNCTION_TRACER is selected.
To avoid confusion and have the reader wonder what's happen when
CONFIG_FUNCTION_TRACER is selected and CONFIG_DYNAMIC_FTRACE is not,
use CONFIG_FUNCTION_TRACER in ifdefs instead of CONFIG_DYNAMIC_FTRACE.
As CONFIG_FUNCTION_GRAPH_TRACER depends on CONFIG_FUNCTION_TRACER,
ftrace.o doesn't need to appear for both symbols in Makefile.
Then as ftrace.o is built only when CONFIG_FUNCTION_TRACER is selected
ifdef CONFIG_FUNCTION_TRACER is not needed in ftrace.c, and since it
implies CONFIG_DYNAMIC_FTRACE, CONFIG_DYNAMIC_FTRACE is not needed
in ftrace.c
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/628d357503eb90b4a034f99b7df516caaff4d279.1652074503.git.christophe.leroy@csgroup.eu
27 lines
705 B
Makefile
27 lines
705 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Makefile for the powerpc trace subsystem
|
|
#
|
|
|
|
ifdef CONFIG_FUNCTION_TRACER
|
|
# do not trace tracer code
|
|
CFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE)
|
|
endif
|
|
|
|
obj32-$(CONFIG_FUNCTION_TRACER) += ftrace_mprofile.o
|
|
ifdef CONFIG_MPROFILE_KERNEL
|
|
obj64-$(CONFIG_FUNCTION_TRACER) += ftrace_mprofile.o
|
|
else
|
|
obj64-$(CONFIG_FUNCTION_TRACER) += ftrace_64_pg.o
|
|
endif
|
|
obj-$(CONFIG_FUNCTION_TRACER) += ftrace_low.o ftrace.o
|
|
obj-$(CONFIG_TRACING) += trace_clock.o
|
|
|
|
obj-$(CONFIG_PPC64) += $(obj64-y)
|
|
obj-$(CONFIG_PPC32) += $(obj32-y)
|
|
|
|
# Disable GCOV, KCOV & sanitizers in odd or sensitive code
|
|
GCOV_PROFILE_ftrace.o := n
|
|
KCOV_INSTRUMENT_ftrace.o := n
|
|
UBSAN_SANITIZE_ftrace.o := n
|