[PATCH] CodeGen: Emit warnings when dropping profile data during PGO

Bob Wilson bob.wilson at apple.com
Thu Apr 10 16:23:39 PDT 2014


On Apr 10, 2014, at 4:22 PM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote:

> 
> On Apr 10, 2014, at 15:53, Justin Bogner <mail at justinbogner.com> wrote:
> 
>> Bob Wilson <bob.wilson at apple.com> writes:
>>> 
>>> I know we had already discussed that warning name, but I’m now
>>> wondering whether it should be “profile-instr-mismatch” to match the
>>> command line options. What do you think?
>> 
>> After some thought, I think the parallel with the -f name is
>> worthwhile. I've gone with profile-instr-dropped
> 
> I might be bike shedding here, but is -Wprofile-instr-out-of-date
> better?  That matches the actual message you went with below.

Yes, I like -Wprofile-instr-out-of-date much better than -dropped.

> 
> Also, "dropped" still suggests a mismatch, whereas your new message
> below talks about missing data as well.
> 
> Another possibility is to split those into two warnings.
> 
> 1. -Wprofile-instr-missing: warns about missing data.
> 2. -Wprofile-instr-mismatch: warns about present but mismatched data.

Let’s keep it simple for now. The message to the user is the same in either case: the profile needs to be updated.

> 
>>> This still doesn’t say much about what effect the mismatch may have or how to fix it. Maybe something like:
>>> 
>>> "mismatched profile data ignored for %0 of %1 function%s1; updating
>>> the profile may improve optimizations”
>> 
>> This should be clearer:
>> 
>> "profile data may be out of date: of %0 function%s0, %1 %plural{1:has|:have}1
>>  no data and %2 %plural{1:has|:have}2 mismatched data that will be ignored"





More information about the cfe-commits mailing list