Patchwork Patch to add an error message when the profile is corrupted

login
register
mail settings
Submitter asharif tools
Date Jan. 24, 2011, 9:19 p.m.
Message ID <AANLkTin8S8a2dbFL9c0SqQ_XBT2nmH5_Vo_OxWzJmY40@mail.gmail.com>
Download mbox | patch
Permalink /patch/80251/
State New
Headers show

Comments

asharif tools - Jan. 24, 2011, 9:19 p.m.
On Fri, Jan 21, 2011 at 1:42 AM, Richard Guenther <rguenther@suse.de> wrote:
>
> It would be nice to improve the message to something that is more helpful
> for the user.

Richard, I replaced the error message with the one you posted on the bug:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47363

I also updated the bug with this patch.

Thoughts?


gcc/ChangeLog
2011-01-19 Ahmad Sharif <asharif@google.com>

       PR gcov-profile/47363
       * gcc/value-prof.c (check_counter): Added an error message for the case
       where *count > *all.

Patch

--- gcc/value-prof.c	(revision 169016)
+++ gcc/value-prof.c	(working copy)
@@ -473,9 +473,12 @@ 
 	}
       else
 	{
-	  error_at (locus, "corrupted value profile: %s "
-		    "profiler overall count (%d) does not match BB count (%d)",
-		    name, (int)*all, (int)bb_count);
+          error_at (locus, "profile counter (%d out of %d) inconsistent with"
+                           "basic-block count (%d)",
+                           name,
+                           (int) *count,
+                           (int) *all,
+                           (int) bb_count);
 	  return true;
 	}
     }