From: Xinliang David Li <davidxl@google.com>
To: Jan Hubicka <hubicka@ucw.cz>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
Diego Novillo <dnovillo@google.com>
Subject: Re: FDO usability patch -- cfg and lineno checksum
Date: Wed, 27 Apr 2011 17:45:00 -0000 [thread overview]
Message-ID: <BANLkTinH3bFhdRDV8b0Oifj_7tcHCUGTBA@mail.gmail.com> (raw)
In-Reply-To: <20110427155442.GA12011@atrey.karlin.mff.cuni.cz>
On Wed, Apr 27, 2011 at 8:54 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
> Please don't forget about changelogs..
>> Index: tree.c
>> ===================================================================
>> --- tree.c (revision 172802)
>> +++ tree.c (working copy)
>> @@ -8513,14 +8513,12 @@ dump_tree_statistics (void)
>
> The crc bits was already reviewed, right?
Yes.
>> - 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.
>> +unsigned
>> +coverage_compute_cfg_checksum (void)
>> +{
>> + basic_block bb;
>> + unsigned chksum = n_basic_blocks;
>> +
>> + FOR_EACH_BB (bb)
>> + {
>> + edge e;
>> + edge_iterator ei;
> Perhaps also
> chksum = crc32_byte (chksum, bb->index)
> for cases where destination stays the same, but source of edge moves (i.e. with forwarder
> blocks)
Yes.
Thanks,
David
>
> Patch is OK, thanks
> Honza
>
next prev parent reply other threads:[~2011-04-27 16:39 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-13 22:26 Xinliang David Li
2011-04-13 22:34 ` Xinliang David Li
[not found] ` <BANLkTinVavyXCqy88TpqLzmexp2LQ1Pwqw@mail.gmail.com>
2011-04-15 16:54 ` Xinliang David Li
2011-04-17 17:15 ` Jan Hubicka
2011-04-17 19:22 ` Xinliang David Li
2011-04-19 20:37 ` Xinliang David Li
2011-04-19 22:36 ` Jan Hubicka
2011-04-21 8:30 ` Xinliang David Li
2011-04-21 22:21 ` Jan Hubicka
2011-04-21 22:42 ` Xinliang David Li
2011-04-22 19:35 ` Xinliang David Li
2011-04-22 20:11 ` Jan Hubicka
2011-04-25 17:05 ` Xinliang David Li
2011-04-27 16:22 ` Xinliang David Li
2011-04-27 16:27 ` Jan Hubicka
2011-04-27 17:45 ` Xinliang David Li [this message]
2011-04-27 17:54 ` Jan Hubicka
2011-04-27 17:57 ` Xinliang David Li
2011-04-21 18:23 ` Diego Novillo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BANLkTinH3bFhdRDV8b0Oifj_7tcHCUGTBA@mail.gmail.com \
--to=davidxl@google.com \
--cc=dnovillo@google.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hubicka@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).