Cache uwnind frame headers as they are found.
authorSterling Augustine <saugustine@google.com>
Tue, 10 Mar 2020 19:03:24 +0000 (12:03 -0700)
committerSterling Augustine <saugustine@google.com>
Thu, 12 Mar 2020 17:53:33 +0000 (10:53 -0700)
commitc53c2058ffb8ff877702bb2dded31c85c1dfe66d
treeff3a8c3d5c015dfb4ab0ff86e4b1c3da4c3db8f2
parent30804d0a3fb23325c4b455108e59d00213b83891
Cache uwnind frame headers as they are found.

Summary:
This improves unwind performance quite substantially, and follows
a somewhat similar approach used in libgcc_s as described in the
thread here:

https://gcc.gnu.org/ml/gcc/2005-02/msg00625.html

On certain extremely exception heavy internal tests, the time
drops from about 80 minutes to about five minutes.

Subscribers: libcxx-commits

Tags: #libc

Differential Revision: https://reviews.llvm.org/D75954
libunwind/src/AddressSpace.hpp
libunwind/src/FrameHeaderCache.hpp [new file with mode: 0644]
libunwind/test/frameheadercache_test.pass.cpp [new file with mode: 0644]