LLVM 20.0.0git
|
Public Member Functions | |
TimeTraceProfiler (unsigned TimeTraceGranularity=0, StringRef ProcName="", bool TimeTraceVerbose=false) | |
TimeTraceProfilerEntry * | begin (std::string Name, llvm::function_ref< std::string()> Detail, TimeTraceEventType EventType=TimeTraceEventType::CompleteEvent) |
TimeTraceProfilerEntry * | begin (std::string Name, llvm::function_ref< TimeTraceMetadata()> Metadata, TimeTraceEventType EventType=TimeTraceEventType::CompleteEvent) |
void | insert (std::string Name, llvm::function_ref< std::string()> Detail) |
void | end () |
void | end (TimeTraceProfilerEntry &E) |
void | write (raw_pwrite_stream &OS) |
Public Attributes | |
SmallVector< std::unique_ptr< InProgressEntry >, 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 |
Definition at line 127 of file TimeProfiler.cpp.
|
inline |
Definition at line 128 of file TimeProfiler.cpp.
References llvm::get_thread_name(), and ThreadName.
|
inline |
Definition at line 138 of file TimeProfiler.cpp.
References assert(), llvm::SmallVectorTemplateCommon< T, typename >::back(), llvm::SmallVectorImpl< T >::emplace_back(), llvm::InstantEvent, Name, and Stack.
Referenced by llvm::timeTraceAsyncProfilerBegin(), and llvm::timeTraceProfilerBegin().
|
inline |
Definition at line 149 of file TimeProfiler.cpp.
References assert(), llvm::SmallVectorTemplateCommon< T, typename >::back(), llvm::SmallVectorImpl< T >::emplace_back(), llvm::InstantEvent, Name, and Stack.
|
inline |
Definition at line 168 of file TimeProfiler.cpp.
References assert(), llvm::SmallVectorTemplateCommon< T, typename >::back(), llvm::SmallVectorBase< Size_T >::empty(), end(), and Stack.
Referenced by end(), and llvm::timeTraceProfilerEnd().
|
inline |
Definition at line 173 of file TimeProfiler.cpp.
References assert(), llvm::count(), CountAndTotalPerName, llvm::drop_begin(), llvm::SmallVectorBase< Size_T >::empty(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::TimeTraceProfilerEntry::End, Entries, llvm::SmallVectorImpl< T >::erase(), llvm::find_if(), llvm::TimeTraceProfilerEntry::Name, llvm::none_of(), llvm::reverse(), Stack, llvm::TimeTraceProfilerEntry::Start, and TimeTraceGranularity.
|
inline |
Definition at line 159 of file TimeProfiler.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::back(), llvm::SmallVectorBase< Size_T >::empty(), llvm::InstantEvent, Name, and Stack.
Referenced by llvm::timeTraceAddInstantEvent().
|
inline |
Definition at line 213 of file TimeProfiler.cpp.
References A, llvm::all_of(), llvm::json::OStream::arrayBegin(), llvm::json::OStream::arrayEnd(), assert(), llvm::AsyncEvent, llvm::json::OStream::attribute(), llvm::json::OStream::attributeBegin(), llvm::json::OStream::attributeEnd(), llvm::json::OStream::attributeObject(), B, BeginningOfTime, llvm::CompleteEvent, llvm::count(), CountAndTotalPerName, llvm::SmallVectorBase< Size_T >::empty(), Entries, if(), llvm::InstantEvent, Name, llvm::json::OStream::object(), llvm::json::OStream::objectBegin(), llvm::json::OStream::objectEnd(), OS, Pid, ProcName, llvm::StringMapImpl::size(), llvm::sort(), Stack, StartTime, ThreadName, Tid, and llvm::Total.
Referenced by llvm::timeTraceProfilerWrite().
const time_point<system_clock> llvm::TimeTraceProfiler::BeginningOfTime |
Definition at line 370 of file TimeProfiler.cpp.
Referenced by write().
StringMap<CountAndDurationType> llvm::TimeTraceProfiler::CountAndTotalPerName |
Definition at line 368 of file TimeProfiler.cpp.
SmallVector<TimeTraceProfilerEntry, 128> llvm::TimeTraceProfiler::Entries |
Definition at line 367 of file TimeProfiler.cpp.
const sys::Process::Pid llvm::TimeTraceProfiler::Pid |
Definition at line 374 of file TimeProfiler.cpp.
Referenced by write().
const std::string llvm::TimeTraceProfiler::ProcName |
Definition at line 373 of file TimeProfiler.cpp.
Referenced by write().
SmallVector<std::unique_ptr<InProgressEntry>, 16> llvm::TimeTraceProfiler::Stack |
const TimePointType llvm::TimeTraceProfiler::StartTime |
Definition at line 372 of file TimeProfiler.cpp.
Referenced by write().
SmallString<0> llvm::TimeTraceProfiler::ThreadName |
Definition at line 375 of file TimeProfiler.cpp.
Referenced by TimeTraceProfiler(), and write().
Definition at line 376 of file TimeProfiler.cpp.
Referenced by write().
Definition at line 379 of file TimeProfiler.cpp.
Referenced by end().
Definition at line 383 of file TimeProfiler.cpp.
Referenced by llvm::isTimeTraceVerbose().