> >> - else if (entry->checksum != checksum)
> >> + else if (entry->lineno_checksum != lineno_checksum
> >> + || entry->cfg_checksum != cfg_checksum)
> >> {
> >> error ("coverage mismatch for function %u while reading
> >> execution counters",
> >> fn_ident);
> >> - error ("checksum is %x instead of %x", entry->checksum,
> >> checksum);
> >> + error ("checksum is (%x,%x) instead of (%x,%x)",
> >> + entry->lineno_checksum, entry->cfg_checksum,
> >> + lineno_checksum, cfg_checksum);
> >
> > Can't we give more informative message whether code changes or it seems to
> > be
> > optimization options disprepancy?
>
> Good idea -- but to change the warning not the error here. For the
> warning (which is promoted to error by default) currently it is:
>
> error: coverage mismatch for function xxxx while reading counter yyy.
> note: control flow checksum is aaa instead of bbb
>
> Could be:
> error: function xxx's control flow does match its profile data (counter yyy).
> note: use -Wno-error=coverage-mismatch to tolerate the mismatch but
> performance may drop if the function is hot.
Well, I had more in mind giving diffent message for lineno checksum difference
than cfg checksum.
But I agree that we probably don't want to output checksum numbers, those are
useless even for debugging.
Probably could follow same warning/error rules as the main loading routine
whatever you converged
to.
Honza