[all-commits] [llvm/llvm-project] 15de77: [lldb] (Prepare to) speed up dwarf indexing (#118657)

Pavel Labath via All-commits all-commits at lists.llvm.org
Thu Dec 5 01:38:51 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 15de77db91c199f9431e81d0b85bb6984d1c5296
      https://github.com/llvm/llvm-project/commit/15de77db91c199f9431e81d0b85bb6984d1c5296
  Author: Pavel Labath <pavel at labath.sk>
  Date:   2024-12-05 (Thu, 05 Dec 2024)

  Changed paths:
    M lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp

  Log Message:
  -----------
  [lldb] (Prepare to) speed up dwarf indexing (#118657)

Indexing a single DWARF unit is a fairly small task, which means the
overhead of enqueueing a task for each unit is not negligible (mainly
because introduces a lot of synchronization points for queue management,
memory allocation etc.). This is particularly true if the binary was
built with type units, as these are usually very small.

This essentially brings us back to the state before
https://reviews.llvm.org/D78337, but the new implementation is built on
the llvm ThreadPool, and I've added a small improvement -- we now
construct one "index set" per thread instead of one per unit, which
should lower the memory usage (fewer small allocations) and make the
subsequent merge step faster.

On its own this patch doesn't actually change the performance
characteristics because we still have one choke point -- progress
reporting. I'm leaving that for a separate patch, but I've tried that
simply removing the progress reporting gives us about a 30-60% speed
boost.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list