mirror of
https://github.com/intel/llvm.git
synced 2026-01-19 09:31:59 +08:00
[lldb] Abstract scoped timer logic behind LLDB_SCOPED_TIMER (NFC)
This patch introduces a LLDB_SCOPED_TIMER macro to hide the needlessly repetitive creation of scoped timers in LLDB. It's similar to the LLDB_LOG(F) macro. Differential revision: https://reviews.llvm.org/D93663
This commit is contained in:
@@ -2161,8 +2161,7 @@ ParseNList(DataExtractor &nlist_data, lldb::offset_t &nlist_data_offset,
|
||||
enum { DebugSymbols = true, NonDebugSymbols = false };
|
||||
|
||||
size_t ObjectFileMachO::ParseSymtab() {
|
||||
static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
|
||||
Timer scoped_timer(func_cat, "ObjectFileMachO::ParseSymtab () module = %s",
|
||||
LLDB_SCOPED_TIMERF("ObjectFileMachO::ParseSymtab () module = %s",
|
||||
m_file.GetFilename().AsCString(""));
|
||||
ModuleSP module_sp(GetModule());
|
||||
if (!module_sp)
|
||||
|
||||
Reference in New Issue
Block a user