This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: gcov: new option to merge results
- From: Olivier Hainque <hainque at adacore dot com>
- To: Tristan Gingold <gingold at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org, hainque at adacore dot com
- Date: Fri, 8 Jun 2007 18:34:20 +0200
- Subject: Re: PATCH: gcov: new option to merge results
- References: <4FFEC521-C12A-4448-A31B-8F8117C483CA@adacore.com>
Tristan Gingold wrote:
> this patch adds a new option to gcov: --merge-results (-m).
> When this option is set, gcov reads all input files before writing
> results instead of writing results after each input file.
> Therefore, if two .gcda reference a common source file com.c, only
> one com.c.gcov file is generated with counts added rather than two
> com.c.gcov, the second one overwriting the first one.
Sounds like a significant behavior improvement, avoiding confusion if not
just wrong results in various contexts for different languages (Ada generics
come to mind, maybe inlining in general, C++ templates as well).
Do you have concrete examples of problems that prompted this change ?
Looks like this could even be the default behavior IMO.