[Lldb-commits] [lldb] e2a10d8 - [lldb] Remove timer from Module::GetNumCompileUnits
Dave Lee via lldb-commits
lldb-commits at lists.llvm.org
Thu Dec 1 09:42:03 PST 2022
Author: Dave Lee
Date: 2022-12-01T09:41:51-08:00
New Revision: e2a10d8ca34a3554d8d19d2bbdd3133970e4d09b
URL: https://github.com/llvm/llvm-project/commit/e2a10d8ca34a3554d8d19d2bbdd3133970e4d09b
DIFF: https://github.com/llvm/llvm-project/commit/e2a10d8ca34a3554d8d19d2bbdd3133970e4d09b.diff
LOG: [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
Added:
Modified:
lldb/source/Core/Module.cpp
Removed:
################################################################################
diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp
index b1cc0dd58211d..dd2569eb81f8e 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<std::recursive_mutex> guard(m_mutex);
- LLDB_SCOPED_TIMERF("Module::GetNumCompileUnits (module = %p)",
- static_cast<void *>(this));
if (SymbolFile *symbols = GetSymbolFile())
return symbols->GetNumCompileUnits();
return 0;
More information about the lldb-commits
mailing list