From patchwork Mon Jan 24 21:44:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: asharif tools X-Patchwork-Id: 80272 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 7E46CB70B3 for ; Tue, 25 Jan 2011 08:45:00 +1100 (EST) Received: (qmail 24441 invoked by alias); 24 Jan 2011 21:44:59 -0000 Received: (qmail 24387 invoked by uid 22791); 24 Jan 2011 21:44:58 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-yx0-f175.google.com (HELO mail-yx0-f175.google.com) (209.85.213.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 24 Jan 2011 21:44:50 +0000 Received: by yxd5 with SMTP id 5so1640247yxd.20 for ; Mon, 24 Jan 2011 13:44:49 -0800 (PST) MIME-Version: 1.0 Received: by 10.100.201.15 with SMTP id y15mr3254601anf.259.1295905488983; Mon, 24 Jan 2011 13:44:48 -0800 (PST) Received: by 10.236.102.144 with HTTP; Mon, 24 Jan 2011 13:44:48 -0800 (PST) In-Reply-To: References: Date: Mon, 24 Jan 2011 13:44:48 -0800 Message-ID: Subject: Re: [PATCH] Patch to add an error message when the profile is corrupted From: asharif tools To: Richard Guenther Cc: gcc-patches@gcc.gnu.org X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On Mon, Jan 24, 2011 at 1:21 PM, asharif tools wrote: > On Mon, Jan 24, 2011 at 1:19 PM, asharif tools wrote: >> On Fri, Jan 21, 2011 at 1:42 AM, Richard Guenther 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: 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; } }