linux/scripts
Peter Oberparleiter 2521f2c228 gcov: add gcov profiling infrastructure
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

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>
2009-06-18 13:03:57 -07:00
..
basic kbuild: fix a compile warning 2009-06-14 22:36:23 +02:00
dtc Move dtc and libfdt sources from arch/powerpc/boot to scripts/dtc 2009-05-02 16:52:26 -07:00
genksyms Revert "kbuild: strip generated symbols from *.ko" 2009-01-14 21:38:20 +01:00
kconfig kconfig: do not hardcode "include/config/auto.conf" filename 2009-06-09 22:37:51 +02:00
ksymoops
mod Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next 2009-06-14 14:12:18 -07:00
package kbuild, deb-pkg: bump standards version 2009-06-09 22:37:42 +02:00
rt-tester
selinux
tracing debugfs: Fix terminology inconsistency of dir name to mount debugfs filesystem. 2009-06-15 21:30:28 -07:00
.gitignore Revert "fix modules_install via NFS" 2009-04-06 14:27:17 -07:00
bin2c.c
binoffset.c
bloat-o-meter
bootgraph.pl bootgraph: fix for use with dot symbols 2009-02-15 12:50:08 +01:00
checkincludes.pl
checkkconfigsymbols.sh
checkpatch.pl checkpatch: version 0.28 2009-02-27 16:26:22 -08:00
checkstack.pl
checksyscalls.sh asm-generic: add a generic unistd.h 2009-06-11 21:02:16 +02:00
checkversion.pl
cleanfile
cleanpatch
config kbuild: add generic --set-str option to scripts/config 2009-06-14 22:48:08 +02:00
conmakehash.c
decodecode
diffconfig
export_report.pl
extract-ikconfig
gcc-version.sh Remove bashisms from scripts 2009-06-09 22:37:54 +02:00
gcc-x86_32-has-stack-protector.sh stackprotector: fix multi-word cross-builds 2009-02-11 12:17:29 +01:00
gcc-x86_64-has-stack-protector.sh stackprotector: fix multi-word cross-builds 2009-02-11 12:17:29 +01:00
gen_initramfs_list.sh kbuild: fix spurious initramfs rebuild 2009-04-11 08:18:12 +02:00
get_maintainer.pl scripts/get_maintainer.pl: change "die" to "warn" when command line file is not a patch 2009-06-16 19:47:54 -07:00
gfp-translate mm: add a gfp-translate script to help understand page allocation failure reports 2009-06-16 19:47:44 -07:00
headerdep.pl kbuild: fix option processing for -I in headerdep 2009-04-11 08:18:07 +02:00
headers.sh kbuild: clean up scripts/headers.sh 2009-06-09 22:37:43 +02:00
headers_check.pl kbuild/headers_check: refine extern check 2009-06-09 22:37:56 +02:00
headers_install.pl
kallsyms.c kallsyms: generalize text region handling 2009-06-14 22:43:46 +02:00
Kbuild.include
kernel-doc Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next 2009-06-14 14:12:18 -07:00
Lindent
Makefile Move dtc and libfdt sources from arch/powerpc/boot to scripts/dtc 2009-05-02 16:52:26 -07:00
Makefile.build kbuild: introduce subdir-ccflags-y 2009-04-19 11:12:12 +02:00
Makefile.clean
Makefile.fwinst
Makefile.headersinst kbuild: fix "Argument list too long" error for "make headers_check", 2009-06-09 22:37:56 +02:00
Makefile.host
Makefile.lib gcov: add gcov profiling infrastructure 2009-06-18 13:03:57 -07:00
Makefile.modinst Revert "kbuild: strip generated symbols from *.ko" 2009-01-14 21:38:20 +01:00
Makefile.modpost
makelst
markup_oops.pl scripts: add x86 64 bit support to the markup_oops.pl script 2009-02-15 12:50:10 +01:00
mkcompile_h
mkmakefile
mksysmap Revert "kbuild: strip generated symbols from *.ko" 2009-01-14 21:38:20 +01:00
mkuboot.sh
mkversion
namespace.pl
patch-kernel
pnmtologo.c fbdev: move logo externs to header file 2009-06-16 19:47:57 -07:00
profile2linkerlist.pl
recordmcount.pl sparc64: Add proper dynamic ftrace support. 2009-06-16 04:56:53 -07:00
setlocalversion kbuild: fix delay in setlocalversion on readonly source 2009-06-14 22:26:00 +02:00
show_delta
tags.sh kbuild: remove a tag file before it is regenerated 2009-05-01 10:54:02 +02:00
unifdef.c kbuild: fix headers_exports with boolean expression 2009-06-09 22:37:57 +02:00
ver_linux Remove bashisms from scripts 2009-06-09 22:37:54 +02:00