llvm-project/libunwind
Ryan Prichard 881aba7071 [libunwind] Optimize dl_iterate_phdr's findUnwindSectionsByPhdr
Currently, findUnwindSectionsByPhdr is slightly micro-optimized for the
case where the first callback has the target address, and is otherwise
very inefficient -- it decodes .eh_frame_hdr even when no PT_LOAD
matches the PC. (If the FrameHeaderCache is enabled, then the
micro-optimization only helps the first time unwind info is looked up.)

Instead, it makes more sense to optimize for the case where the
callback *doesn't* find the target address, so search for a PT_LOAD
segment first, and only look for the unwind info section if a matching
PT_LOAD is found.

This change helps on an Android benchmark with 100 shared objects,
where the DSO at the end of the dl_iterate_phdr list throws 10000
exceptions. Assuming the frame cache is disabled, this change cuts
about 30-40% off the benchmark's runtime.

Reviewed By: compnerd, saugustine, #libunwind

Differential Revision: https://reviews.llvm.org/D87881
2020-09-23 15:40:39 -07:00
..
cmake [libcxx][libcxxabi][libunwind] Use libgcc on Android 2020-04-30 15:42:32 -07:00
docs Bump the trunk major version to 12 2020-07-15 12:05:05 +02:00
include [libunwind] Ensure enough alignment for unw_cursor_t for SEH build configurations 2020-08-22 22:48:57 +03:00
src [libunwind] Optimize dl_iterate_phdr's findUnwindSectionsByPhdr 2020-09-23 15:40:39 -07:00
test [libunwind] Combine dl_iterate_phdr codepaths for DWARF and EHABI 2020-09-23 15:40:39 -07:00
.clang-format
CMakeLists.txt [cmake] Centralize LLVM_ENABLE_WARNINGS option 2020-09-21 10:23:17 -07:00
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00