This is an archive of the discontinued LLVM Phabricator instance.

[llvm-profgen] On-demand symbolization
ClosedPublic

Authored by wlei on Sep 24 2021, 7:10 PM.

Details

Summary

Previously we do symbolization for all the functions and actually we only need the symbols that's hit by the samples.

This can significantly speed up the time for large size binary.

Optimization for per-inliner will come along with next patch.

Diff Detail

Event Timeline

wlei created this revision.Sep 24 2021, 7:10 PM
wlei requested review of this revision.Sep 24 2021, 7:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 24 2021, 7:10 PM
wlei edited the summary of this revision. (Show Details)Sep 24 2021, 7:15 PM
wlei added reviewers: hoy, wenlei, wmi.
hoy accepted this revision.Sep 26 2021, 8:26 PM

Lgtm, thanks for the improvement.

This revision is now accepted and ready to land.Sep 26 2021, 8:26 PM
wenlei added inline comments.Sep 26 2021, 8:34 PM
llvm/tools/llvm-profgen/ProfiledBinary.h
174

We don't seem to use the size (value of the map)?

wlei added inline comments.Sep 26 2021, 8:42 PM
llvm/tools/llvm-profgen/ProfiledBinary.h
174

Oh, it's used in the next diff of preinliner optimization, tried to make a shortcut :)

wenlei accepted this revision.Sep 26 2021, 8:46 PM

lgtm, thanks.

llvm/tools/llvm-profgen/ProfiledBinary.h
174

ok, thanks for clarification.

335

nit: emplace? Also see if we can save a lookup by following how such caching is handled in SampleProfileLoader::findFunctionSamples.

wlei updated this revision to Diff 375330.Sep 27 2021, 10:30 AM

chang to use emplace and fix lint

This revision was landed with ongoing or failed builds.Sep 28 2021, 9:10 AM
This revision was automatically updated to reflect the committed changes.