This is an archive of the discontinued LLVM Phabricator instance.

[CSSPGO] Use callsite sample counts to annotate indirect call sites.
ClosedPublic

Authored by hoy on Feb 18 2021, 12:45 PM.

Details

Summary

With CSSPGO all indirect call targets are counted torwards the original indirect call site in the profile, including both inlined and non-inlined targets. Therefore no need to look for callee entry counts. This also fixes the issue where callee entry count doesn't match callsite count due to the nature of CS sampling.

I'm also cleaning up the orginal code that called findIndirectCallFunctionSamples just to compute the sum, the return value of which was disgarded.

Diff Detail

Event Timeline

hoy created this revision.Feb 18 2021, 12:45 PM
hoy requested review of this revision.Feb 18 2021, 12:45 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 18 2021, 12:45 PM
wenlei accepted this revision.Feb 18 2021, 12:48 PM

Looks clean, thanks!

This revision is now accepted and ready to land.Feb 18 2021, 12:48 PM
wmi accepted this revision.Feb 18 2021, 12:56 PM

Thanks for the quick fix!

hoy updated this revision to Diff 324747.Feb 18 2021, 1:03 PM

Fixing clang-tidy issues.

This revision was landed with ongoing or failed builds.Feb 18 2021, 2:52 PM
This revision was automatically updated to reflect the committed changes.