|
From: Nick G. <ni...@ni...> - 2008-07-31 19:36:58
|
Cary R. wrote: > > I have only poked at this a bit, but one interesting thing > is the results for LineInfo.cc. It's claiming the return is > never called, but the rest of the routine is called 217 > times. Do you have optimization turned on and that is what > is confusing gcov? > > Yes, I'd built it with the default -O2. I think you're right about this confusing gcov, and the manual suggests the same. I've re-built it with -O0 and the results are here: http://www.nickg.me.uk/~nick/vvp_cov_O0/ Interestingly, the total coverage decreased slightly by 0.5%, but LineInfo.cc is now 100% covered. Also, I encountered the "missing vvp_net_t delete operator" problem when I tried this with GCC 4.1. However, there were no problems with -O0 on either GCC 3.3 or 4.3. > Once you get all the kinks worked out both Steve and I should > probably have a copy of the changes or it should be fully > integrated as a special target (make gcov). > It's currently implemented as a --enable-coverage flag to configure which sets the necessary flags and now forces -O0. (Fairly simple: I added an AC_CODE_COVERAGE macro to aclocal.m4 which checks the enable flag, and call this in any configure.in where we might want to enable coverage statistics.) I've added a `coverage' branch to my github account with two patches against the master branch. The regression wrapper script could go in the testsuite repository. |