lcov
lcov copied to clipboard
lcov error
Hi,
I am trying to trace the linux kernel with lcov. I have build and successfully installed kernel with the following configurations enabled: CONFIG_DEBUG_FS=y CONFIG_GCOV_KERNEL=y CONFIG_GCOV_PROFILE_ALL=y CONFIG_GCOV_FORMAT_AUTODETECT=y
I want to trace the kernel after running a particular workload. The way I do it reset the zerocounter before every workload and then do the tracing with lcov --capture --directory project-dir --output-file coverage.info. But I get the following error: root@node-0:/my-disk/lcov_new# lcov --capture --output-file kernel.info Auto-detecting gcov kernel support. Found upstream gcov kernel support at /sys/kernel/debug/gcov Copying data to temporary directory /tmp/XuXDvgIPX6 Capturing coverage data from /tmp/XuXDvgIPX6 Found gcov version: 7.4.0 Scanning /tmp/XuXDvgIPX6 for .gcda files ... Found 2997 data files in /tmp/XuXDvgIPX6 Processing var/lib/dkms/emulab-ipod-dkms/3.3.0/build/ipod.gcda geninfo: ERROR: /var/lib/dkms/emulab-ipod-dkms/3.3.0/build/ipod.gcno: could not open file
I have checked and the kernel that I compiled has all the .gcda and .gcno file.
I am not sure if I am missing something here.
Thanks, Anjali
So is the file that lcov complains about actually readable by the current user? What does ls -l /var/lib/dkms/emulab-ipod-dkms/3.3.0/build/ipod.gcno
show?
@oberpar It says ls: cannot access '/var/lib/dkms/emulab-ipod-dkms/3.3.0/build/ipod.gcno': No such file or directory But I am running as root.
So this confirms that the .gcno files that lcov requires for collecting coverage data are not present at the expected location. Are you using separate build and test machines? If so, please have a look at lcov's --to-package
and --from-package
options that can be used to support coverage data collection in such a setup (see man lcov's man page).
If your building on the same machine that you run lcov, then you need to find out if the .gcno files created during build are deleted or moved.
No followup on this one for more than 3 years. I'm going to assume the issue is addressed or the problem went away.
If this is still a problem: please either reopen this issue or file a new one. Please include a detailed description of the problem - and ideally include an example (recipe) which exhibits the issue. Henry