Usecase : The usecase is to get a high-level assessment of the quality of
function profiles available (-Wcoverage-mismatch and -Wmissing-profile are
useful in the same spirit). For large codebases, it is useful to make the
profile quality information more handy for ease of development. Doing a full
gcov run is more cumbersome than keeping the warning flag ENABLED in the
codebase at compile/development time to catch these.

For these reasons, I do think that atleast adding the summary-level diagnostic
is useful in general -
 "warning: XX out of YY functions not exercised in training run 
[-Wprofile-quality]"
This lets the user make the decision of whether and how to drill down.

Now for drill down, I agree gcov/lcov is a good choice. But a full gcov run is
sometimes a deterrent for large codebases.
For this reason, my proposal has a second-level option in the form of
opt-info msgs/-Wprofile-quality=all (depending on whether we choose OPTION 1 or
OPTION 2).

Regarding the function level detail being too noisy : I sort of agree with that
comment. But I am of the opinion that I would rather leave it to the user to
infer the profile quality as per the application characteristics.

Thanks
Indu


On 11/22/2018 03:58 AM, Martin Liška wrote:
On 11/21/18 4:47 AM, Andi Kleen wrote:
Indu Bhagat<indu.bha...@oracle.com>  writes:

Proposal to add diagnostics to know which functions were not run in the
training run in FDO.
Don't you think the warning will be very noisy? I assume most programs
have a lot of cold error handling functions etc. that are never executed
in a normal execution.

Like how does it look like for a gcc build for example?
I guess like this:
https://users.suse.com/~mliska/lcov/

Indu, have you thought about using gcov/lcov rather than inventing a new warning
(or opt info)?

Can you please define exactly your use case?

Martin

I suspect it would need some heuristics to cut it down at least, like if
the function ends with exit (perhaps propagated through the call tree)
it's not flagged.  Or if there is warning for a function don't warn
about callees that are not called from somewhere else.

-Andi


Reply via email to