Hi Peter,

 

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.

 

git clone git://github.com/RobertCNelson/linux-dev.git
cd linux-dev/

Checkout v3.8.x branch (full cape support):

~/linux-dev
git checkout origin/am33x-v3.8 -b tmp
~/linux-dev
./build_kernel.sh

Regards,

Shinto

 

-----Original Message-----
From: "Peter Oberparleiter" <oberpar@linux.vnet.ibm.com>
Sent: Tuesday, April 8, 2014 4:33pm
To: shinto.john@smartplayin.com, ltp-coverage@lists.sourceforge.net
Subject: Re: [Ltp-coverage] running LCOV/LTP on Beagle Bone Black - Cannot Allocate Memory Error

On 08.04.2014 09:18, shinto.john@smartplayin.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
> /sys/kernel/debug/gcov/home/mallikarjun.bc/LTP/Download/linux-dev/KERNEL/sound/sound_core.gcda:
> 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.


Regards,
Peter Oberparleiter

--
Peter Oberparleiter
Linux on System z Development - IBM Germany