From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 94079 invoked by alias); 17 Sep 2018 10:10:36 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 94066 invoked by uid 89); 17 Sep 2018 10:10:35 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.4 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_NUMSUBJECT,SPF_PASS autolearn=ham version=3.3.2 spammy=HTo:D*oracle.com, HContent-Transfer-Encoding:8bit X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 17 Sep 2018 10:10:34 +0000 Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 1D5C1AFA5; Mon, 17 Sep 2018 10:10:32 +0000 (UTC) Subject: Re: [PATCH] PR86957 To: Indu Bhagat , gcc-patches@gcc.gnu.org Cc: Jan Hubicka References: <6a2ea403-22c3-91f6-f826-29e186f21b91@suse.cz> <159a29c5-8f8b-4194-dbea-1c9bd414db3a@oracle.com> From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Message-ID: <7ed25f0a-10a8-3eca-c032-29e76054bfb6@suse.cz> Date: Mon, 17 Sep 2018 10:10:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <159a29c5-8f8b-4194-dbea-1c9bd414db3a@oracle.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2018-09/txt/msg00851.txt.bz2 On 9/16/18 12:58 AM, Indu Bhagat wrote: > Thanks for the reviews. I have incorporated them in this patch except the one > (changes in common.opt) below. > > In this patch, > > 1. -Wmissing-profile is a warning by default and is ON by default with > -fprofile-use > 2. Attached pr86957-missing-profile-diagnostic-2 shows the warning messages > 3. Added a testcase for warning in the case of missing profile feedback data > file for a compilation unit > > Thanks Hi. The patch looks fine for me now. Honza can you approve it? Martin > > gcc/ChangeLog: > > 2018-09-14 "Indu Bhagat" <"indu.bhagat@oracle.com"> > > * common.opt: New warning option -Wmissing-profile. > * coverage.c (get_coverage_counts): Add warning for missing .gcda file. > * doc/invoke.texi: Document -Wmissing-profile. > > gcc/testsuite/ChangeLog: > > 2018-09-14 "Indu Bhagat" <"indu.bhagat@oracle.com"> > > * gcc.dg/Wmissing-profile.c: New test. > > > On 09/11/2018 02:21 AM, Martin Liška wrote: >>> --- a/gcc/common.opt >>> +++ b/gcc/common.opt >>> @@ -811,6 +811,10 @@ Wcoverage-mismatch >>> Common Var(warn_coverage_mismatch) Init(1) Warning >>> Warn in case profiles in -fprofile-use do not match. >>> >>> +Wmissing-profile >>> +Common Var(warn_missing_profile) Init(1) Warning >>> +Warn in case profiles in -fprofile-use do not exist. >> Maybe 'Want about missing profile for a function in -fprofile-use build.' ? >> > Since, it also warns when feedback file is missing for a compilation unit, the > suggested text above will be more restrictive. So I did not change. > >