[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:
@@ -576,9 +576,7 @@ size_t ObjectFileELF::GetModuleSpecifications(
|
||||
uint32_t core_notes_crc = 0;
|
||||
|
||||
if (!gnu_debuglink_crc) {
|
||||
static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
|
||||
lldb_private::Timer scoped_timer(
|
||||
func_cat,
|
||||
LLDB_SCOPED_TIMERF(
|
||||
"Calculating module crc32 %s with size %" PRIu64 " KiB",
|
||||
file.GetLastPathComponent().AsCString(),
|
||||
(length - file_offset) / 1024);
|
||||
|
||||
Reference in New Issue
Block a user