Skip to content

Commit 3ca91ad

Browse files
committed
[lldb] Move FindTypes scoped timer to SymbolFileDWARFDebugMap
1 parent a6eeffa commit 3ca91ad

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
@@ -1025,7 +1025,9 @@ void Module::FindTypes(
10251025
llvm::ArrayRef<CompilerContext> pattern, LanguageSet languages,
10261026
llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
10271027
TypeMap &types) {
1028-
LLDB_SCOPED_TIMER();
1028+
// If a scoped timer is needed, place it in a SymbolFile::FindTypes override.
1029+
// A timer here is too high volume for some cases, for example when calling
1030+
// FindTypes on each object file.
10291031
if (SymbolFile *symbols = GetSymbolFile())
10301032
symbols->FindTypes(pattern, languages, searched_symbol_files, types);
10311033
}

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

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1184,25 +1184,13 @@ void SymbolFileDWARFDebugMap::FindTypes(
11841184
llvm::ArrayRef<CompilerContext> context, LanguageSet languages,
11851185
llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
11861186
TypeMap &types) {
1187+
LLDB_SCOPED_TIMER();
11871188
ForEachSymbolFile([&](SymbolFileDWARF *oso_dwarf) -> bool {
11881189
oso_dwarf->FindTypes(context, languages, searched_symbol_files, types);
11891190
return false;
11901191
});
11911192
}
11921193

1193-
//
1194-
// uint32_t
1195-
// SymbolFileDWARFDebugMap::FindTypes (const SymbolContext& sc, const
1196-
// RegularExpression& regex, bool append, uint32_t max_matches, Type::Encoding
1197-
// encoding, lldb::user_id_t udt_uid, TypeList& types)
1198-
//{
1199-
// SymbolFileDWARF *oso_dwarf = GetSymbolFile (sc);
1200-
// if (oso_dwarf)
1201-
// return oso_dwarf->FindTypes (sc, regex, append, max_matches, encoding,
1202-
// udt_uid, types);
1203-
// return 0;
1204-
//}
1205-
12061194
CompilerDeclContext SymbolFileDWARFDebugMap::FindNamespace(
12071195
lldb_private::ConstString name,
12081196
const CompilerDeclContext &parent_decl_ctx) {

0 commit comments

Comments
 (0)