[Lldb-commits] [PATCH] D13662: Make dwarf parsing multi-threaded
Tamas Berghammer via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 12 12:56:23 PDT 2015
tberghammer added a comment.
It is depending on the implementation of std::async what AFAIK isn't defined by the standard, but I would expect that a decent stl implementation will create a reasonable number of threads (in some sense).
While developing/testing the code (with ~3000 CU in a SymbolFile) I seen that the number of running threads (not blocked in a mutex) was around the number of cores I have (on Linux x86_64 with libstdc++). It was ~60 threads after fixing the mutex in ConstString (http://reviews.llvm.org/D13652) and ~500 before on a 40 core machine but considering that thread creation isn't expensive on Linux we don't have to worry about too much thread if they are blocked anyway (thread creation wasn't significant on the profiling output).
I can create manual thread pool (or write a general thread pool class) but I think we can rely on the standard library until it is proven that it isn't working as we expect.
More information about the lldb-commits