LLVM 20.0.0git
Public Member Functions | Public Attributes | List of all members
llvm::TimeTraceProfiler Struct Reference

Public Member Functions

 TimeTraceProfiler (unsigned TimeTraceGranularity=0, StringRef ProcName="", bool TimeTraceVerbose=false)
 
TimeTraceProfilerEntrybegin (std::string Name, llvm::function_ref< std::string()> Detail, bool AsyncEvent=false)
 
TimeTraceProfilerEntrybegin (std::string Name, llvm::function_ref< TimeTraceMetadata()> Metadata, bool AsyncEvent=false)
 
void end ()
 
void end (TimeTraceProfilerEntry &E)
 
void write (raw_pwrite_stream &OS)
 

Public Attributes

SmallVector< std::unique_ptr< TimeTraceProfilerEntry >, 16 > Stack
 
SmallVector< TimeTraceProfilerEntry, 128 > Entries
 
StringMap< CountAndDurationType > CountAndTotalPerName
 
const time_point< system_clock > BeginningOfTime
 
const TimePointType StartTime
 
const std::string ProcName
 
const sys::Process::Pid Pid
 
SmallString< 0 > ThreadName
 
const uint64_t Tid
 
const unsigned TimeTraceGranularity
 
const bool TimeTraceVerbose
 

Detailed Description

Definition at line 107 of file TimeProfiler.cpp.

Constructor & Destructor Documentation

◆ TimeTraceProfiler()

llvm::TimeTraceProfiler::TimeTraceProfiler ( unsigned  TimeTraceGranularity = 0,
StringRef  ProcName = "",
bool  TimeTraceVerbose = false 
)
inline

Definition at line 108 of file TimeProfiler.cpp.

References llvm::get_thread_name(), and ThreadName.

Member Function Documentation

◆ begin() [1/2]

TimeTraceProfilerEntry * llvm::TimeTraceProfiler::begin ( std::string  Name,
llvm::function_ref< std::string()>  Detail,
bool  AsyncEvent = false 
)
inline

Definition at line 117 of file TimeProfiler.cpp.

References Name, and Stack.

Referenced by llvm::timeTraceAsyncProfilerBegin(), and llvm::timeTraceProfilerBegin().

◆ begin() [2/2]

TimeTraceProfilerEntry * llvm::TimeTraceProfiler::begin ( std::string  Name,
llvm::function_ref< TimeTraceMetadata()>  Metadata,
bool  AsyncEvent = false 
)
inline

Definition at line 127 of file TimeProfiler.cpp.

References Name, and Stack.

◆ end() [1/2]

void llvm::TimeTraceProfiler::end ( )
inline

Definition at line 135 of file TimeProfiler.cpp.

References assert(), end(), and Stack.

Referenced by end(), and llvm::timeTraceProfilerEnd().

◆ end() [2/2]

void llvm::TimeTraceProfiler::end ( TimeTraceProfilerEntry E)
inline

◆ write()

void llvm::TimeTraceProfiler::write ( raw_pwrite_stream OS)
inline

Member Data Documentation

◆ BeginningOfTime

const time_point<system_clock> llvm::TimeTraceProfiler::BeginningOfTime

Definition at line 326 of file TimeProfiler.cpp.

Referenced by write().

◆ CountAndTotalPerName

StringMap<CountAndDurationType> llvm::TimeTraceProfiler::CountAndTotalPerName

Definition at line 324 of file TimeProfiler.cpp.

Referenced by end(), and write().

◆ Entries

SmallVector<TimeTraceProfilerEntry, 128> llvm::TimeTraceProfiler::Entries

Definition at line 323 of file TimeProfiler.cpp.

Referenced by end(), and write().

◆ Pid

const sys::Process::Pid llvm::TimeTraceProfiler::Pid

Definition at line 330 of file TimeProfiler.cpp.

Referenced by write().

◆ ProcName

const std::string llvm::TimeTraceProfiler::ProcName

Definition at line 329 of file TimeProfiler.cpp.

Referenced by write().

◆ Stack

SmallVector<std::unique_ptr<TimeTraceProfilerEntry>, 16> llvm::TimeTraceProfiler::Stack

Definition at line 322 of file TimeProfiler.cpp.

Referenced by begin(), end(), and write().

◆ StartTime

const TimePointType llvm::TimeTraceProfiler::StartTime

Definition at line 328 of file TimeProfiler.cpp.

Referenced by write().

◆ ThreadName

SmallString<0> llvm::TimeTraceProfiler::ThreadName

Definition at line 331 of file TimeProfiler.cpp.

Referenced by TimeTraceProfiler(), and write().

◆ Tid

const uint64_t llvm::TimeTraceProfiler::Tid

Definition at line 332 of file TimeProfiler.cpp.

Referenced by write().

◆ TimeTraceGranularity

const unsigned llvm::TimeTraceProfiler::TimeTraceGranularity

Definition at line 335 of file TimeProfiler.cpp.

Referenced by end().

◆ TimeTraceVerbose

const bool llvm::TimeTraceProfiler::TimeTraceVerbose

Definition at line 339 of file TimeProfiler.cpp.

Referenced by llvm::isTimeTraceVerbose().


The documentation for this struct was generated from the following file: