summaryrefslogtreecommitdiff
path: root/kernel/gcov/gcc_3_4.c
AgeCommit message (Collapse)Author
2012-06-26Fix gcov for GCC 4.6.Tuomas Tynkkynen
Gcov's internal data structures, on which the kernel depends on, have changed in GCC 4.6. This patch adds support for GCC 4.6 and should still work on GCC 4.4 too. For reference, look at 'struct gcov_fn_info' in GCC's 'gcc/gcov-io.h', near line 698: https://android.googlesource.com/toolchain/gcc/+/master/gcc-4.4.3/ https://android.googlesource.com/toolchain/gcc/+/master/gcc-4.6/ Bug 1003822 Change-Id: I527736f944c80b8b345d1685669c0b99eb38fb66 Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com> Reviewed-on: http://git-master/r/110073 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com> Tested-by: Juha Tukkinen <jtukkinen@nvidia.com>
2011-11-30gcov-kernel: patch for Android toolchain 4.4.x supportJuha Tukkinen
Based on work done for LTP in http://ltp.cvs.sourceforge.net/viewvc/ltp/utils/analysis/gcov-kernel Patch originates from Motorola kernel team (mkw348@motorola.com). Change-Id: Ibb2a7c8afd79051e8d6c7fde83f04745be14f5fd Signed-off-by: Juha Tukkinen <jtukkinen@nvidia.com> Reviewed-on: http://git-master/r/62997 Reviewed-by: Peter De Schrijver <pdeschrijver@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com> Rebase-Id: R67557d023bc94fbe900bfc9deef2f5de9955ea43
2009-06-18gcov: add gcov profiling infrastructurePeter Oberparleiter
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>