gcov: enable GCOV_PROFILE_ALL for x86_64
authorPeter Oberparleiter <oberpar@linux.vnet.ibm.com>
Wed, 17 Jun 2009 23:28:09 +0000 (16:28 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 18 Jun 2009 20:03:58 +0000 (13:03 -0700)
Enable gcov profiling of the entire kernel on x86_64. Required changes
include disabling profiling for:

* arch/kernel/acpi/realmode and arch/kernel/boot/compressed:
  not linked to main kernel
* arch/vdso, arch/kernel/vsyscall_64 and arch/kernel/hpet:
  profiling causes segfaults during boot (incompatible context)

Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Huang Ying <ying.huang@intel.com>
Cc: Li Wei <W.Li@Sun.COM>
Cc: Michael Ellerman <michaele@au1.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Heiko Carstens <heicars2@linux.vnet.ibm.com>
Cc: Martin Schwidefsky <mschwid2@linux.vnet.ibm.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86/boot/Makefile
arch/x86/boot/compressed/Makefile
arch/x86/kernel/Makefile
arch/x86/kernel/acpi/realmode/Makefile
arch/x86/vdso/Makefile
kernel/gcov/Kconfig

index 8d16ada250480cb57168ea8b600c920f7c1f5192..ec749c2bfdd7b10e3a15ccb237b803bd8b412f6e 100644 (file)
@@ -70,6 +70,7 @@ KBUILD_CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \
                   $(call cc-option, -mpreferred-stack-boundary=2)
 KBUILD_CFLAGS  += $(call cc-option, -m32)
 KBUILD_AFLAGS  := $(KBUILD_CFLAGS) -D__ASSEMBLY__
+GCOV_PROFILE := n
 
 $(obj)/bzImage: asflags-y  := $(SVGA_MODE)
 
index 49c8a4c37d7c3b29bc7f5fb4d0ea660aec6fdf11..e2ff504b4ddcb7fe8e3b506f5f089276fe655e2b 100644 (file)
@@ -15,6 +15,7 @@ KBUILD_CFLAGS += $(call cc-option,-ffreestanding)
 KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector)
 
 KBUILD_AFLAGS  := $(KBUILD_CFLAGS) -D__ASSEMBLY__
+GCOV_PROFILE := n
 
 LDFLAGS := -m elf_$(UTS_MACHINE)
 LDFLAGS_vmlinux := -T
index f3477bb845660c51e30a5000c5989831529bad17..6c327b852e23b528963dc4f23e59ffa13761463d 100644 (file)
@@ -24,6 +24,8 @@ CFLAGS_vsyscall_64.o  := $(PROFILING) -g0 $(nostackp)
 CFLAGS_hpet.o          := $(nostackp)
 CFLAGS_tsc.o           := $(nostackp)
 CFLAGS_paravirt.o      := $(nostackp)
+GCOV_PROFILE_vsyscall_64.o     := n
+GCOV_PROFILE_hpet.o            := n
 
 obj-y                  := process_$(BITS).o signal.o entry_$(BITS).o
 obj-y                  += traps.o irq.o irq_$(BITS).o dumpstack_$(BITS).o
index 167bc16ce0e59ca080112db6d232f270df7ceea0..6a564ac67ef511e7534e0f8fcbe4e0a28ffc95a9 100644 (file)
@@ -42,6 +42,7 @@ KBUILD_CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D_WAKEUP -D__KERNEL__ \
                   $(call cc-option, -mpreferred-stack-boundary=2)
 KBUILD_CFLAGS  += $(call cc-option, -m32)
 KBUILD_AFLAGS  := $(KBUILD_CFLAGS) -D__ASSEMBLY__
+GCOV_PROFILE := n
 
 WAKEUP_OBJS = $(addprefix $(obj)/,$(wakeup-y))
 
index 16a9020c8f11f74c14929a12e9d9f817fa075152..88112b49f02c163ce245039397c251725779fe0e 100644 (file)
@@ -123,6 +123,7 @@ quiet_cmd_vdso = VDSO    $@
                       -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^)
 
 VDSO_LDFLAGS = -fPIC -shared $(call ld-option, -Wl$(comma)--hash-style=sysv)
+GCOV_PROFILE := n
 
 #
 # Install the unstripped copy of vdso*.so listed in $(vdso-install-y).
index aab593abfba1d40ab0492b2fb308ac65951170dd..22e9dcfaa3d36b3a5d2325d0049a314ff2c7d07d 100644 (file)
@@ -34,7 +34,7 @@ config GCOV_KERNEL
 config GCOV_PROFILE_ALL
        bool "Profile entire Kernel"
        depends on GCOV_KERNEL
-       depends on S390 || X86_32
+       depends on S390 || X86
        default n
        ---help---
        This options activates profiling for the entire kernel.