https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86957

--- Comment #3 from Indu Bhagat <ibhagatgnu at gmail dot com> ---
Currently, GCC dumps some information in the dump files regarding functions not
being executed in the training run (And, I agree its not satisfactorily
direct).

First, in the "Symbol table:" dump section in the .*i.profile dumpfile -
a. functions which are not executed in the training run (hence, zero count
   profiles) are shown as "unlikely_executed". Thats the case when profiles  
   are not estimated. 
b. If function profiles are estimated however (in -O1,
   -fguess-branch-probability is enabled), an "estimated_locally"
   appears alongside "unlikely_executed", e.g., ["Function flags: count: XXX
   (estimated locally, globally 0) body unlikely_executed"].

I see deeper classification in profile_count::dump (FILE *f) const API (which
needs closer look), but I agree that we can improve the presented information
regarding the quality of the profile. Perhaps abstracting out the somewhat 
superfluous information (in the current context), e.g., "globally 0" vs 
"globally 0 adjusted"...

Why not additionally dump a clear "Profile Feedback" : "Run/Not run" per 
function in the dump file ?

I need to take a closer look at the information being dumped currently before I
make a proposal. But I agree that gcc can give clearer information.

Will be happy to work on this as another CR.

Reply via email to