gcov kernel support
Subsystems (8)
cover gcov kernel support
This patchset implements support for performing kernel code coverage measurements based on gcc's gcov mechanism. It can be used to improve kernel code quality by identifying code parts which are not exercised during test cases. Patch base is 2.6.30-rc6.
Patch feedback has been integrated. There were no further comments since the last version. In my opinion this patchset is ready for inclusion into the -mm tree.
Patch overview:
[PATCH 1/4] kernel: constructor support
[PATCH 2/4] seq_file: add function to write binary data [PATCH 3/4] gcov: add gcov profiling infrastructure [PATCH 4/4] gcov: enable GCOV_PROFILE_ALL for x86_64
For more information see Documentation/gcov.txt and the previous post:
http://marc.info/?l=linux-kernel&m=123565658224661
PATCH 1/4 kernel: constructor support
From: Peter Oberparleiter <[email protected]>
Call constructors (gcc-generated initcall-like functions) during kernel start and module load. Constructors are e.g. used for gcov data initialization.
Disable constructor support for usermode Linux to prevent conflicts with host glibc.
--- include/asm-generic/sections.h | 3 +++ include/asm-generic/vmlinux.lds.h | 11 ++++++++++- include/linux/init.h | 3 +++ include/linux/module.h | 6 ++++++ init/Kconfig | 5 +++++ init/main.c | 12 ++++++++++++ kernel/module.c | 16 ++++++++++++++++ 7 files changed, 55 insertions(+), 1 deletion(-)
include/asm-generic/vmlinux.lds.h +10 -1
@@ -332,6 +332,14 @@/* Section used for early init (in .S files) */ #define HEAD_TEXT *(HEAD_TEXT_SECTION) +#ifdef CONFIG_CONSTRUCTORS +#define KERNEL_CTORS () VMLINUX_SYMBOL(__ctors_start) = .; \ + *(.ctors) \ + VMLINUX_SYMBOL(__ctors_end) = .; +#else +#define KERNEL_CTORS () +#endif +/* init and exit section handling */ #define INIT_DATA \ *(.init.data) \
@@ -340,7 +348,8 @@ CPU_DISCARD(init.data) \ CPU_DISCARD(init.rodata) \ MEM_DISCARD(init.data) \ - MEM_DISCARD(init.rodata) + MEM_DISCARD(init.rodata) \ + KERNEL_CTORS()#define INIT_TEXT \ *(.init.text) \
include/linux/init.h +3 -0
@@ -136,6 +136,9 @@extern initcall_t __con_initcall_start[], __con_initcall_end[];extern initcall_t __security_initcall_start[], __security_initcall_end[]; +/* Used for contructor calls. */ +typedef void (*ctor_fn_t )(void ); +/* Defined in init/main.c */ extern int do_one_initcall (initcall_t fn);extern char __initdata boot_command_line[];
include/linux/module.h +6 -0
@@ -354,6 +354,12 @@local_t ref;#endif #endif + +#ifdef CONFIG_CONSTRUCTORS +/* Constructor functions. */ +ctor_fn_t *ctors; +unsigned int num_ctors; +#endif };#ifndef MODULE_ARCH_INIT #define MODULE_ARCH_INIT {}
init/main.c +12 -0
@@ -700,6 +700,17 @@rest_init (); } +/* Call all constructor functions linked into the kernel. */ +static void __init do_ctors (void ) +{ +#ifdef CONFIG_CONSTRUCTORS +ctor_fn_t *call = (ctor_fn_t *) __ctors_start; + +for (; call < (ctor_fn_t *) __ctors_end; call++) + (*call)(); +#endif +} +int initcall_debug;core_param (initcall_debug, initcall_debug, bool,0644 );
@@ -780,6 +791,7 @@usermodehelper_init ();driver_init ();init_irq_proc (); +do_ctors ();do_initcalls (); }
kernel/module.c +16 -0
@@ -2172,6 +2172,10 @@sizeof (*mod->tracepoints), &mod->num_tracepoints);#endif +#ifdef CONFIG_CONSTRUCTORS + mod->ctors =section_objs (hdr, sechdrs, secstrings,".ctors" , +sizeof (*mod->ctors), &mod->num_ctors); +#endif #ifdef CONFIG_MODVERSIONS if ((mod->num_syms && !mod->crcs)
@@ -2328,6 +2332,17 @@ goto free_hdr; } +/* Call module constructors. */ +static void do_mod_ctors (struct module *mod) +{ +#ifdef CONFIG_CONSTRUCTORS +unsigned long i; + +for (i =0 ; i < mod->num_ctors; i++) + mod->ctors[i](); +#endif +} +/* This is where the real work happens */ SYSCALL_DEFINE3(init_module, void __user *, umod, unsigned long, len, const char __user *, uargs)
@@ -2356,6 +2371,7 @@blocking_notifier_call_chain (&module_notify_list,MODULE_STATE_COMING , mod); +do_mod_ctors (mod);/* Start the module */ if (mod->init !=NULL ) ret =do_one_initcall (mod->init);
init/Kconfig +5 -0
@@ -16,6 +16,11 @@ default "$ARCH_DEFCONFIG" default "arch/$ARCH/defconfig" +config CONSTRUCTORS + bool + depends on !UML + default y + menu "General setup" config EXPERIMENTAL
include/asm-generic/sections.h +3 -0
@@ -14,6 +14,9 @@extern char __initdata_begin[], __initdata_end[];extern char __start_rodata[], __end_rodata[]; +/* Start and end of .ctors section - used for constructor calls. */ +extern char __ctors_start[], __ctors_end[]; +/* function descriptor handling (if any). Override * in asm/sections.h */ #ifndef dereference_function_descriptor
PATCH 2/4 seq_file: add function to write binary data
In reply to Peter OberparleiterFrom: Peter Oberparleiter <[email protected]>
seq_write() can be used to construct seq_files containing arbitrary data. Required by the gcov-profiling interface to synthesize binary profiling data files.
---
fs/seq_file.c | 20 ++++++++++++++++++++ include/linux/seq_file.h | 1 + 2 files changed, 21 insertions(+)
fs/seq_file.c +20 -0
@@ -640,6 +640,26 @@ }EXPORT_SYMBOL (seq_puts); +/** +* seq_write - write arbitrary data to buffer +* @seq: seq_file identifying the buffer to which data should be written +* @data: data address +* @len: number of bytes +* +* Return 0 on success, non-zero otherwise. +*/ +int seq_write (struct seq_file *seq,const void *data,size_t len) +{ +if (seq->count + len < seq->size) { +memcpy (seq->buf + seq->count, data, len); + seq->count += len; +return 0 ; + } + seq->count = seq->size; +return -1 ; +} +EXPORT_SYMBOL (seq_write); +struct list_head *seq_list_start (struct list_head *head,loff_t pos) {struct list_head *lh;
include/linux/seq_file.h +1 -0
@@ -43,6 +43,7 @@int seq_escape (struct seq_file *,const char *,const char *);int seq_putc (struct seq_file *m,char c);int seq_puts (struct seq_file *m,const char *s); +int seq_write (struct seq_file *seq,const void *data,size_t len);int seq_printf (struct seq_file *,const char *, ...) __attribute__ ((format (printf,2 ,3 )));
PATCH 3/4 gcov: add gcov profiling infrastructure
In reply to Peter OberparleiterFrom: Peter Oberparleiter <[email protected]>
Enable the use of GCC's coverage testing tool gcov [1] with the Linux kernel. gcov may be useful for:
* debugging (has this code been reached at all?)
* test improvement (how do I change my test to cover these lines?)
* minimizing kernel configurations (do I need this option if the associated code is never run?)
The profiling patch incorporates the following changes:
* change kbuild to include profiling flags
* provide functions needed by profiling code
* present profiling data as files in debugfs
Note that on some architectures, enabling gcc's profiling option "-fprofile-arcs" for the entire kernel may trigger compile/link/ run-time problems, some of which are caused by toolchain bugs and others which require adjustment of architecture code.
For this reason profiling the entire kernel is initially restricted to those architectures for which it is known to work without changes. This restriction can be lifted once an architecture has been tested and found compatible with gcc's profiling. Profiling of single files or directories is still available on all platforms (see config help text).
[1] http://gcc.gnu.org/onlinedocs/gcc/Gcov.html
---
Documentation/gcov.txt | 246 +++++++++++++ Documentation/kernel-parameters.txt | 7 Makefile | 11 arch/Kconfig | 2 include/linux/compiler-gcc3.h | 6 kernel/Makefile | 1 kernel/gcov/Kconfig | 48 ++ kernel/gcov/Makefile | 3 kernel/gcov/base.c | 155 ++++++++ kernel/gcov/fs.c | 674 ++++++++++++++++++++++++++++++++++++ kernel/gcov/gcc_3_4.c | 445 +++++++++++++++++++++++ kernel/gcov/gcov.h | 128 ++++++ scripts/Makefile.lib | 11 13 files changed, 1732 insertions(+), 5 deletions(-)
Documentation/gcov.txt new file +246 -0
@@ -0,0 +1,246 @@ +Using gcov with the Linux kernel +================================ + +1. Introduction +2. Preparation +3. Customization +4. Files +5. Modules +6. Separated build and test machines +7. Troubleshooting +Appendix A: sample script: gather_on_build.sh +Appendix B: sample script: gather_on_test.sh + + +1. Introduction +=============== + +gcov profiling kernel support enables the use of GCC's coverage testing +tool gcov [1] with the Linux kernel. Coverage data of a running kernel +is exported in gcov-compatible format via the "gcov" debugfs directory. +To get coverage data for a specific file, change to the kernel build +directory and use gcov with the -o option as follows (requires root): + +# cd /tmp/linux-out +# gcov -o /sys/kernel/debug/gcov/tmp/linux-out/kernel spinlock.c + +This will create source code files annotated with execution counts +in the current directory. In addition, graphical gcov front-ends such +as lcov [2] can be used to automate the process of collecting data +for the entire kernel and provide coverage overviews in HTML format. + +Possible uses: + +* debugging (has this line been reached at all?) +* test improvement (how do I change my test to cover these lines?) +* minimizing kernel configurations (do I need this option if the + associated code is never run?) + +-- + +[1] http://gcc.gnu.org/onlinedocs/gcc/Gcov.html +[2] http://ltp.sourceforge.net/coverage/lcov.php + + +2. Preparation +============== + +Configure the kernel with: + + CONFIG_DEBUGFS=y + CONFIG_GCOV_KERNEL=y + +and to get coverage data for the entire kernel: + + CONFIG_GCOV_PROFILE_ALL=y + +Note that kernels compiled with profiling flags will be significantly +larger and run slower. Also CONFIG_GCOV_PROFILE_ALL may not be supported +on all architectures. + +Profiling data will only become accessible once debugfs has been +mounted: + + mount -t debugfs none /sys/kernel/debug + + +3. Customization +================ + +To enable profiling for specific files or directories, add a line +similar to the following to the respective kernel Makefile: + + For a single file (e.g. main.o): + GCOV_PROFILE_main.o := y + + For all files in one directory: + GCOV_PROFILE := y + +To exclude files from being profiled even when CONFIG_GCOV_PROFILE_ALL +is specified, use: + + GCOV_PROFILE_main.o := n + and: + GCOV_PROFILE := n + +Only files which are linked to the main kernel image or are compiled as +kernel modules are supported by this mechanism. + + +4. Files +======== + +The gcov kernel support creates the following files in debugfs: + + /sys/kernel/debug/gcov + Parent directory for all gcov-related files. + + /sys/kernel/debug/gcov/reset + Global reset file: resets all coverage data to zero when + written to. + + /sys/kernel/debug/gcov/path/to/compile/dir/file.gcda + The actual gcov data file as understood by the gcov + tool. Resets file coverage data to zero when written to. + + /sys/kernel/debug/gcov/path/to/compile/dir/file.gcno + Symbolic link to a static data file required by the gcov + tool. This file is generated by gcc when compiling with + option -ftest-coverage. + + +5. Modules +========== + +Kernel modules may contain cleanup code which is only run during +module unload time. The gcov mechanism provides a means to collect +coverage data for such code by keeping a copy of the data associated +with the unloaded module. This data remains available through debugfs. +Once the module is loaded again, the associated coverage counters are +initialized with the data from its previous instantiation. + +This behavior can be deactivated by specifying the gcov_persist kernel +parameter: + + gcov_persist=0 + +At run-time, a user can also choose to discard data for an unloaded +module by writing to its data file or the global reset file. + + +6. Separated build and test machines +==================================== + +The gcov kernel profiling infrastructure is designed to work out-of-the +box for setups where kernels are built and run on the same machine. In +cases where the kernel runs on a separate machine, special preparations +must be made, depending on where the gcov tool is used: + +a) gcov is run on the TEST machine + +The gcov tool version on the test machine must be compatible with the +gcc version used for kernel build. Also the following files need to be +copied from build to test machine: + +from the source tree: + - all C source files + headers + +from the build tree: + - all C source files + headers + - all .gcda and .gcno files + - all links to directories + +It is important to note that these files need to be placed into the +exact same file system location on the test machine as on the build +machine. If any of the path components is symbolic link, the actual +directory needs to be used instead (due to make's CURDIR handling). + +b) gcov is run on the BUILD machine + +The following files need to be copied after each test case from test +to build machine: + +from the gcov directory in sysfs: + - all .gcda files + - all links to .gcno files + +These files can be copied to any location on the build machine. gcov +must then be called with the -o option pointing to that directory. + +Example directory setup on the build machine: + + /tmp/linux: kernel source tree + /tmp/out: kernel build directory as specified by make O= + /tmp/coverage: location of the files copied from the test machine + + [user@build] cd /tmp/out + [user@build] gcov -o /tmp/coverage/tmp/out/init main.c + + +7. Troubleshooting +================== + +Problem: Compilation aborts during linker step. +Cause: Profiling flags are specified for source files which are not + linked to the main kernel or which are linked by a custom + linker procedure. +Solution: Exclude affected source files from profiling by specifying + GCOV_PROFILE := n or GCOV_PROFILE_basename.o := n in the + corresponding Makefile. + + +Appendix A: gather_on_build.sh +============================== + +Sample script to gather coverage meta files on the build machine +(see 6a): + +#!/bin/bash + +KSRC=$1 +KOBJ=$2 +DEST=$3 + +if [ -z "$KSRC" ] || [ -z "$KOBJ" ] || [ -z "$DEST" ]; then + echo "Usage: $0 <ksrc directory> <kobj directory> <output.tar.gz>" >&2 + exit 1 +fi + +KSRC=$(cd $KSRC; printf "all:\n\t@echo \${CURDIR}\n" | make -f -) +KOBJ=$(cd $KOBJ; printf "all:\n\t@echo \${CURDIR}\n" | make -f -) + +find $KSRC $KOBJ \( -name '*.gcno' -o -name '*.[ch]' -o -type l \) -a \ + -perm /u+r,g+r | tar cfz $DEST -P -T - + +if [ $? -eq 0 ] ; then + echo "$DEST successfully created, copy to test system and unpack with:" + echo " tar xfz $DEST -P" +else + echo "Could not create file $DEST" +fi + + +Appendix B: gather_on_test.sh +============================= + +Sample script to gather coverage data files on the test machine +(see 6b): + +#!/bin/bash + +DEST=$1 +GCDA=/sys/kernel/debug/gcov + +if [ -z "$DEST" ] ; then + echo "Usage: $0 <output.tar.gz>" >&2 + exit 1 +fi + +find $GCDA -name '*.gcno' -o -name '*.gcda' | tar cfz $DEST -T - + +if [ $? -eq 0 ] ; then + echo "$DEST successfully created, copy to build system and unpack with:" + echo " tar xfz $DEST" +else + echo "Could not create file $DEST" +fi
Documentation/kernel-parameters.txt +7 -0
@@ -48,6 +48,7 @@ EFI EFI Partitioning (GPT) is enabled EIDE EIDE/ATAPI support is enabled. FB The frame buffer device is enabled. + GCOV GCOV profiling is enabled. HW Appropriate hardware is enabled. IA-64 IA-64 architecture is enabled. IMA Integrity measurement architecture is enabled.
@@ -771,6 +772,12 @@ Format: off | on default: on + gcov_persist= [GCOV] When non-zero (default), profiling data for + kernel modules is saved and remains accessible via + debugfs, even when the module is unloaded/reloaded. + When zero, profiling data is discarded and associated + debugfs files are removed at module unload time. + gdth= [HW,SCSI] See header of drivers/scsi/gdth.c.
Makefile +6 -5
@@ -338,6 +338,7 @@ LDFLAGS_MODULE = CFLAGS_KERNEL = AFLAGS_KERNEL = +CFLAGS_GCOV = -fprofile-arcs -ftest-coverage # Use LINUXINCLUDE when you must reference the include/ directory.
@@ -364,7 +365,7 @@ export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS -export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE +export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE CFLAGS_GCOV export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE # When compiling out-of-tree modules, put MODVERDIR in the module
@@ -1224,8 +1225,8 @@ \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ -o -name '*.symtypes' -o -name 'modules.order' \ - -o -name 'Module.markers' -o -name '.tmp_*.o.*' \) \ - -type f -print | xargs rm -f + -o -name 'Module.markers' -o -name '.tmp_*.o.*' \ + -o -name '*.gcno' \) -type f -print | xargs rm -f # mrproper - Delete all generated files, including .config #
@@ -1429,8 +1430,8 @@ $(call cmd,rmfiles) @find $(KBUILD_EXTMOD) $(RCS_FIND_IGNORE) \ \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ - -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \) \ - -type f -print | xargs rm -f + -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ + -o -name '*.gcno' \) -type f -print | xargs rm -f help: @echo ' Building external modules.'
arch/Kconfig +2 -0
@@ -112,3 +112,5 @@ config HAVE_DEFAULT_NO_SPIN_MUTEXES bool + +source "kernel/gcov/Kconfig"
kernel/Makefile +1 -0
@@ -70,6 +70,7 @@ obj-$(CONFIG_KPROBES_SANITY_TEST) += test_kprobes.o obj-$(CONFIG_AUDIT) += audit.o auditfilter.o obj-$(CONFIG_AUDITSYSCALL) += auditsc.o +obj-$(CONFIG_GCOV_KERNEL) += gcov/ obj-$(CONFIG_AUDIT_TREE) += audit_tree.o obj-$(CONFIG_KPROBES) += kprobes.o obj-$(CONFIG_KGDB) += kgdb.o
kernel/gcov/Kconfig new file +48 -0
48 lines not on this page · raw message
kernel/gcov/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +EXTRA_CFLAGS := -DSRCTREE='"$(srctree)"' -DOBJTREE='"$(objtree)"' + +obj-$(CONFIG_GCOV_KERNEL) := base.o fs.o gcc_3_4.o
kernel/gcov/base.c new file +155 -0
155 lines not on this page · raw message
kernel/gcov/fs.c new file +674 -0
674 lines not on this page · raw message
kernel/gcov/gcc_3_4.c new file +445 -0
445 lines not on this page · raw message
kernel/gcov/gcov.h new file +128 -0
128 lines not on this page · raw message
scripts/Makefile.lib +11 -0
@@ -116,6 +116,17 @@ $(asflags-y) $(AFLAGS_$(basetarget).o) _cpp_flags = $(KBUILD_CPPFLAGS) $(cppflags-y) $(CPPFLAGS_$(@F)) +# +# Enable gcov profiling flags for a file, directory or for all files depending +# on variables GCOV_PROFILE_obj.o, GCOV_PROFILE and CONFIG_GCOV_PROFILE_ALL +# (in this order) +# +ifeq ($(CONFIG_GCOV_KERNEL),y) +_c_flags += $(if $(patsubst n%,, \ + $(GCOV_PROFILE_$(basetarget).o)$(GCOV_PROFILE)$(CONFIG_GCOV_PROFILE_ALL)), \ + $(CFLAGS_GCOV)) +endif + # If building the kernel in a separate objtree expand all occurrences # of -Idir to -I$(srctree)/dir except for absolute paths (starting with '/').
include/linux/compiler-gcc3.h +6 -0
@@ -16,6 +16,12 @@#define __must_check __attribute__((warn_unused_result))#endif +#ifdef CONFIG_GCOV_KERNEL +# if __GNUC_MINOR__ <4 +# error "GCOV profiling support for gcc versions below 3.4 not included" +# endif /* __GNUC_MINOR__ */ +#endif /* CONFIG_GCOV_KERNEL */ +/* * A trick to suppress uninitialized variable warning without generating any * code
Re: [PATCH 3/4] gcov: add gcov profiling infrastructure
kernel/gcov/base.c line 89
Quoted 5 lines · Peter Oberparleiter
kernel/gcov/base.c new file +5
-0+int __gcov_execve (const char *path,char *const argv[],char *const envp[]) +{ +return kernel_execve (path, argv, envp); +} +EXPORT_SYMBOL (__gcov_execve);
Looks weird, why is this needed?
Ingo
Re: [PATCH 3/4] gcov: add gcov profiling infrastructure
Quoted 9 lines · Ingo Molnar
kernel/gcov/base.c line 89
Quoted 5 lines · Peter Oberparleiter
kernel/gcov/base.c new file +5
-0+int __gcov_execve (const char *path,char *const argv[],char *const envp[]) +{ +return kernel_execve (path, argv, envp); +} +EXPORT_SYMBOL (__gcov_execve);Looks weird, why is this needed?
When compiling with -fprofile-arcs, gcc will turn execve calls into a builtin which calls __gcov_execve(). This is needed in userspace to ensure that data for the calling process is correctly saved.
Back when kernel_execve() used to be called execve(), this function was required to prevent linker errors. If it's generally agreed not to name kernel functions execve(), this one might as well be removed (not sure about such an agreement though).
Re: [PATCH 3/4] gcov: add gcov profiling infrastructure
Quoted 4 lines
Back when
kernel_execve()used to be calledexecve(), this function was required to prevent linker errors. If it's generally agreed not to name kernel functionsexecve(), this one might as well be removed (not sure about such an agreement though).
I think we can safely assume now that nothing in the kernel will be named execve.
-Andi
Signature · 1 line
[email protected] -- Speaking for myself only.
PATCH 4/4 gcov: enable GCOV_PROFILE_ALL for x86_64
In reply to Peter OberparleiterFrom: Peter Oberparleiter <[email protected]>
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)
--- arch/x86/boot/Makefile | 1 + arch/x86/boot/compressed/Makefile | 1 + arch/x86/kernel/Makefile | 2 ++ arch/x86/kernel/acpi/realmode/Makefile | 1 + arch/x86/vdso/Makefile | 1 + kernel/gcov/Kconfig | 2 +- 6 files changed, 7 insertions(+), 1 deletion(-)
kernel/gcov/Kconfig +1 -1
@@ -34,7 +34,7 @@ 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.
arch/x86/kernel/acpi/realmode/Makefile +1 -0
@@ -42,6 +42,7 @@ $(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))
arch/x86/boot/Makefile +1 -0
@@ -69,6 +69,7 @@ $(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)
arch/x86/boot/compressed/Makefile +1 -0
@@ -15,6 +15,7 @@ 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
arch/x86/vdso/Makefile +1 -0
@@ -123,6 +123,7 @@ -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).
arch/x86/kernel/Makefile +2 -0
@@ -24,6 +24,8 @@ 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