[all-commits] [llvm/llvm-project] c274b6: Defer source path remap tilde expansion until sour...

Jason Molenda via All-commits all-commits at lists.llvm.org
Thu May 26 00:37:23 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c274b6e5830ea88d3f55d6dc1d2b99e38cf6595e
      https://github.com/llvm/llvm-project/commit/c274b6e5830ea88d3f55d6dc1d2b99e38cf6595e
  Author: Jason Molenda <jason at molenda.com>
  Date:   2022-05-26 (Thu, 26 May 2022)

  Changed paths:
    M lldb/source/Core/SourceManager.cpp
    M lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp

  Log Message:
  -----------
  Defer source path remap tilde expansion until source file use

When reading source path remappings out of a dSYM, lldb currently
does tilde expansion -- expanding the tilde-username and checking
that the destination pathname exists, for each dSYM with the path
remappings.  This cost happens during lldb's initial process launch
/ load, an especially perf-sensitive time.  Inside Apple, we have
dSYMs with source path remappings pointing to NFS directories where
these extra stats for every dSYM can be very expensive if the network
is slow.

This patch instead keeps the source path mapping in the original
tilde-username terms and does the tilde expansion when we need
to read a specific source file from one of the modules.  We'll
be stat'ing all of those inodes to load the source file anyway,
so the fact that we do the tilde expansion on every source file
we load, it doesn't cost us significantly.

Differential Revision: https://reviews.llvm.org/D126435
rdar://77091379




More information about the All-commits mailing list