This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Don't error on coverage mismatch by request
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Richard Guenther <richard dot guenther at gmail dot com>
- Cc: Richard Guenther <rguenther at suse dot de>, gcc-patches at gcc dot gnu dot org, Jan Hubicka <jh at suse dot cz>
- Date: Sun, 14 Jan 2007 18:46:25 +0100
- Subject: Re: [PATCH] Don't error on coverage mismatch by request
- References: <Pine.LNX.4.64.0611291340220.30849@zhemvz.fhfr.qr> <84fc9c000701140941y3b9c4eb9t16fdb2fe0d900168@mail.gmail.com>
> On 11/29/06, Richard Guenther <rguenther@suse.de> wrote:
> >
> >This makes coverage mismatch errors a warning if requested by
> >-Wcoverage-mismatch and assumes execution counts to be zero in
> >this case as we do for missing coverage info.
> >
> >This allows the same profile data to be used if re-compiling with
> >like small bugfixes added to a big project without the need to
> >re-do possibly lengthy profiling.
> >
> >Bootstrapped and tested on x86_64-unknown-linux-gnu.
> >
> >Ok for mainline?
>
> I'm going to commit this in the next few days after another
> bootstrap/regtest.
OK, if you find this useful (I originally missed this patch, sorry).
However I think the documentaiton should not suggest that if compiler
does not warn, everything is OK. Please drop in the warning that even
if the mismatch is not diagnozed, the profile might be misapplied
resulting in poorly optimized code.
Honza
>
> Thanks,
> Richard.
>
> >2006-11-23 Richard Guenther <rguenther@suse.de>
> >
> > * doc/invoke.texi (-Wcoverage-mismatch): Document.
> > * common.opt (-Wcoverage-mismatch): New warning option.
> > * coverage.c (get_coverage_counts): Ignore coverage mismatch
> > if -Wcoverage-mismatch is given.