reduce consumed stack size in symbolizer
authorPhilip Pronin <philipp@fb.com>
Sun, 26 Feb 2017 23:30:35 +0000 (15:30 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sun, 26 Feb 2017 23:34:54 +0000 (15:34 -0800)
commit3ba178b5e9e4de4d4540d6010d139fe4c86d6c19
treefedcf89fe7b4b6f112b0321109436017b64559db
parentba35fe5ddc1c75ad16195763ecf126eaa8a78f18
reduce consumed stack size in symbolizer

Summary:
It currently takes ~32kB of stack trace to run symbolizer, which is
very close to ASan alt stack size (32 kB).

If we exclude `demangle` (which can use unbound stack size in extreme cases),
the heaviest path in symbolizer includes `FrameArray<100>` and three arrays of
`PATH_MAX` (4 kB) size.  This diff removes the former and one of the latters,
reducing this code path from 32 kB to ~10 kB.

Reviewed By: ot, yfeldblum

Differential Revision: D4618467

fbshipit-source-id: e6a53b61b3d5f6e8b892216d2e9b839ed8430d0e
folly/experimental/symbolizer/ElfCache.cpp
folly/experimental/symbolizer/ElfCache.h
folly/experimental/symbolizer/Symbolizer.cpp
folly/experimental/symbolizer/Symbolizer.h