From e2a10d8ca34a3554d8d19d2bbdd3133970e4d09b Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Mon, 28 Nov 2022 16:15:41 -0800 Subject: [PATCH] [lldb] Remove timer from Module::GetNumCompileUnits `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 --- lldb/source/Core/Module.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp index b1cc0dd58211..dd2569eb81f8 100644 --- a/lldb/source/Core/Module.cpp +++ b/lldb/source/Core/Module.cpp @@ -419,8 +419,6 @@ void Module::DumpSymbolContext(Stream *s) { size_t Module::GetNumCompileUnits() { std::lock_guard guard(m_mutex); - LLDB_SCOPED_TIMERF("Module::GetNumCompileUnits (module = %p)", - static_cast(this)); if (SymbolFile *symbols = GetSymbolFile()) return symbols->GetNumCompileUnits(); return 0;