分类: LINUX
2008-03-28 17:57:17
|
Simple Summary about gcov in Linux Kernel
Rockins
Chen<>
TOC
1 Purpose
and scope
2
Methodology
3 Patch and compile Linux kernel
4 Compile kernel module
5 generate .info and generate .html
6 Important Note
7 Appendix: lcov for user space
8 Conclude and future work
Resource
Acknowledge
1 Purpose and scope
gcov is a coverage testing tool. However, it conventionally can only work under user space, other than kernel space. The object of this short essay is to describe how to test code coverage in Linux kernel by gcov.
2 Methodology
Hubertus Franke, Nigel Hinds, Peter Oberparleiter, and Rajan Ravindran have contributed a gcov-kernel extension[1]. So all we need to do is patch this extension to Linux kernel, re-compile and install the kernel. After that, you can profit from gcov-kernel by testing code coverage in kernel space.
I experimented again and again, and finally found that Linux 2.6.14 is best suitable both for my Hardware platform. If you are extending your kernel with gcov, this version of Linux is suggested.
(complete content please refer the attachment)