I recently ran into a shared object that had a reasonably large number
of absolute symbols. Parsing all the symbols in the shared object took an
unusually long amount of time, so I looked into it and found that when we
created fake sections for these symbols, we would add them to the module's
section list without inserting it into the cache (section_name_to_section).
While this works, in some cases we perform a lookup of the section in that cache
almost right after we create it and put in the module section list.
Given I had a large amount of symbols that triggered this code path, performance
was abysmal. This change greatly improved performance there.
Details
Details
- Reviewers
sas zturner • espindola labath
Diff Detail
Diff Detail
- Build Status
Buildable 12788 Build 12788: arc lint + arc unit
Event Timeline
Comment Actions
This could be tested by using lldb-test to dump the section cache and running FileCheck on it to make sure that all expected sections are cached.
Comment Actions
Looks fine to me, but a test would be nice as Zach suggested. I am guessing before we made way too many sections. Should be easy to conjure up a test and verify the same sections is used.