|
LLDB mainline
|
A timer class that simplifies common timing metrics. More...
#include "lldb/Utility/Timer.h"
Classes | |
| class | Category |
Public Member Functions | |
| Timer (Category &category, const char *format,...) __attribute__((format(printf | |
| Default constructor. | |
| ~Timer () | |
| Destructor. | |
| void | Dump () |
Static Public Member Functions | |
| static void | SetDisplayDepth (uint32_t depth) |
| static void | SetQuiet (bool value) |
| static void | DumpCategoryTimes (Stream &s) |
| static void | ResetCategoryTimes () |
Protected Types | |
| using | TimePoint = std::chrono::steady_clock::time_point |
Protected Member Functions | |
| void | ChildDuration (TimePoint::duration dur) |
Protected Attributes | |
| Category & | m_category |
| TimePoint | m_total_start |
| TimePoint::duration | m_child_duration {0} |
Static Protected Attributes | |
| static std::atomic< bool > | g_quiet |
| static std::atomic< unsigned > | g_display_depth |
Private Member Functions | |
| Timer (const Timer &)=delete | |
| const Timer & | operator= (const Timer &)=delete |
|
protected |
| Timer::Timer | ( | Timer::Category & | category, |
| const char * | format, | ||
| ... ) |
Default constructor.
Definition at line 60 of file Timer.cpp.
References g_display_depth, g_quiet, GetTimerStackForCurrentThread(), m_category, m_total_start, and Signposts.
Referenced by operator=(), and Timer().
| Timer::~Timer | ( | ) |
Destructor.
Definition at line 82 of file Timer.cpp.
References g_display_depth, g_quiet, GetFileMutex(), GetTimerStackForCurrentThread(), m_category, m_child_duration, m_total_start, Signposts, and TIMER_INDENT_AMOUNT.
|
inlineprotected |
Definition at line 65 of file Timer.h.
References m_child_duration.
| void lldb_private::Timer::Dump | ( | ) |
|
static |
Definition at line 138 of file Timer.cpp.
References CategoryMapIteratorSortCriterion(), g_categories, and lldb_private::Stream::Printf().
Referenced by CommandObjectLogTimerDisable::DoExecute(), and CommandObjectLogTimerDump::DoExecute().
|
static |
Definition at line 130 of file Timer.cpp.
References g_categories.
Referenced by CommandObjectLogTimerReset::DoExecute().
|
static |
Definition at line 111 of file Timer.cpp.
References g_display_depth.
Referenced by CommandObjectLogTimerDisable::DoExecute(), and CommandObjectLogTimerEnable::DoExecute().
|
static |
Definition at line 58 of file Timer.cpp.
References g_quiet.
Referenced by CommandObjectLogTimerIncrement::DoExecute().
|
staticprotected |
Definition at line 72 of file Timer.h.
Referenced by SetDisplayDepth(), Timer(), and ~Timer().
|
staticprotected |
Definition at line 71 of file Timer.h.
Referenced by SetQuiet(), Timer(), and ~Timer().
|
protected |
|
protected |
Definition at line 69 of file Timer.h.
Referenced by ChildDuration(), and ~Timer().
|
protected |