Use binary search to speedup checkUnload
authorPhuong Trinh <lolotp@fb.com>
Mon, 1 Apr 2019 19:05:47 +0000 (20:05 +0100)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Thu, 30 May 2019 20:43:31 +0000 (16:43 -0400)
commitf81f3964b718eab21f0cfe65067c195f2f2a84bd
treeb14805c7ea1882f711de92e77fc08e6d6339c205
parent4ad37a323b9cdb830d718dec08c2960e34410a43
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.
rts/CheckUnload.c
testsuite/tests/rts/linker/unload_multiple_objs/A.hs [new file with mode: 0644]
testsuite/tests/rts/linker/unload_multiple_objs/B.hs [new file with mode: 0644]
testsuite/tests/rts/linker/unload_multiple_objs/C.hs [new file with mode: 0644]
testsuite/tests/rts/linker/unload_multiple_objs/D.hs [new file with mode: 0644]
testsuite/tests/rts/linker/unload_multiple_objs/Makefile [new file with mode: 0644]
testsuite/tests/rts/linker/unload_multiple_objs/all.T [new file with mode: 0644]
testsuite/tests/rts/linker/unload_multiple_objs/linker_unload_multiple_objs.c [new file with mode: 0644]
testsuite/tests/rts/linker/unload_multiple_objs/linker_unload_multiple_objs.stdout [new file with mode: 0644]