1# SPDX-License-Identifier: GPL-2.0
2#
3# Makefile for the powerpc trace subsystem
4#
5
6ifdef CONFIG_FUNCTION_TRACER
7# do not trace tracer code
8CFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE)
9endif
10
11obj32-$(CONFIG_FUNCTION_TRACER)		+= ftrace_mprofile.o
12ifdef CONFIG_MPROFILE_KERNEL
13obj64-$(CONFIG_FUNCTION_TRACER)		+= ftrace_mprofile.o
14else
15obj64-$(CONFIG_FUNCTION_TRACER)		+= ftrace_64_pg.o
16endif
17obj-$(CONFIG_FUNCTION_TRACER)		+= ftrace_low.o ftrace.o
18obj-$(CONFIG_TRACING)			+= trace_clock.o
19
20obj-$(CONFIG_PPC64)			+= $(obj64-y)
21obj-$(CONFIG_PPC32)			+= $(obj32-y)
22
23# Disable GCOV, KCOV & sanitizers in odd or sensitive code
24GCOV_PROFILE_ftrace.o := n
25KCOV_INSTRUMENT_ftrace.o := n
26UBSAN_SANITIZE_ftrace.o := n
27