LLVM: llvm::InstrProfWriter Class Reference (original) (raw)
#include "[llvm/ProfileData/InstrProfWriter.h](InstrProfWriter%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| LLVM_ABI | InstrProfWriter (bool Sparse=false, uint64_t TemporalProfTraceReservoirSize=0, uint64_t MaxTemporalProfTraceLength=0, bool WritePrevVersion=false, memprof::IndexedVersion MemProfVersionRequested=static_cast< memprof::IndexedVersion >(memprof::MinimumSupportedVersion), bool MemProfFullSchema=false, bool MemprofGenerateRandomHotness=false, unsigned MemprofGenerateRandomHotnessSeed=0) |
| LLVM_ABI | ~InstrProfWriter () |
| StringMap< ProfilingData > & | getProfileData () |
| LLVM_ABI void | addRecord (NamedInstrProfRecord &&I, uint64_t Weight, function_ref< void(Error)> Warn) |
| Add function counts for the given function. | |
| void | addRecord (NamedInstrProfRecord &&I, function_ref< void(Error)> Warn) |
| void | addVTableName (StringRef VTableName) |
| LLVM_ABI void | addTemporalProfileTraces (SmallVectorImpl< TemporalProfTraceTy > &SrcTraces, uint64_t SrcStreamSize) |
| Add SrcTraces using reservoir sampling where SrcStreamSize is the total number of temporal profiling traces the source has seen. | |
| LLVM_ABI bool | addMemProfData (memprof::IndexedMemProfData Incoming, function_ref< void(Error)> Warn) |
| Add the entire MemProfData Incoming to the writer context. | |
| LLVM_ABI void | addBinaryIds (ArrayRef< llvm::object::BuildID > BIs) |
| LLVM_ABI void | addDataAccessProfData (std::unique_ptr< memprof::DataAccessProfData > DataAccessProfile) |
| LLVM_ABI void | mergeRecordsFromWriter (InstrProfWriter &&IPW, function_ref< void(Error)> Warn) |
| Merge existing function counts from the given writer. | |
| LLVM_ABI Error | write (raw_fd_ostream &OS) |
| Write the profile to OS. | |
| LLVM_ABI Error | write (raw_string_ostream &OS) |
| Write the profile to a string output stream OS. | |
| LLVM_ABI Error | writeText (raw_fd_ostream &OS) |
| Write the profile in text format to OS. | |
| LLVM_ABI void | writeTextTemporalProfTraceData (raw_fd_ostream &OS, InstrProfSymtab &Symtab) |
| Write temporal profile trace data to the header in text format to OS. | |
| LLVM_ABI Error | validateRecord (const InstrProfRecord &Func) |
| LLVM_ABI std::unique_ptr< MemoryBuffer > | writeBuffer () |
| Write the profile, returning the raw data. For testing. | |
| Error | mergeProfileKind (const InstrProfKind Other) |
| Update the attributes of the current profile from the attributes specified. | |
| InstrProfKind | getProfileKind () const |
| bool | hasSingleByteCoverage () const |
| LLVM_ABI void | setValueProfDataEndianness (llvm::endianness Endianness) |
| LLVM_ABI void | setOutputSparse (bool Sparse) |
| void | setMemProfVersionRequested (memprof::IndexedVersion Version) |
| void | setMemProfFullSchema (bool Full) |
| LLVM_ABI void | overlapRecord (NamedInstrProfRecord &&Other, OverlapStats &Overlap, OverlapStats &FuncLevelOverlap, const OverlapFuncFilters &FuncFilter) |
Definition at line 40 of file InstrProfWriter.h.
◆ ProfilingData
◆ ~InstrProfWriter()
| InstrProfWriter::~InstrProfWriter | ( | ) |
|---|
◆ addBinaryIds()
◆ addDataAccessProfData()
◆ addMemProfData()
◆ addRecord() [1/2]
◆ addRecord() [2/2]
◆ addTemporalProfileTraces()
Add SrcTraces using reservoir sampling where SrcStreamSize is the total number of temporal profiling traces the source has seen.
Definition at line 333 of file InstrProfWriter.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::SmallVectorTemplateCommon< T, typename >::empty(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::erase_if(), I, llvm::shuffle(), llvm::Trace::size(), and T.
Referenced by mergeRecordsFromWriter().
◆ addVTableName()
| void llvm::InstrProfWriter::addVTableName ( StringRef VTableName) | inline |
|---|
◆ getProfileData()
| StringMap< ProfilingData > & llvm::InstrProfWriter::getProfileData ( ) | inline |
|---|
◆ getProfileKind()
| InstrProfKind llvm::InstrProfWriter::getProfileKind ( ) const | inline |
|---|
◆ hasSingleByteCoverage()
| bool llvm::InstrProfWriter::hasSingleByteCoverage ( ) const | inline |
|---|
◆ mergeProfileKind()
Update the attributes of the current profile from the attributes specified.
An error is returned if IR and FE profiles are mixed.
Definition at line 168 of file InstrProfWriter.h.
References A(), B(), llvm::FrontendInstrumentation, llvm::FunctionEntryInstrumentation, llvm::FunctionEntryOnly, llvm::LoopEntriesInstrumentation, llvm::make_error(), llvm::Other, llvm::Error::success(), llvm::Unknown, and llvm::unsupported_version.
◆ mergeRecordsFromWriter()
◆ overlapRecord()
◆ setMemProfFullSchema()
| void llvm::InstrProfWriter::setMemProfFullSchema ( bool Full) | inline |
|---|
◆ setMemProfVersionRequested()
◆ setOutputSparse()
| void InstrProfWriter::setOutputSparse | ( | bool | Sparse | ) |
|---|
◆ setValueProfDataEndianness()
◆ validateRecord()
◆ write() [1/2]
◆ write() [2/2]
◆ writeBuffer()
| std::unique_ptr< MemoryBuffer > InstrProfWriter::writeBuffer | ( | ) |
|---|
◆ writeRecordInText()
◆ writeText()
Write the profile in text format to OS.
Definition at line 759 of file InstrProfWriter.cpp.
References A(), llvm::InstrProfSymtab::addFuncName(), llvm::InstrProfSymtab::addVTableName(), B(), llvm::ContextSensitive, llvm::FunctionEntryInstrumentation, I, llvm::IRInstrumentation, llvm::LoopEntriesInstrumentation, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::SingleByteCoverage, llvm::sort(), llvm::Error::success(), llvm::TemporalProfile, validateRecord(), writeRecordInText(), and writeTextTemporalProfTraceData().
◆ writeTextTemporalProfTraceData()
The documentation for this class was generated from the following files:
- include/llvm/ProfileData/InstrProfWriter.h
- lib/ProfileData/InstrProfWriter.cpp