Skip to content

Commit ece234d

Browse files
authored
[lldb] Remove timer from Module::GetNumCompileUnits (#5689)
`GetNumCompileUnits` has fast execution, and is high firing. Fast and frequent functions are not good candidates for timers. In a recent profile, `GetNumCompileUnits` was called >>10k times with an average duration of 1 microsecond. Differential Revision: https://reviews.llvm.org/D138878 (cherry picked from commit e2a10d8)
1 parent c11f7ff commit ece234d

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

lldb/source/Core/Module.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,8 +423,6 @@ void Module::DumpSymbolContext(Stream *s) {
423423

424424
size_t Module::GetNumCompileUnits() {
425425
std::lock_guard<std::recursive_mutex> guard(m_mutex);
426-
LLDB_SCOPED_TIMERF("Module::GetNumCompileUnits (module = %p)",
427-
static_cast<void *>(this));
428426
if (SymbolFile *symbols = GetSymbolFile())
429427
return symbols->GetNumCompileUnits();
430428
return 0;

0 commit comments

Comments
 (0)