[all-commits] [llvm/llvm-project] b7d807: [lldb] parallelize calling of Module::PreloadSymbo...

Luboš Luňák via All-commits all-commits at lists.llvm.org
Wed May 4 11:00:15 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b7d807dbcff0d9df466e0312b4fef57178d207be
  Author: Luboš Luňák <l.lunak at centrum.cz>
  Date:   2022-05-04 (Wed, 04 May 2022)

  Changed paths:
    M lldb/source/Target/Target.cpp

  Log Message:
  [lldb] parallelize calling of Module::PreloadSymbols()

If LLDB index cache is enabled and everything is cached, then loading of debug
info is essentially single-threaded, because it's done from PreloadSymbols()
called from GetOrCreateModule(), which is called from a loop calling
LoadModuleAtAddress() in DynamicLoaderPOSIXDYLD. Parallelizing the entire
loop could be unsafe because of GetOrCreateModule() operating on a module
list, so instead move only the PreloadSymbols() call to Target::ModulesDidLoad()
and parallelize there, which should be safe.

This may greatly reduce the load time if the debugged program uses a large
number of binaries (as opposed to monolithic programs where this presumably
doesn't make a difference). In my specific case of LibreOffice Calc this reduces
startup time from 6s to 2s.

Differential Revision: https://reviews.llvm.org/D122975

More information about the All-commits mailing list