Page MenuHomePhabricator

[debugserver]Add platform cache support to improve performance.Under BigSur 11.3 this function causes a performance loss of 0.68s per execution.
ClosedPublic

Authored by kuperxu on May 20 2021, 2:30 AM.

Diff Detail

Event Timeline

kuperxu requested review of this revision.May 20 2021, 2:30 AM
kuperxu created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptMay 20 2021, 2:30 AM
kuperxu updated this revision to Diff 346671.May 20 2021, 2:36 AM

[debugserver]Recalculate the platform cache each time the port is cleared.

The main reason for the problem is that dyld has modified the _dyld_process_info_create function implementation, which has increased the function's time consumption significantly and caused a huge delay in attaching the program.

Currently the main time consuming performance is when loading the executable. In the MachProcess::GetMachOInformationFromMemory function if the executable has 100 load_command, then the function _dyld_process_info_create will be executed 100 times

This revision is now accepted and ready to land.May 20 2021, 10:10 AM

Please let me know if you want me to land this for you.

jasonmolenda accepted this revision.May 20 2021, 10:22 AM

LGTM, thanks for doing this.

I don't have permission to commit, please land this code.
Thank you @JDevlieghere

This revision was landed with ongoing or failed builds.May 20 2021, 7:11 PM
This revision was automatically updated to reflect the committed changes.