public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug gcov-profile/30650] [Regression 4.3] ICE with -fprofile-use Date: Wed, 31 Jan 2007 12:48:00 -0000 [thread overview] Message-ID: <20070131124814.22744.qmail@sourceware.org> (raw) In-Reply-To: <bug-30650-13404@http.gcc.gnu.org/bugzilla/> ------- Comment #1 from rguenth at gcc dot gnu dot org 2007-01-31 12:48 ------- Confirmed. I'm confused by the code anyways: size = ((histogram->hvalue.counters[0] + histogram->hvalue.counters[0] / 2) / histogram->hvalue.counters[0]); according to the source counter[0] is supposed to be the sum of the sizes and counters[1] the call count. Also all of this profiling stuff needs better commenting. Like #define GCOV_COUNTER_AVERAGE 6 /* The most common difference between consecutive values of expression. */ #define GCOV_COUNTER_IOR 7 /* The most common difference between consecutive values of expression. */ and case HIST_TYPE_AVERAGE: hist->n_counters = 3; break; (which should be 2?) as void __gcov_average_profiler (gcov_type *counters, gcov_type value) { counters[0] += value; counters[1] ++; } suggests. So the code in question should probably read if (!histogram || histogram->hvalue.counters[1] == 0) *expected_size = -1; else { gcov_type size; size = ((histogram->hvalue.counters[0] + histogram->hvalue.counters[0] / 2) / histogram->hvalue.counters[1]); but defering to Honza who wrote all this code. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at gcc dot gnu dot | |org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2007-01-31 12:48:13 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30650
next prev parent reply other threads:[~2007-01-31 12:48 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-01-31 11:13 [Bug gcov-profile/30650] New: " burnus at gcc dot gnu dot org 2007-01-31 12:48 ` rguenth at gcc dot gnu dot org [this message] 2007-02-03 17:32 ` [Bug gcov-profile/30650] [4.3 Regression] " jsm28 at gcc dot gnu dot org 2007-02-03 21:45 ` stefaan dot deroeck at gmail dot com 2007-02-03 21:49 ` hubicka at gcc dot gnu dot org 2007-02-03 21:49 ` hubicka at gcc dot gnu dot org 2007-02-03 21:51 ` rguenth at gcc dot gnu dot org 2007-02-03 21:55 ` hubicka at ucw dot cz 2007-02-03 23:36 ` hubicka at gcc dot gnu dot org 2007-02-05 14:45 ` burnus at gcc dot gnu dot org 2007-02-14 1:25 ` hubicka at gcc dot gnu dot org
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=20070131124814.22744.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /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: linkBe 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).