Re: Question about the coverage statistics of Gcov

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 6, 2021 at 8:34 AM heng zhang <byone.heng@xxxxxxxxx> wrote:

> As you said, the 8th line has some unexecuted parts, i.e., “ i++ ” so why
> is not the execution time of the 8th line 1*?
>

The process of mapping source lines to object file basic blocks and back
again is very complicated, depends on compiler optimizations and the source
code, and we don't always do a perfect job of it.  The gcov output should
always be considered reasonable estimates.  If you want better answers, try
lowering the optimization level, or adding more newlines to your code so
you have fewer statements on each source line.

Jim




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux