diff options
author | Peter Oberparleiter <oberpar@linux.vnet.ibm.com> | 2009-06-17 19:28:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-18 16:03:57 -0400 |
commit | 2521f2c228ad750701ba4702484e31d876dbc386 (patch) | |
tree | 2221de3e3de9512979b8244c6304366e3be5be63 /Documentation/kernel-parameters.txt | |
parent | 0b923606e75f1ab672e25b14ac039a1cdcfa382f (diff) |
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>
Diffstat (limited to 'Documentation/kernel-parameters.txt')
-rw-r--r-- | Documentation/kernel-parameters.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 5578248c18a4..08def8deb5f5 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -48,6 +48,7 @@ parameter is applicable: | |||
48 | EFI EFI Partitioning (GPT) is enabled | 48 | EFI EFI Partitioning (GPT) is enabled |
49 | EIDE EIDE/ATAPI support is enabled. | 49 | EIDE EIDE/ATAPI support is enabled. |
50 | FB The frame buffer device is enabled. | 50 | FB The frame buffer device is enabled. |
51 | GCOV GCOV profiling is enabled. | ||
51 | HW Appropriate hardware is enabled. | 52 | HW Appropriate hardware is enabled. |
52 | IA-64 IA-64 architecture is enabled. | 53 | IA-64 IA-64 architecture is enabled. |
53 | IMA Integrity measurement architecture is enabled. | 54 | IMA Integrity measurement architecture is enabled. |
@@ -796,6 +797,12 @@ and is between 256 and 4096 characters. It is defined in the file | |||
796 | Format: off | on | 797 | Format: off | on |
797 | default: on | 798 | default: on |
798 | 799 | ||
800 | gcov_persist= [GCOV] When non-zero (default), profiling data for | ||
801 | kernel modules is saved and remains accessible via | ||
802 | debugfs, even when the module is unloaded/reloaded. | ||
803 | When zero, profiling data is discarded and associated | ||
804 | debugfs files are removed at module unload time. | ||
805 | |||
799 | gdth= [HW,SCSI] | 806 | gdth= [HW,SCSI] |
800 | See header of drivers/scsi/gdth.c. | 807 | See header of drivers/scsi/gdth.c. |
801 | 808 | ||