Skip to content

Commit 55ef819

Browse files
committed
[lldb] Move FindTypes scoped timer to SymbolFileDWARFDebugMap
(cherry picked from commit 3ca91ad)
1 parent 172f8fa commit 55ef819

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

lldb/source/Core/Module.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,9 @@ void Module::FindTypes(
10521052
llvm::ArrayRef<CompilerContext> pattern, LanguageSet languages,
10531053
llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
10541054
TypeMap &types) {
1055-
LLDB_SCOPED_TIMER();
1055+
// If a scoped timer is needed, place it in a SymbolFile::FindTypes override.
1056+
// A timer here is too high volume for some cases, for example when calling
1057+
// FindTypes on each object file.
10561058
if (SymbolFile *symbols = GetSymbolFile())
10571059
symbols->FindTypes(pattern, languages, searched_symbol_files, types);
10581060
}

lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,25 +1200,13 @@ void SymbolFileDWARFDebugMap::FindTypes(
12001200
llvm::ArrayRef<CompilerContext> context, LanguageSet languages,
12011201
llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
12021202
TypeMap &types) {
1203+
LLDB_SCOPED_TIMER();
12031204
ForEachSymbolFile([&](SymbolFileDWARF *oso_dwarf) -> bool {
12041205
oso_dwarf->FindTypes(context, languages, searched_symbol_files, types);
12051206
return false;
12061207
});
12071208
}
12081209

1209-
//
1210-
// uint32_t
1211-
// SymbolFileDWARFDebugMap::FindTypes (const SymbolContext& sc, const
1212-
// RegularExpression& regex, bool append, uint32_t max_matches, Type::Encoding
1213-
// encoding, lldb::user_id_t udt_uid, TypeList& types)
1214-
//{
1215-
// SymbolFileDWARF *oso_dwarf = GetSymbolFile (sc);
1216-
// if (oso_dwarf)
1217-
// return oso_dwarf->FindTypes (sc, regex, append, max_matches, encoding,
1218-
// udt_uid, types);
1219-
// return 0;
1220-
//}
1221-
12221210
CompilerDeclContext SymbolFileDWARFDebugMap::FindNamespace(
12231211
lldb_private::ConstString name,
12241212
const CompilerDeclContext &parent_decl_ctx) {

0 commit comments

Comments
 (0)