Skip to contentSkip to conversation

gcov on target

DISCUSSION Robert Berger 2 participants 5 messages Jan 11, 2013 – Jan 15, 2013

lore
Share & tools
lore
#0 lore raw

Hi,

I use Yocto Project, 1.3 "danny" for a beagle-xm and would like to show kernel code coverage with a core-image-sato-sdk.
This image is pretty complete. Unfortunately there is no gcov available on the target.

It looks like it's only built for the host.

Did someone manage to build/run gcov for an armv7a?
... or let's put it otherwise: Why doesn't it exist on the target?

Regards,

Robert...The most likely way for the world to be destroyed, most experts agree, is by accident. That's where we come in; we're computer professionals. We cause accidents.

My public pgp key is available,at:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x90320BF1

#1 lore raw

Dear Robert Berger,

Quoted 9 lines · Robert Berger

I use Yocto Project, 1.3 "danny" for a beagle-xm and would like to show kernel code coverage with a core-image-sato-sdk.
This image is pretty complete. Unfortunately there is no gcov available on the target.

It looks like it's only built for the host.

Did someone manage to build/run gcov for an armv7a?
... or let's put it otherwise: Why doesn't it exist on the target?

I supposed the idea is to generate to coverage data on the target, and then analyze them with gcov on the build machine. See
http://gcc.gnu.org/onlinedocs/gcc/Cross_002dprofiling.html#Cross_002dprofiling.

Best regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#2 lore raw

Hi Thomas,

Quoted 6 lines · Thomas Petazzoni
Quoted 2 lines

Did someone manage to build/run gcov for an armv7a?
... or let's put it otherwise: Why doesn't it exist on the target?

I supposed the idea is to generate to coverage data on the target, and then analyze them with gcov on the build machine. See

http://gcc.gnu.org/onlinedocs/gcc/Cross_002dprofiling.html#Cross_002dprofiling.

Yes this should work. Thanks!
It's also documented in the kernel source tree [1].

Quoted 5 lines

Best regards,

Thomas

[1]:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=blob;f=Documentation/gcov.txt;h=e7ca6478cd93d4e6422d1ae92455b347dbdf7ccb;hb=HEAD

Regards,

Robert
..."About Basic: mentally mutilated potential programmers beyond hope of regeneration." -- Dijkstra

My public pgp key is available,at:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x90320BF1