diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2017-06-19 11:47:31 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2017-06-19 09:47:31 +0000 |
commit | 4e9a497f07457d63c74962ee0d90c96bdd98f918 (patch) | |
tree | a246eb44570f5679b805cce58626b999212867f2 /gcc/profile-count.c | |
parent | fe1ae165924f6c4bc55e40c2d3843d39b9bfc297 (diff) | |
download | gcc-4e9a497f07457d63c74962ee0d90c96bdd98f918.zip gcc-4e9a497f07457d63c74962ee0d90c96bdd98f918.tar.gz gcc-4e9a497f07457d63c74962ee0d90c96bdd98f918.tar.bz2 |
profile-count.c (profile_count::dump): Dump quality.
* profile-count.c (profile_count::dump): Dump quality.
(profile_count::differs_from_p): Update for unsigned val.
* profile-count.h (profile_count_quality): New enum.
(profile_count): Turn m_val to 62bit unsigned, add quality tracking.
From-SVN: r249360
Diffstat (limited to 'gcc/profile-count.c')
-rw-r--r-- | gcc/profile-count.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/gcc/profile-count.c b/gcc/profile-count.c index 5ad7178..e64d1b5 100644 --- a/gcc/profile-count.c +++ b/gcc/profile-count.c @@ -37,7 +37,15 @@ profile_count::dump (FILE *f) const if (!initialized_p ()) fprintf (f, "uninitialized"); else - fprintf (f, "%" PRId64, m_val); + { + fprintf (f, "%" PRId64, m_val); + if (m_quality == count_adjusted) + fprintf (f, "(adjusted)"); + else if (m_quality == count_afdo) + fprintf (f, "(auto FDO)"); + else if (m_quality == count_guessed) + fprintf (f, "(guessed)"); + } } void @@ -51,7 +59,7 @@ profile_count::differs_from_p (profile_count other) const { if (!initialized_p () || !other.initialized_p ()) return false; - if (m_val - other.m_val < 100 && other.m_val - m_val < 100) + if (m_val - other.m_val < 100 || other.m_val - m_val < 100) return false; if (!other.m_val) return true; @@ -64,6 +72,7 @@ profile_count::stream_in (struct lto_input_block *ib) { profile_count ret; ret.m_val = streamer_read_gcov_count (ib); + ret.m_quality = (profile_count_quality) streamer_read_uhwi (ib); return ret; } @@ -71,10 +80,12 @@ void profile_count::stream_out (struct output_block *ob) { streamer_write_gcov_count (ob, m_val); + streamer_write_uhwi (ob, m_quality); } void profile_count::stream_out (struct lto_output_stream *ob) { streamer_write_gcov_count_stream (ob, m_val); + streamer_write_uhwi_stream (ob, m_quality); } |