I am trying to do code coverage for SLES 10 SP2
kernel(18.104.22.168-0.21). So i applied the GCOV patch for 2.6.16 kernel
to the 22.214.171.124-0.21 kernel source.
I ran ltp runall, after booting into that kernel and doing "lcov
But running "lcov --capture --output-file kernel.info" generates lots
of messages like :
include/linux/thread_info.h:cannot open source file
include/linux/jiffies.h:cannot open source file
include/asm/cputime.h:cannot open source file
The source files are present in /root/126.96.36.199-0.21 dir. Should i
change any config file to specify the source dir.
Though the kernel.info is created after that,running 'genhtml kernel.info'
gives this message :
Processing file arch/powerpc/kernel/include/asm/page_64.h
ERROR: cannot open
Does the GCOV patch for the mainline kernel( kernel from kernel.org)
does not work with the kernel that comes with Distro? If not, how
should i generate GCOV patch for the kernels that comes with the Distro.
Thanks and Regards
From: Peter Oberparleiter <oberparleiter@go...> - 2008-07-24 16:02:40
> Processing file arch/powerpc/kernel/include/asm/page_64.h
> ERROR: cannot open
> /tmp/tmpdir698/gcov/arch/powerpc/kernel/include/asm/page_64.h for
These are pretty much the same error messages that dmfaria@... reported last week and my reply to that mail also applies in this case:
Make sure that all of the kernel source files are available on the machine where lcov is run. This includes source and include files and symbolic links created during compilation. All files need to be in the exact same directory as on the build machine.
> Does the GCOV patch for the mainline kernel( kernel from kernel.org)
> does not work with the kernel that comes with Distro? If not, how
> should i generate GCOV patch for the kernels that comes with the Distro.
The gcov-kernel patch is only provided for upstream kernels. If you want to measure code coverage on a distro-specific kernel, just take the closest upstream gcov-kernel patch and apply that. You may need to manually convert some patch hunks if they fail to apply. But make sure that all hunks are applied or else random failures may occur.