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);
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__)
A stream class that can stream formatted output to a file.
Category(const Category &)=delete
std::atomic< Category * > m_next
std::atomic< uint64_t > m_nanos
std::atomic< uint64_t > m_nanos_total
const Category & operator=(const Category &)=delete
llvm::StringRef GetName()
std::atomic< uint64_t > m_count
A timer class that simplifies common timing metrics.
static void ResetCategoryTimes()
const Timer & operator=(const Timer &)=delete
Timer(const Timer &)=delete
static std::atomic< bool > g_quiet
TimePoint::duration m_child_duration
static std::atomic< unsigned > g_display_depth
static void SetQuiet(bool value)
static void SetDisplayDepth(uint32_t depth)
std::chrono::steady_clock::time_point TimePoint
void ChildDuration(TimePoint::duration dur)
static void DumpCategoryTimes(Stream &s)
A class that represents a running process on the host machine.