Fw: Regarding __gcov_dump and __gcov_reset usage

2021-05-24 Thread Gejoe Daniel via Gcc
Adding gcc mailing list for the clarification.

Thank you team ! 

From: "Gejoe Daniel"
Sent: Mon, 24 May 2021 15:02:12
To: "gcc-h...@gcc.gnu.org"
Subject: Re: Regarding __gcov_dump and __gcov_reset usage

Hi team,

Any info/reply ?

Thanking you in advance,
Gejoe


From: "Gejoe Daniel"
Sent: Sun, 16 May 2021 17:37:46
To: 
Subject: Regarding __gcov_dump and __gcov_reset usage

Hi team,

I did go through the online manual of gcc gcov  on __gcov_dump() and 
__gcov_reset() :
https://gcc.gnu.org/onlinedocs/gcc/Gcov-and-Optimization.html#Gcov-and-Optimization

I tried out using the functions in a sample program (sample-prog.c) that is 
attached here.

The steps followed were :

(1)  gcc -fprofile-arcs -ftest-coverage sample-prog.c 
(2)  ./a.out
(3)  gcov sample-prog.c

While running a.out, when I give character 'g', the __gcov_dump() must 
be invoked.
What I could observe is that first time __gcov_dump() is invoked , the 
sample-prog.gcda file gets created.
For the second time and then onwards, __gcov_dump() invocation (by giving 
'g' character during the a.out run) doesn't happen.
This is concluded by looking at the time stamp of sample-prog.gcda file in the 
same folder. It was still having the same time stamp of first time invocation 
of __gcov_dump().

Another thing is  that, __gcov_reset() also doesn't appear to work. I 
tried giving the character 'r' during the run of the program but 
couldn't see the counters getting reset to 0 in the sample-prog.gcov file. 
The previous values of lines covered were there.

Let me know if my approach is correct or if I miss any information here.

Thanks,
Gejoe
 

sample-prog.c
Description: Binary data


Re: Regarding __gcov_dump and __gcov_reset usage

2021-05-25 Thread Gejoe Daniel via Gcc
Hi Martin,

The bug is created : https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100751
 Let me know if any more info is required.

Thanks,
Gejoe

From: Martin Li ka <mli...@suse.cz>
Sent: Mon, 24 May 2021 19:32:10
To: Gejoe Daniel <gej...@rediffmail.com>, gcc@gcc.gnu.org, 
gcc-h...@gcc.gnu.org
Subject: Re: Regarding __gcov_dump and __gcov_reset usage

On 5/24/21 1:44 PM, Gejoe Daniel via Gcc wrote:
> Adding gcc mailing list for the clarification.
>
> Thank you team !&nbsp;
>
> From: &quot;Gejoe Daniel&quot;&lt;gej...@rediffmail.com>;
> Sent: Mon, 24 May 2021 15:02:12
> To: &quot;gcc-h...@gcc.gnu.org";&lt;gcc-h...@gcc.gnu.org>;
> Subject: Re: Regarding __gcov_dump and __gcov_reset usage
>
> Hi team,
>
> Any info/reply ?
>
> Thanking you in advance,
> Gejoe
>
>
> From: &quot;Gejoe Daniel&quot;&lt;gej...@rediffmail.com>;
> Sent: Sun, 16 May 2021 17:37:46
> To: &lt;gcc-h...@gcc.gnu.org>;
> Subject: Regarding __gcov_dump and __gcov_reset usage
>
> Hi team,
>
> I did go through the online manual of gcc gcov&nbsp; on __gcov_dump() 
and __gcov_reset() :
> 
https://gcc.gnu.org/onlinedocs/gcc/Gcov-and-Optimization.html#Gcov-and-Optimization
>
> I tried out using the functions in a sample program (sample-prog.c) that 
is attached here.
>
> The steps followed were :
>
> (1)&nbsp; gcc -fprofile-arcs -ftest-coverage sample-prog.c&nbsp;
> (2)&nbsp; ./a.out
> (3)&nbsp;&nbsp;gcov sample-prog.c
>
> While running a.out, when I give character &#39;g&#39;, the 
__gcov_dump() must be invoked.
> What I could observe is that first time __gcov_dump() is invoked 
, the sample-prog.gcda file gets created.
> For the second time and then onwards, __gcov_dump() invocation (by giving 
&#39;g&#39; character during the a.out run) doesn&#39;t happen.
> This is concluded by looking at the time stamp of sample-prog.gcda file in 
the same folder. It was still having the same time stamp of first time 
invocation of __gcov_dump().
>
> Another thing is&nbsp; that, __gcov_reset() also doesn&#39;t 
appear to work. I tried giving the character &#39;r&#39; during the run 
of the program but couldn&#39;t see the counters getting reset to 0 in the 
sample-prog.gcov file. The previous values of lines covered were there.
>
> Let me know if my approach is correct or if I miss any information here.
>
> Thanks,
> Gejoe
> &nbsp;
>

Hello.

Can you please create bug at: https://gcc.gnu.org/bugzilla/
Please upload there a test-case and series of commands executed and the 
expected result.

Thank you,
Martin


[Regarding GCOV].gcda:stamp mismatch with notes file

2024-04-24 Thread Gejoe Daniel via Gcc
Hi team,
The following is my query posted but would need more inputs :
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114751

The gcov tool which was working so far seems to fail with our latest branch 
where gcc is 11.4.0 and hence we wanted to sort this out by getting the right 
help as early as possible.

Awaiting prompt reply.

Thanks to the GCC team for all the help !

Regards,
Gejoe