Thread (31 messages) 31 messages, 4 authors, 2013-08-28

Re: [RFC PATCH 0/4] add support for gcov format introduced in gcc 4.7

From: LF.Tan <hidden>
Date: 2013-08-27 02:38:35
Also in: lkml

Hi Peter

I can get the gcda for the kernel loadable module now. Yes, the
virtual file is with size 0 and I saw the file is empty with 'vi'
command. But, it has data with 'cat' or 'hexdump' command.

Thanks.

On Mon, Aug 26, 2013 at 10:19 PM, Peter Oberparleiter
[off-list ref] wrote:
On 26.08.2013 13:39, LF.Tan wrote:
quoted
Hi all

I am interested to enable Gcov on my platform (on a target board). I
have tried to apply the 4 patches submitted by Frantisek Hrbata. But,
the *.gcda is always empty. Note, I am using GCC 4.7.3.

I have followed the steps in Documentation/gcov.txt. I've mounted the
NFS filesystem and it has access to the kernel build directory on host
machine.The path for the kernel source in host and target are same.

Let said my kernel module is under drivers/misc,
drivers/misc/module.ko. Turn on Gcov in drivers/misc/Makefile.

1. mount -t debugfs none /sys/kernel/debug/
2. insmod <PATH>/module.ko
3. Perform some actions to excute code in module.ko
4. rmmod <PATH>/module.ko
5. Check /sys/kernel/debug/gcov/<PATH>/drivers/misc/. There is a soft
link of module.gcno (I check the soft link is working), but
module.gcda is empty.
Are you sure they are empty? .gcda files report a file size of 0 as many
virtual files do, but you can read data from them nevertheless. You could
try running "cat" on them to copy their contents for example.
quoted
Any step is incorrect or missing? Or anyone know how to enable GCOV on
target board? Please advice.
I would like to enable GCOV in arch/ code as well.
Thank you very much.
--
Peter Oberparleiter
Linux on System z Development - IBM Germany
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help