public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: gcov & total executable loc
       [not found] <OF577823AD.17542467-ONC1256F07.002B50FF-C1256F07.002B2F1D@LocalDomain>
@ 2004-09-06  9:23 ` p.steiner
  0 siblings, 0 replies; 2+ messages in thread
From: p.steiner @ 2004-09-06  9:23 UTC (permalink / raw)
  To: gcc-help

hi again,

sorry for replying to my own mail so fast, but as always i stumbled upon 
my mistake ca. 1 hour after hitting the submit button... :)

i just recognized that gcov uses existing data files in the current 
directory, so i just have to run all tests of the same source base in the 
same directory. this way after all tests finished i have correct total 
stats...

greetings, peter steiner.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* gcov & total executable loc
@ 2004-09-06  7:53 p.steiner
  0 siblings, 0 replies; 2+ messages in thread
From: p.steiner @ 2004-09-06  7:53 UTC (permalink / raw)
  To: gcc-help

hello,

because neither google nor the mailing list archives yielded any results 
on my question i hope to find help with the local gurus around...

how does gcov calculate the total executable lines?

when run on a file it outputs total stats in the scheme of:
> gcov file.cpp
95.00% of 125 source lines executed in file ....

at my company we are running multiple regression tests against a single 
library, and somehow gcov gives me a different total sloc each time. (that 
is, in the example 125 source lines total, might be 15 source lines total 
for another test, although we are talking about the same source file.)

each test might use different parts of the library (they cover different 
areas in the source), but i thought it to always calculate the same total 
figures for each source file. i can merge the line-counts to get the total 
coverage of the library tests, but i have no idea how to merge/get total 
logical lines of code in the library to be able to calculate:

covered logical sloc / total logical sloc = coverage

does gcov already hand me this information and i am just too stupid to 
see? or might there be some arcane gcc tricks for calculating the total 
executable lines of a source file?

thanks for any help!

-- peter steiner.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-09-06  9:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <OF577823AD.17542467-ONC1256F07.002B50FF-C1256F07.002B2F1D@LocalDomain>
2004-09-06  9:23 ` gcov & total executable loc p.steiner
2004-09-06  7:53 p.steiner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).