This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Don't sort map file entries by name
ClosedPublic

Authored by int3 on Oct 22 2022, 12:55 PM.

Details

Reviewers
thakis
Group Reviewers
Restricted Project
Commits
rG39917b5e0174: [lld-macho] Don't sort map file entries by name
Summary

ld64 emits them in address order but not in alphabetical order. This
sorting is particularly expensive for dead-stripped symbols (which don't
need to be sorted at all, unlike live symbols that need to be sorted by
address).

Timings for chromium_framework_less_dwarf (with the -map flag added to
the response file) on my 16-core Mac Pro:

           base           diff           difference (95% CI)
sys_time   1.997 ± 0.038  2.004 ± 0.028  [  -0.6% ..   +1.3%]
user_time  8.698 ± 0.085  8.167 ± 0.070  [  -6.6% ..   -5.6%]
wall_time  7.965 ± 0.114  7.715 ± 0.347  [  -5.1% ..   -1.2%]
samples    25             23

Diff Detail

Event Timeline

int3 created this revision.Oct 22 2022, 12:55 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptOct 22 2022, 12:55 PM
int3 requested review of this revision.Oct 22 2022, 12:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 22 2022, 12:55 PM
thakis added a subscriber: thakis.Oct 24 2022, 6:04 AM

Test failure on windows on presubmit testing looks like it might be real.

int3 updated this revision to Diff 470177.Oct 24 2022, 9:04 AM

update test

This revision is now accepted and ready to land.Oct 25 2022, 5:49 AM
This revision was automatically updated to reflect the committed changes.