> 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?
Patch looks OK.  We used to have this warning but it was removed by google floks
because if you build a static library it may happen that object file was never 
linked
into your test application, so its use is a bit limited. Having an option for 
this makes
sense to me though.

Honza
> 
> Martin
> 
> > 
> > gcc/ChangeLog:
> > 
> > 2018-09-14  "Indu Bhagat"  <"indu.bha...@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.bha...@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.

Perhaps we want also to have reference from -fprofile-use documentation so 
users notice
this option.

Honza
> > 
> > 
> 

Reply via email to