Use binary search to speedup checkUnload

Authored by Phuong Trinh <lolotp@fb.com> on Apr 1 2019, 2:05 PM.

Description

Use binary search to speedup checkUnload

We are iterating through all object code for each heap objects when
checking whether object code can be unloaded. For large projects in
GHCi, this can be very expensive due to the large number of object code
that needs to be loaded/unloaded. To speed it up, this arrangess all
mapped sections of unloaded object code in a sorted array and use binary
search to check if an address location fall on them.

(cherry picked from commit f81f3964b718eab21f0cfe65067c195f2f2a84bd)

Details

Committed
bgamariJun 12 2019, 7:40 AM
Parents
rGHC5e6f261aee19: testsuite: Mark threadstatus-T9333 as fragile in ghci way
Branches
Unknown
Tags
Unknown
References
wip/backport-MR706