diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2009-08-09 15:02:51 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-08-19 20:29:28 -0400 |
commit | a15098c90df1ac2b1bfe1d33dd1c47063213aa9a (patch) | |
tree | 5553a81fe8bf1605f35ecf11170bed4770a8058b | |
parent | 728656506447b3b349d082a7fb99445f9cb0caaa (diff) |
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>
-rw-r--r-- | arch/powerpc/kernel/Makefile | 7 | ||||
-rw-r--r-- | arch/powerpc/kernel/vdso32/Makefile | 1 | ||||
-rw-r--r-- | arch/powerpc/kernel/vdso64/Makefile | 2 | ||||
-rw-r--r-- | arch/powerpc/xmon/Makefile | 2 | ||||
-rw-r--r-- | kernel/gcov/Kconfig | 2 |
5 files changed, 13 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index 035946f9d5fb..720e8c3b8e94 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile | |||
@@ -115,6 +115,13 @@ ifneq ($(CONFIG_XMON)$(CONFIG_KEXEC),) | |||
115 | obj-y += ppc_save_regs.o | 115 | obj-y += ppc_save_regs.o |
116 | endif | 116 | endif |
117 | 117 | ||
118 | # Disable GCOV in odd or sensitive code | ||
119 | GCOV_PROFILE_prom_init.o := n | ||
120 | GCOV_PROFILE_ftrace.o := n | ||
121 | GCOV_PROFILE_machine_kexec_64.o := n | ||
122 | GCOV_PROFILE_machine_kexec_32.o := n | ||
123 | GCOV_PROFILE_kprobes.o := n | ||
124 | |||
118 | extra-$(CONFIG_PPC_FPU) += fpu.o | 125 | extra-$(CONFIG_PPC_FPU) += fpu.o |
119 | extra-$(CONFIG_ALTIVEC) += vector.o | 126 | extra-$(CONFIG_ALTIVEC) += vector.o |
120 | extra-$(CONFIG_PPC64) += entry_64.o | 127 | extra-$(CONFIG_PPC64) += entry_64.o |
diff --git a/arch/powerpc/kernel/vdso32/Makefile b/arch/powerpc/kernel/vdso32/Makefile index c3d57bd01a88..b54b81688132 100644 --- a/arch/powerpc/kernel/vdso32/Makefile +++ b/arch/powerpc/kernel/vdso32/Makefile | |||
@@ -12,6 +12,7 @@ endif | |||
12 | targets := $(obj-vdso32) vdso32.so vdso32.so.dbg | 12 | targets := $(obj-vdso32) vdso32.so vdso32.so.dbg |
13 | obj-vdso32 := $(addprefix $(obj)/, $(obj-vdso32)) | 13 | obj-vdso32 := $(addprefix $(obj)/, $(obj-vdso32)) |
14 | 14 | ||
15 | GCOV_PROFILE := n | ||
15 | 16 | ||
16 | EXTRA_CFLAGS := -shared -fno-common -fno-builtin | 17 | EXTRA_CFLAGS := -shared -fno-common -fno-builtin |
17 | EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso32.so.1 \ | 18 | EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso32.so.1 \ |
diff --git a/arch/powerpc/kernel/vdso64/Makefile b/arch/powerpc/kernel/vdso64/Makefile index fa7f1b8f3e50..dd0c8e936775 100644 --- a/arch/powerpc/kernel/vdso64/Makefile +++ b/arch/powerpc/kernel/vdso64/Makefile | |||
@@ -7,6 +7,8 @@ obj-vdso64 = sigtramp.o gettimeofday.o datapage.o cacheflush.o note.o | |||
7 | targets := $(obj-vdso64) vdso64.so vdso64.so.dbg | 7 | targets := $(obj-vdso64) vdso64.so vdso64.so.dbg |
8 | obj-vdso64 := $(addprefix $(obj)/, $(obj-vdso64)) | 8 | obj-vdso64 := $(addprefix $(obj)/, $(obj-vdso64)) |
9 | 9 | ||
10 | GCOV_PROFILE := n | ||
11 | |||
10 | EXTRA_CFLAGS := -shared -fno-common -fno-builtin | 12 | EXTRA_CFLAGS := -shared -fno-common -fno-builtin |
11 | EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso64.so.1 \ | 13 | EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso64.so.1 \ |
12 | $(call ld-option, -Wl$(comma)--hash-style=sysv) | 14 | $(call ld-option, -Wl$(comma)--hash-style=sysv) |
diff --git a/arch/powerpc/xmon/Makefile b/arch/powerpc/xmon/Makefile index 85ab97ab840a..faa81b6a6612 100644 --- a/arch/powerpc/xmon/Makefile +++ b/arch/powerpc/xmon/Makefile | |||
@@ -2,6 +2,8 @@ | |||
2 | 2 | ||
3 | subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror | 3 | subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror |
4 | 4 | ||
5 | GCOV_PROFILE := n | ||
6 | |||
5 | ifdef CONFIG_PPC64 | 7 | ifdef CONFIG_PPC64 |
6 | EXTRA_CFLAGS += -mno-minimal-toc | 8 | EXTRA_CFLAGS += -mno-minimal-toc |
7 | endif | 9 | endif |
diff --git a/kernel/gcov/Kconfig b/kernel/gcov/Kconfig index 22e9dcfaa3d3..654efd09f6a9 100644 --- a/kernel/gcov/Kconfig +++ b/kernel/gcov/Kconfig | |||
@@ -34,7 +34,7 @@ config GCOV_KERNEL | |||
34 | config GCOV_PROFILE_ALL | 34 | config GCOV_PROFILE_ALL |
35 | bool "Profile entire Kernel" | 35 | bool "Profile entire Kernel" |
36 | depends on GCOV_KERNEL | 36 | depends on GCOV_KERNEL |
37 | depends on S390 || X86 | 37 | depends on S390 || X86 || (PPC && EXPERIMENTAL) |
38 | default n | 38 | default n |
39 | ---help--- | 39 | ---help--- |
40 | This options activates profiling for the entire kernel. | 40 | This options activates profiling for the entire kernel. |