summaryrefslogtreecommitdiff
path: root/lldb/source/Core/Module.cpp
diff options
context:
space:
mode:
authorDave Lee <davelee.com@gmail.com>2022-11-28 16:15:41 -0800
committerDave Lee <davelee.com@gmail.com>2022-12-01 09:41:51 -0800
commite2a10d8ca34a3554d8d19d2bbdd3133970e4d09b (patch)
tree34941e6f0aaece88a02aefea6cb26dbb79bad689 /lldb/source/Core/Module.cpp
parentef10f81985f665c553c818e1c5962aebb8f36f0c (diff)
[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
Diffstat (limited to 'lldb/source/Core/Module.cpp')
-rw-r--r--lldb/source/Core/Module.cpp2
1 files changed, 0 insertions, 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<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;