Author: Dave Lee Date: 2022-03-11T12:40:06-08:00 New Revision: 3ca91adef8e885d89658a540860d3cee8746b1d9
URL: https://github.com/llvm/llvm-project/commit/3ca91adef8e885d89658a540860d3cee8746b1d9 DIFF: https://github.com/llvm/llvm-project/commit/3ca91adef8e885d89658a540860d3cee8746b1d9.diff LOG: [lldb] Move FindTypes scoped timer to SymbolFileDWARFDebugMap Added: Modified: lldb/source/Core/Module.cpp lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp Removed: ################################################################################ diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp index 3efe3ad6c2f62..7d24595908cbb 100644 --- a/lldb/source/Core/Module.cpp +++ b/lldb/source/Core/Module.cpp @@ -1025,7 +1025,9 @@ void Module::FindTypes( llvm::ArrayRef<CompilerContext> pattern, LanguageSet languages, llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files, TypeMap &types) { - LLDB_SCOPED_TIMER(); + // If a scoped timer is needed, place it in a SymbolFile::FindTypes override. + // A timer here is too high volume for some cases, for example when calling + // FindTypes on each object file. if (SymbolFile *symbols = GetSymbolFile()) symbols->FindTypes(pattern, languages, searched_symbol_files, types); } diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp index 72ae44f043634..e36d8e85732b7 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp @@ -1184,25 +1184,13 @@ void SymbolFileDWARFDebugMap::FindTypes( llvm::ArrayRef<CompilerContext> context, LanguageSet languages, llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files, TypeMap &types) { + LLDB_SCOPED_TIMER(); ForEachSymbolFile([&](SymbolFileDWARF *oso_dwarf) -> bool { oso_dwarf->FindTypes(context, languages, searched_symbol_files, types); return false; }); } -// -// uint32_t -// SymbolFileDWARFDebugMap::FindTypes (const SymbolContext& sc, const -// RegularExpression& regex, bool append, uint32_t max_matches, Type::Encoding -// encoding, lldb::user_id_t udt_uid, TypeList& types) -//{ -// SymbolFileDWARF *oso_dwarf = GetSymbolFile (sc); -// if (oso_dwarf) -// return oso_dwarf->FindTypes (sc, regex, append, max_matches, encoding, -// udt_uid, types); -// return 0; -//} - CompilerDeclContext SymbolFileDWARFDebugMap::FindNamespace( lldb_private::ConstString name, const CompilerDeclContext &parent_decl_ctx) { _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits