[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ltp-coverage
Subject:    Re: [Ltp-coverage] lcov line coverage
From:       Larry Martell <larry.martell () gmail ! com>
Date:       2009-09-18 22:13:59
Message-ID: 9ea8ae760909181513q4f011d11va1d7773eafdb728e () mail ! gmail ! com
[Download RAW message or body]

On Fri, Sep 18, 2009 at 2:08 PM, Osman, Ahmed <ahmed_osman@mentor.com> wrote:
> Hi ,
>
> I’m using LCOV to display our coverage data from gcov. When I inspect one of
> our files, I see the following:
>
>       78                 :
> /*-----------------------------------------------------------------------------
>
>       79                 :  COMMON NODE ROUTINES:
>
>       80                 :
> -----------------------------------------------------------------------------*/
>
>       81                 :
>
>       82                 : static int isFirstWriteToCh(WlfWrtChannel *ch,
> int archNum)
>
>       83               0 : {
>
>       84               0 :         WlfWrtChannelSend *chs = ch->send;
>
>       85       271945981 :     if (bitSetIsSet(&chs->trFirstWrite, archNum))
> {
>
>       86               0 :             return 0;
>
>       87                 :         } else {
>
>       88           35073 :             bitSetInsert(&chs->trFirstWrite,
> archNum);
>
>       89               0 :             return 1;
>
>       90                 :         }
>
>       91                 : }
>
> This is strange. The return statement at either line 86 or line 89 should be
> hit. Also, line 84 should be hit anyway. Please advice …

In all the times I have seen something like this it was because the
lines that did not get hit were optimized out. When I changed from -O3
down to -O1 or complied with no optimization at all, then the lines
got it. I know in your example, it does not seem like those lines
would have been optimized out, ya just nevah know. That optimizer is
pretty darn smart.

HTH
-larry
------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Ltp-coverage mailing list
Ltp-coverage@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-coverage

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic