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

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

Comments

asharif tools - Jan. 24, 2011, 9:44 p.m.
On Mon, Jan 24, 2011 at 1:21 PM, asharif tools <asharif.tools@gmail.com> wrote:
> On Mon, Jan 24, 2011 at 1:19 PM, asharif tools <asharif.tools@gmail.com> wrote:
>> 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?
>
> Sorry about the double email -- I forgot a space in the patch. This is
> the correct one:

Okay, this time its the correct one (I added back the line that was
there in the original error message). I also made the indentation
similar to the one used in the file already. Sorry about all the spam:

Patch

Index: gcc/value-prof.c
===================================================================
--- gcc/value-prof.c	(revision 169016)
+++ gcc/value-prof.c	(working copy)
@@ -474,8 +474,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);
+		    "profile counter (%d out of %d) inconsistent with "
+		    "basic-block count (%d)",
+		    name,
+		    (int) *count,
+		    (int) *all,
+		    (int) bb_count);
 	  return true;
 	}
     }