powerpc: Enable GCOV
Make it possible to enable GCOV code coverage measurement on powerpc. Lightly tested on 64-bit, seems to work as expected. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
Родитель
7286565064
Коммит
a15098c90d
|
@ -115,6 +115,13 @@ ifneq ($(CONFIG_XMON)$(CONFIG_KEXEC),)
|
|||
obj-y += ppc_save_regs.o
|
||||
endif
|
||||
|
||||
# Disable GCOV in odd or sensitive code
|
||||
GCOV_PROFILE_prom_init.o := n
|
||||
GCOV_PROFILE_ftrace.o := n
|
||||
GCOV_PROFILE_machine_kexec_64.o := n
|
||||
GCOV_PROFILE_machine_kexec_32.o := n
|
||||
GCOV_PROFILE_kprobes.o := n
|
||||
|
||||
extra-$(CONFIG_PPC_FPU) += fpu.o
|
||||
extra-$(CONFIG_ALTIVEC) += vector.o
|
||||
extra-$(CONFIG_PPC64) += entry_64.o
|
||||
|
|
|
@ -12,6 +12,7 @@ endif
|
|||
targets := $(obj-vdso32) vdso32.so vdso32.so.dbg
|
||||
obj-vdso32 := $(addprefix $(obj)/, $(obj-vdso32))
|
||||
|
||||
GCOV_PROFILE := n
|
||||
|
||||
EXTRA_CFLAGS := -shared -fno-common -fno-builtin
|
||||
EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso32.so.1 \
|
||||
|
|
|
@ -7,6 +7,8 @@ obj-vdso64 = sigtramp.o gettimeofday.o datapage.o cacheflush.o note.o
|
|||
targets := $(obj-vdso64) vdso64.so vdso64.so.dbg
|
||||
obj-vdso64 := $(addprefix $(obj)/, $(obj-vdso64))
|
||||
|
||||
GCOV_PROFILE := n
|
||||
|
||||
EXTRA_CFLAGS := -shared -fno-common -fno-builtin
|
||||
EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso64.so.1 \
|
||||
$(call ld-option, -Wl$(comma)--hash-style=sysv)
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
|
||||
|
||||
GCOV_PROFILE := n
|
||||
|
||||
ifdef CONFIG_PPC64
|
||||
EXTRA_CFLAGS += -mno-minimal-toc
|
||||
endif
|
||||
|
|
|
@ -34,7 +34,7 @@ config GCOV_KERNEL
|
|||
config GCOV_PROFILE_ALL
|
||||
bool "Profile entire Kernel"
|
||||
depends on GCOV_KERNEL
|
||||
depends on S390 || X86
|
||||
depends on S390 || X86 || (PPC && EXPERIMENTAL)
|
||||
default n
|
||||
---help---
|
||||
This options activates profiling for the entire kernel.
|
||||
|
|
Загрузка…
Ссылка в новой задаче