Control number of threads using a runtime option
commit6ce5c63a59c4076b6c2b58ce07692d5f8225e0ba
authorRafael Auler <rafaelauler@fb.com>
Thu, 2 Aug 2018 21:24:57 +0000 (2 14:24 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Thu, 2 Aug 2018 21:27:36 +0000 (2 14:27 -0700)
tree026417afe8c124aa511f1a8008484477e6bb873f
parent929092d8daf13059e9ffcf10cd5909e7e9f10271
Control number of threads using a runtime option

Summary:
The threaded implementation of debug-parser maintains
a separate state of libdwarf/libelf for each thread. This lib
maps the full binary into memory, which can be quite large and,
depending on the number of threads and hhvm binary size, will
exhaust all available memory and crash with an allocation error.

Reviewed By: markw65

Differential Revision: D9127053

fbshipit-source-id: c25034cf8dd4e11b04c322d511221982f010fb74
hphp/tools/debug-parser/debug-parser-dwarf.cpp
hphp/tools/debug-parser/debug-parser.cpp
hphp/tools/debug-parser/debug-parser.h
hphp/tools/type-info-gens/gen-member-reflection.cpp
hphp/tools/type-info-gens/gen-type-scanners.cpp