Skip to content

Commit f8fcf6b

Browse files
committed
[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) (cherry picked from commit ece234d)
1 parent 5ba0025 commit f8fcf6b

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
@@ -419,8 +419,6 @@ void Module::DumpSymbolContext(Stream *s) {
419419

420420
size_t Module::GetNumCompileUnits() {
421421
std::lock_guard<std::recursive_mutex> guard(m_mutex);
422-
LLDB_SCOPED_TIMERF("Module::GetNumCompileUnits (module = %p)",
423-
static_cast<void *>(this));
424422
if (SymbolFile *symbols = GetSymbolFile())
425423
return symbols->GetNumCompileUnits();
426424
return 0;

0 commit comments

Comments
 (0)