From patchwork Mon Jan 24 21:19:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: asharif tools X-Patchwork-Id: 80251 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 E0122B7107 for ; Tue, 25 Jan 2011 08:19:34 +1100 (EST) Received: (qmail 744 invoked by alias); 24 Jan 2011 21:19:32 -0000 Received: (qmail 736 invoked by uid 22791); 24 Jan 2011 21:19:32 -0000 X-SWARE-Spam-Status: No, hits=-1.7 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-yi0-f47.google.com (HELO mail-yi0-f47.google.com) (209.85.218.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 24 Jan 2011 21:19:19 +0000 Received: by yie16 with SMTP id 16so1632077yie.20 for ; Mon, 24 Jan 2011 13:19:17 -0800 (PST) MIME-Version: 1.0 Received: by 10.151.41.13 with SMTP id t13mr5010017ybj.191.1295903957599; Mon, 24 Jan 2011 13:19:17 -0800 (PST) Received: by 10.236.102.144 with HTTP; Mon, 24 Jan 2011 13:19:17 -0800 (PST) In-Reply-To: References: Date: Mon, 24 Jan 2011 13:19:17 -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 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? gcc/ChangeLog 2011-01-19 Ahmad Sharif PR gcov-profile/47363 * gcc/value-prof.c (check_counter): Added an error message for the case where *count > *all. --- 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; } }