#include "llvm/Support/TimeProfiler.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/STLFunctionalExtras.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/Support/JSON.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/Threading.h"
#include <algorithm>
#include <cassert>
#include <chrono>
#include <memory>
#include <mutex>
#include <string>
#include <vector>
usingnamespacellvm;
namespace {
duration;
duration_cast;
microseconds;
steady_clock;
system_clock;
time_point;
time_point_cast;
struct TimeTraceProfilerInstances { … };
TimeTraceProfilerInstances &getTimeTraceProfilerInstances() { … }
}
static LLVM_THREAD_LOCAL TimeTraceProfiler *TimeTraceProfilerInstance = …;
TimeTraceProfiler *llvm::getTimeTraceProfilerInstance() { … }
namespace {
ClockType;
TimePointType;
DurationType;
CountAndDurationType;
NameAndCountAndDurationType;
}
struct llvm::TimeTraceProfilerEntry { … };
struct llvm::TimeTraceProfiler { … };
bool llvm::isTimeTraceVerbose() { … }
void llvm::timeTraceProfilerInitialize(unsigned TimeTraceGranularity,
StringRef ProcName,
bool TimeTraceVerbose) { … }
void llvm::timeTraceProfilerCleanup() { … }
void llvm::timeTraceProfilerFinishThread() { … }
void llvm::timeTraceProfilerWrite(raw_pwrite_stream &OS) { … }
Error llvm::timeTraceProfilerWrite(StringRef PreferredFileName,
StringRef FallbackFileName) { … }
TimeTraceProfilerEntry *llvm::timeTraceProfilerBegin(StringRef Name,
StringRef Detail) { … }
TimeTraceProfilerEntry *
llvm::timeTraceProfilerBegin(StringRef Name,
llvm::function_ref<std::string()> Detail) { … }
TimeTraceProfilerEntry *
llvm::timeTraceProfilerBegin(StringRef Name,
llvm::function_ref<TimeTraceMetadata()> Metadata) { … }
TimeTraceProfilerEntry *llvm::timeTraceAsyncProfilerBegin(StringRef Name,
StringRef Detail) { … }
void llvm::timeTraceProfilerEnd() { … }
void llvm::timeTraceProfilerEnd(TimeTraceProfilerEntry *E) { … }