#include "lldb/Utility/Timer.h"
#include "lldb/Utility/Stream.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/Signposts.h"
#include <algorithm>
#include <map>
#include <mutex>
#include <utility>
#include <vector>
#include <cassert>
#include <cinttypes>
#include <cstdarg>
#include <cstdio>
usingnamespacelldb_private;
#define TIMER_INDENT_AMOUNT …
namespace {
TimerStack;
static std::atomic<Timer::Category *> g_categories;
}
static llvm::ManagedStatic<llvm::SignpostEmitter> Signposts;
std::atomic<bool> Timer::g_quiet(true);
std::atomic<unsigned> Timer::g_display_depth(0);
static std::mutex &GetFileMutex() { … }
static TimerStack &GetTimerStackForCurrentThread() { … }
Timer::Category::Category(const char *cat) : … { … }
void Timer::SetQuiet(bool value) { … }
Timer::Timer(Timer::Category &category, const char *format, ...)
: … { … }
Timer::~Timer() { … }
void Timer::SetDisplayDepth(uint32_t depth) { … }
namespace {
struct Stats { … };
}
static bool CategoryMapIteratorSortCriterion(const Stats &lhs,
const Stats &rhs) { … }
void Timer::ResetCategoryTimes() { … }
void Timer::DumpCategoryTimes(Stream &s) { … }