This is an archive of the discontinued LLVM Phabricator instance.

[llvm-profgen] Fix bug of populating profile symbol list
ClosedPublic

Authored by wlei on Oct 14 2021, 10:40 AM.

Details

Summary

Previous implementation of populating profile symbol list is wrong, it only included the profiled symbols. Actually it should use all symbols, here this switches to use the symbols from debug info. Also turned the flag off by default.

Diff Detail

Event Timeline

wlei created this revision.Oct 14 2021, 10:40 AM
wlei requested review of this revision.Oct 14 2021, 10:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 14 2021, 10:40 AM
wlei retitled this revision from [llvm-profgen] Fix bugs of populating profile symbol list to [llvm-profgen] Fix bug of populating profile symbol list.Oct 14 2021, 10:51 AM
wlei edited the summary of this revision. (Show Details)
wlei added reviewers: wenlei, hoy.
hoy accepted this revision.Oct 14 2021, 1:04 PM

Thanks for the fix. The switch flipping makes sense to me. It enables the consistency between CS and non-CS profile.

This revision is now accepted and ready to land.Oct 14 2021, 1:04 PM
wenlei added inline comments.Oct 18 2021, 10:45 PM
llvm/tools/llvm-profgen/ProfiledBinary.cpp
557

How do we deal with symbols without address range (getAddressRanges)? The old tool skips those, and this seems different. I'm not sure when we would have a function without address range though.

wlei added inline comments.Oct 22 2021, 11:27 AM
llvm/tools/llvm-profgen/ProfiledBinary.cpp
557

Good catch, thanks. After rebased on https://reviews.llvm.org/D112282, this should align with our internal tool

wenlei accepted this revision.Oct 22 2021, 12:41 PM

lgtm, thanks.

This revision was landed with ongoing or failed builds.Oct 29 2021, 10:00 AM
This revision was automatically updated to reflect the committed changes.