diff options
| author | Levon Ter-Grigoryan <patriosthegreat@protonmail.ch> | 2020-01-14 14:33:43 +0100 |
|---|---|---|
| committer | Pavel Labath <pavel@labath.sk> | 2020-01-14 14:59:56 +0100 |
| commit | a705cf1acbe94498f7fcca4e89be6d4820271227 (patch) | |
| tree | 03ae4c768dbec25047a93ef5cee613c7bf8a2f81 /lldb/source | |
| parent | 77cc690bae310f4cba0a34f2da8a37a7c9a10a82 (diff) | |
| download | bcm5719-llvm-a705cf1acbe94498f7fcca4e89be6d4820271227.tar.gz bcm5719-llvm-a705cf1acbe94498f7fcca4e89be6d4820271227.zip | |
Expression eval lookup speedup by not returning methods in ManualDWARFIndex::GetFunctions
Summary:
This change is connected with
https://reviews.llvm.org/D69843
In large codebases, we sometimes see Module::FindFunctions (when called from
ClangExpressionDeclMap::FindExternalVisibleDecls) returning huge amounts of
functions.
In current fix I trying to return only function_fullnames from ManualDWARFIndex::GetFunctions when eFunctionNameTypeFull is passed as argument.
Reviewers: labath, jarin, aprantl
Reviewed By: labath
Subscribers: shafik, clayborg, teemperor, arphaman, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D70846
Diffstat (limited to 'lldb/source')
| -rw-r--r-- | lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp | 6 | ||||
| -rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp index a302a73cafc..bf3023be5f6 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp @@ -1254,9 +1254,9 @@ void ClangExpressionDeclMap::LookupFunction(NameSearchContext &context, // TODO Fix FindFunctions so that it doesn't return // instance methods for eFunctionNameTypeBase. - target->GetImages().FindFunctions(name, eFunctionNameTypeFull, - include_symbols, include_inlines, - sc_list); + target->GetImages().FindFunctions( + name, eFunctionNameTypeFull | eFunctionNameTypeBase, include_symbols, + include_inlines, sc_list); } // If we found more than one function, see if we can use the frame's decl diff --git a/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp b/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp index aff8b5d8c15..1e5927bd14f 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp @@ -401,8 +401,6 @@ void ManualDWARFIndex::GetFunctions(ConstString name, SymbolFileDWARF &dwarf, if (name_type_mask & eFunctionNameTypeFull) { DIEArray offsets; - m_set.function_basenames.Find(name, offsets); - m_set.function_methods.Find(name, offsets); m_set.function_fullnames.Find(name, offsets); for (const DIERef &die_ref: offsets) { DWARFDIE die = dwarf.GetDIE(die_ref); |

