linux/arch
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
..
alpha Delete pcibios_select_root 2009-06-17 14:04:42 -07:00
arm Delete pcibios_select_root 2009-06-17 14:04:42 -07:00
avr32 ptrace: remove PT_DTRACE from avr32, mn10300, parisc, s390, sh, xtensa 2009-06-18 13:03:48 -07:00
blackfin Merge branch 'akpm' 2009-06-16 19:50:13 -07:00
cris kmap_types: make most arches use generic header file 2009-06-16 19:47:51 -07:00
frv mm: consolidate init_mm definition 2009-06-16 19:47:28 -07:00
h8300 ptrace: remove PT_DTRACE from arch/h8300 2009-06-18 13:03:48 -07:00
ia64 ia64: Fix resource assignment for root busses 2009-06-17 14:04:42 -07:00
m32r ptrace: remove PT_DTRACE from arch/m32r 2009-06-18 13:03:49 -07:00
m68k ptrace: remove PT_DTRACE from m68k, m68knommu 2009-06-18 13:03:48 -07:00
m68knommu ptrace: remove PT_DTRACE from m68k, m68knommu 2009-06-18 13:03:48 -07:00
microblaze kmap_types: make most arches use generic header file 2009-06-16 19:47:51 -07:00
mips Delete pcibios_select_root 2009-06-17 14:04:42 -07:00
mn10300 ptrace: remove PT_DTRACE from avr32, mn10300, parisc, s390, sh, xtensa 2009-06-18 13:03:48 -07:00
parisc ptrace: remove PT_DTRACE from avr32, mn10300, parisc, s390, sh, xtensa 2009-06-18 13:03:48 -07:00
powerpc edac: cpc925 MC platform device setup 2009-06-18 13:03:57 -07:00
s390 ptrace: remove PT_DTRACE from avr32, mn10300, parisc, s390, sh, xtensa 2009-06-18 13:03:48 -07:00
sh ptrace: remove PT_DTRACE from avr32, mn10300, parisc, s390, sh, xtensa 2009-06-18 13:03:48 -07:00
sparc Delete pcibios_select_root 2009-06-17 14:04:42 -07:00
um Merge branch 'akpm' 2009-06-16 19:50:13 -07:00
x86 x86: Use pci_claim_resource 2009-06-17 14:04:42 -07:00
xtensa ptrace: remove PT_DTRACE from avr32, mn10300, parisc, s390, sh, xtensa 2009-06-18 13:03:48 -07:00
.gitignore
Kconfig gcov: add gcov profiling infrastructure 2009-06-18 13:03:57 -07:00