Go to the documentation of this file.
9 #ifndef LLDB_UTILITY_TIMER_H
10 #define LLDB_UTILITY_TIMER_H
13 #include "llvm/Support/Chrono.h"
27 explicit Category(
const char *category_name);
44 #if !defined(_MSC_VER)
46 __attribute__((format(printf, 3, 4)))
64 using TimePoint = std::chrono::steady_clock::time_point;
83 #define LLDB_SCOPED_TIMER() \
84 static ::lldb_private::Timer::Category _cat(LLVM_PRETTY_FUNCTION); \
85 ::lldb_private::Timer _scoped_timer(_cat, "%s", LLVM_PRETTY_FUNCTION)
86 #define LLDB_SCOPED_TIMERF(...) \
87 static ::lldb_private::Timer::Category _cat(LLVM_PRETTY_FUNCTION); \
88 ::lldb_private::Timer _scoped_timer(_cat, __VA_ARGS__)
90 #endif // LLDB_UTILITY_TIMER_H
std::atomic< uint64_t > m_nanos_total
static void SetDisplayDepth(uint32_t depth)
const Category & operator=(const Category &)=delete
void ChildDuration(TimePoint::duration dur)
std::atomic< uint64_t > m_nanos
static std::atomic< bool > g_quiet
const Timer & operator=(const Timer &)=delete
Timer(Category &category, const char *format,...) __attribute__((format(printf
Default constructor.
std::atomic< uint64_t > m_count
static void DumpCategoryTimes(Stream *s)
static void SetQuiet(bool value)
static std::atomic< unsigned > g_display_depth
std::chrono::steady_clock::time_point TimePoint
static void ResetCategoryTimes()
A class that represents a running process on the host machine.
TimePoint::duration m_child_duration
std::atomic< Category * > m_next
llvm::StringRef GetName()
Category(const char *category_name)