This is an archive of the discontinued LLVM Phabricator instance.

[BOLT]DWARF] Eagerly write out loclists
ClosedPublic

Authored by ayermolo on Jun 3 2022, 1:03 PM.

Details

Summary

Taking advantage of us being able to re-write .debug_info to reduce memory
footprint loclists. Writing out loc-list as they are added, similar to how
we handle ranges.

Collected on clang-14
trunk
4:41.20 real, 389.50 user, 59.50 sys, 0 amem, 38412532 mmem
4:30.08 real, 376.10 user, 63.75 sys, 0 amem, 38477844 mmem
4:25.58 real, 373.76 user, 54.71 sys, 0 amem, 38439660 mmem
diff
4:34.66 real, 392.83 user, 57.73 sys, 0 amem, 38382560 mmem
4:35.96 real, 377.70 user, 58.62 sys, 0 amem, 38255840 mmem
4:27.61 real, 390.18 user, 57.02 sys, 0 amem, 38223224 mmem

Diff Detail

Event Timeline

ayermolo created this revision.Jun 3 2022, 1:03 PM
Herald added a reviewer: Amir. · View Herald Transcript
Herald added a reviewer: maksfb. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
ayermolo requested review of this revision.Jun 3 2022, 1:03 PM
Herald added a project: Restricted Project. · View Herald Transcript
ayermolo updated this revision to Diff 434548.Jun 6 2022, 11:32 AM

clang-format

ayermolo updated this revision to Diff 434554.Jun 6 2022, 11:47 AM

clang-format

ayermolo added a subscriber: zr33.Jun 6 2022, 4:21 PM

"[BOLT][DWARF] Change loclist to take not delay writing out lists." -> "[BOLT]DWARF] Eagerly write out loclists".

Could you add more background in the Summary and include memory footprint reduction data?

bolt/include/bolt/Core/DebugData.h
39

Drop const here.

527

s/relative/related/

601

Or NumEntries.

bolt/lib/Core/DebugData.cpp
81–98

No need to duplicate comments from the header.

bolt/lib/Rewrite/DWARFRewriter.cpp
177
178
ayermolo retitled this revision from [BOLT][DWARF] Change loclist to take not delay writing out lists. to [BOLT]DWARF] Eagerly write out loclists.Jun 7 2022, 3:27 PM
maksfb added inline comments.Jun 7 2022, 3:41 PM
bolt/include/bolt/Core/DebugData.h
39

I take it back.

ayermolo updated this revision to Diff 434976.Jun 7 2022, 3:45 PM
ayermolo marked 6 inline comments as done.

addressed comments

ayermolo edited the summary of this revision. (Show Details)Jun 7 2022, 4:45 PM
maksfb accepted this revision.Jun 8 2022, 12:21 PM

LGTM

This revision is now accepted and ready to land.Jun 8 2022, 12:21 PM
This revision was automatically updated to reflect the committed changes.
ayermolo marked an inline comment as done.