Thanks for identifying the issue.
I checked my kernel source code and there is only gcc_3_4.c present in kernel/gcov folder and gcc_4_7.c is NOT present. So as you suggested i will have to upgrade to higher version.
I will check with the latest kernel with GCOV 4.7 on beagle bone black and let you know the result.
currently i use below steps for downloading the kernel source for beagle bone black.
Checkout v3.8.x branch (full cape support):
From: "Peter Oberparleiter" <firstname.lastname@example.org>
Sent: Tuesday, April 8, 2014 4:33pm
To: email@example.com, firstname.lastname@example.org
Subject: Re: [Ltp-coverage] running LCOV/LTP on Beagle Bone Black - Cannot Allocate Memory Error
On 08.04.2014 09:18, email@example.com wrote:
> 9. root@arm:/etc/gcovtest# lcov -c -o coverage.info
> Auto-detecting gcov kernel support.
> Found upstream gcov kernel support at /sys/kernel/debug/gcov
> Copying data to temporary directory /tmp/DiYSTa9XLt
> Removing temporary directories.
> *lcov: ERROR: cannot read
> Cannot allocate memory*
It appears that lcov cannot copy the quoted file. You should be seeing a
similar error when trying to copy that file directly using "cat" (cp
might not work on this type of generated files). I'm assuming that
there's a mismatch between the gcov data format generated by gcc and the
one expected by the gcov infrastructure in the kernel.
> *Can anyone please point out the possible resolution for this error?*
You might consider using the latest Linux kernel where there is an
option to specify the gcov format during compile time
(CONFIG_GCOV_FORMAT_3_4 and CONFIG_GCOV_FORMAT_4_7). Try compiling with
the latter set and check to see if it makes any difference. You may also
want to upgrade your version of lcov since there have been changes to
improve compatibility with newer GCC versions.
Linux on System z Development - IBM Germany