This is an archive of the discontinued LLVM Phabricator instance.

Split getCompileUnitFor{Data,Code}Address.
ClosedPublic

Authored by hctim on Feb 28 2023, 2:55 PM.

Details

Summary

Getting compile units for data addresses is much slower, as it often
requires a slow fallback path to walk every DWARF entry, as
data addresses don't fall into the compilation unit ranges.

Most lookups are code addresses, and don't need this logic. Split the
functionality out so that we restore the fast-path behaviour for the
code lookups.

More context at:
https://discourse.llvm.org/t/llvm-symbolizer-has-gotten-extremely-slow/67262

Diff Detail

Event Timeline

hctim created this revision.Feb 28 2023, 2:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 28 2023, 2:55 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
hctim requested review of this revision.Feb 28 2023, 2:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 28 2023, 2:55 PM
dblaikie accepted this revision.Mar 6 2023, 9:44 PM

Yep, looks good. (interestingly, this implementation might be missing some functionality for Split DWARF - in a Split DWARF build I didn't see any perf improvement, because I think there was no perf degredation - because this feature isn't properly implemented for Split DWARF, I'd guess)

But for a non-Split DWARF build this patch does improve performance:

From: 1m16.880s
To: 0m17.188s

Thanks for doing this - also looks like we have internal use that ended up with some workarounds that can be cleaned up by this API change too.

This revision is now accepted and ready to land.Mar 6 2023, 9:44 PM
This revision was automatically updated to reflect the committed changes.
foad added a subscriber: foad.Apr 27 2023, 1:38 AM