[Lldb-commits] [PATCH] D78337: [lldb/Host] Remove TaskPool and replace its uses with llvm::ThreadPool

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Apr 17 02:40:25 PDT 2020


labath added inline comments.


================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp:24-30
+static void TaskMapOverInt(size_t end,
+                           const llvm::function_ref<void(size_t)> &func) {
+  llvm::ThreadPool pool;
+  for (size_t i = 0; i < end; i++)
+    pool.async(func, i);
+  pool.wait();
+}
----------------
labath wrote:
> This *is* simpler than the previous implementation, but it may have different performance characteristics. The previous implementation was optimized for small workloads where the overhead of enqueuing a task was not negligible compared to the size of the job itself.
(I'm not saying this should be changed back. llvm's thread pool creates threads differently, and that is likely to have been the main cause of overhead, so this optimization may not matter anymore. However, it would be good to verify that.)


Repository:
  rLLDB LLDB

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78337/new/

https://reviews.llvm.org/D78337





More information about the lldb-commits mailing list