76#ifndef LLVM_SUPPORT_TIMEPROFILER_H
77#define LLVM_SUPPORT_TIMEPROFILER_H
116struct TimeTraceProfiler;
121struct TimeTraceProfilerEntry;
131 unsigned TimeTraceGranularity, StringRef ProcName,
132 bool TimeTraceVerbose =
false,
157 StringRef FallbackFileName);
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
Represent a constant reference to a string, i.e.
TimeTraceScope(StringRef Name, StringRef Detail)
TimeTraceScope(const TimeTraceScope &)=delete
TimeTraceScope(StringRef Name)
TimeTraceScope & operator=(TimeTraceScope &&)=delete
TimeTraceScope(TimeTraceScope &&)=delete
TimeTraceScope(StringRef Name, llvm::function_ref< TimeTraceMetadata()> Metadata)
TimeTraceScope(StringRef Name, llvm::function_ref< std::string()> Detail)
TimeTraceScope & operator=(const TimeTraceScope &)=delete
An efficient, type-erasing, non-owning reference to a callable.
An abstract base class for streams implementations that also support a pwrite operation.
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI TimeTraceProfiler * getTimeTraceProfilerInstance()
LLVM_ABI void timeTraceProfilerInitialize(unsigned TimeTraceGranularity, StringRef ProcName, bool TimeTraceVerbose=false, TimeTraceCompression TimeTraceCompress=TimeTraceCompression::Infer)
Initialize the time trace profiler.
LLVM_ABI void timeTraceProfilerFinishThread()
Finish a time trace profiler running on a worker thread.
bool timeTraceProfilerEnabled()
Is the time trace profiler enabled, i.e. initialized?
TimeTraceCompression
Compression mode for time trace output.
LLVM_ABI void timeTraceProfilerEnd()
Manually end the last time section.
LLVM_ABI void timeTraceAddInstantEvent(StringRef Name, llvm::function_ref< std::string()> Detail)
LLVM_ABI TimeTraceCompression inferTimeTraceCompressionFromPath(StringRef Path)
Infer the time trace compression format from Path based on its file extension (.zst/....
LLVM_ABI TimeTraceProfilerEntry * timeTraceAsyncProfilerBegin(StringRef Name, StringRef Detail)
Manually begin a time section, with the given Name and Detail.
LLVM_ABI bool isTimeTraceVerbose()
LLVM_ABI void timeTraceProfilerCleanup()
Cleanup the time trace profiler, if it was initialized.
LLVM_ABI void timeTraceProfilerWrite(raw_pwrite_stream &OS)
Write profiling data to output stream.
LLVM_ABI TimeTraceProfilerEntry * timeTraceProfilerBegin(StringRef Name, StringRef Detail)
Manually begin a time section, with the given Name and Detail.
Represents an open or completed time section entry to be captured.