[Lldb-commits] [PATCH] D70846: Expression eval lookup speedup by not returning methods in ManualDWARFIndex::GetFunctions
Levon Ter-Grigoryan via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Nov 29 03:19:04 PST 2019
PatriosTheGreat created this revision.
PatriosTheGreat added reviewers: labath, jarin, aprantl.
PatriosTheGreat added a project: LLDB.
Herald added a subscriber: arphaman.
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.
I run check-lldb on this changes on linux machine and it seems like there are no additional failing tests compared with master. It seems a bit weird that there are no other places in code were it is expected that eFunctionNameTypeFull on GetFunctions will return fullnames + basenames + function_methods.
Is there any additional tests which I can run to be sure that I didn't break anything?
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D70846
Files:
lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
Index: lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
===================================================================
--- lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
@@ -401,8 +401,6 @@
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);
Index: lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
===================================================================
--- lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
+++ lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
@@ -1210,7 +1210,7 @@
// TODO Fix FindFunctions so that it doesn't return
// instance methods for eFunctionNameTypeBase.
- target->GetImages().FindFunctions(name, eFunctionNameTypeFull,
+ target->GetImages().FindFunctions(name, eFunctionNameTypeFull | eFunctionNameTypeBase,
include_symbols, include_inlines,
sc_list);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70846.231501.patch
Type: text/x-patch
Size: 1306 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191129/a85d0021/attachment-0001.bin>
More information about the lldb-commits
mailing list