Cache open ELF files in Symbolizer
authorTudor Bosman <tudorb@fb.com>
Thu, 6 Feb 2014 04:13:40 +0000 (20:13 -0800)
committerSara Golemon <sgolemon@fb.com>
Fri, 7 Feb 2014 18:20:25 +0000 (10:20 -0800)
commit7224b63e71e383e8ae78d2e118fbb0a13864eaee
tree28f2f9054593b96a84e5e8a61329be704b474a72
parentbac28da15f8144f5d43773fb892a701e3f058ad4
Cache open ELF files in Symbolizer

Summary:
Rather than opening and closing Elf files every time we symbolize them, we open
the first time and cache.

We're using two caches: one for the signal handler (fixed size, slow, but
async-signal-safe) and one for exception tracing and general use.

Also, unrelated, removed two useless frames from the stack trace dump in the
signal handler.

Test Plan: tests added

Reviewed By: lucian@fb.com

FB internal diff: D1161444
folly/experimental/symbolizer/ElfCache.cpp [new file with mode: 0644]
folly/experimental/symbolizer/ElfCache.h [new file with mode: 0644]
folly/experimental/symbolizer/SignalHandler.cpp
folly/experimental/symbolizer/Symbolizer.cpp
folly/experimental/symbolizer/Symbolizer.h
folly/experimental/symbolizer/test/SymbolizerTest.cpp