[Lldb-commits] [lldb] [lldb][SymbolFileDWARF] Don't search for DWP files on macOS (PR #139554)
via lldb-commits
lldb-commits at lists.llvm.org
Mon May 12 07:36:37 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Michael Buch (Michael137)
<details>
<summary>Changes</summary>
A contrived performance measurement on my local machine:
1. Attach LLDB to LLDB
2. Measure how much time it takes to run `b operator[]`
Without this patch, we would spend a total of 400ms (which was ~4-5% of total execution) looking for DWP files (and failing to find them because they are not a concept on macOS).
We call into `GetDwpSymbolFile` via `DebugNamesDWARFIndex::GetFunctions -> ManualDWARFIndex::GetFunctions -> ManualDWARFIndex::Index`.
rdar://148212738
---
Full diff: https://github.com/llvm/llvm-project/pull/139554.diff
1 Files Affected:
- (modified) lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (+3)
``````````diff
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 907d63eb51afe..3f53e562ba65b 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -4211,6 +4211,9 @@ SymbolFileDWARFDebugMap *SymbolFileDWARF::GetDebugMapSymfile() {
const std::shared_ptr<SymbolFileDWARFDwo> &SymbolFileDWARF::GetDwpSymbolFile() {
llvm::call_once(m_dwp_symfile_once_flag, [this]() {
+ if (m_objfile_sp->GetArchitecture().GetTriple().isAppleMachO())
+ return;
+
// Create a list of files to try and append .dwp to.
FileSpecList symfiles;
// Append the module's object file path.
``````````
</details>
https://github.com/llvm/llvm-project/pull/139554
More information about the lldb-commits
mailing list