mirror of
https://github.com/intel/llvm.git
synced 2026-01-14 11:57:39 +08:00
[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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user