|
LLVM
10.0.0
|
#include "llvm/ProfileData/SampleProfWriter.h"
Public Member Functions | |
| virtual std::error_code | write (const StringMap< FunctionSamples > &ProfileMap) override |
| Write all the sample profiles in the given map of samples. More... | |
| void | setToCompressAllSections () |
| void | setToCompressSection (SecType Type) |
Public Member Functions inherited from llvm::sampleprof::SampleProfileWriterBinary | |
| SampleProfileWriterBinary (std::unique_ptr< raw_ostream > &OS) | |
| virtual std::error_code | writeSample (const FunctionSamples &S) override |
| Write samples of a top-level function to a binary file. More... | |
Public Member Functions inherited from llvm::sampleprof::SampleProfileWriter | |
| virtual | ~SampleProfileWriter ()=default |
| raw_ostream & | getOutputStream () |
| virtual void | setProfileSymbolList (ProfileSymbolList *PSL) |
Protected Member Functions | |
| uint64_t | markSectionStart (SecType Type) |
| Return the current position and prepare to use it as the start position of a section. More... | |
| std::error_code | addNewSection (SecType Sec, uint64_t SectionStart) |
| Add a new section into section header table. More... | |
| virtual void | initSectionHdrLayout ()=0 |
| virtual std::error_code | writeSections (const StringMap< FunctionSamples > &ProfileMap)=0 |
Protected Member Functions inherited from llvm::sampleprof::SampleProfileWriterBinary | |
| virtual std::error_code | writeMagicIdent (SampleProfileFormat Format) |
| virtual std::error_code | writeNameTable () |
| std::error_code | writeSummary () |
| std::error_code | writeNameIdx (StringRef FName) |
| std::error_code | writeBody (const FunctionSamples &S) |
| void | stablizeNameTable (std::set< StringRef > &V) |
| void | addName (StringRef FName) |
| void | addNames (const FunctionSamples &S) |
Protected Member Functions inherited from llvm::sampleprof::SampleProfileWriter | |
| SampleProfileWriter (std::unique_ptr< raw_ostream > &OS) | |
| virtual std::error_code | writeFuncProfiles (const StringMap< FunctionSamples > &ProfileMap) |
| void | computeSummary (const StringMap< FunctionSamples > &ProfileMap) |
| Compute summary for this profile. More... | |
Protected Attributes | |
| SmallVector< SecHdrTableEntry, 8 > | SectionHdrLayout |
Protected Attributes inherited from llvm::sampleprof::SampleProfileWriterBinary | |
| MapVector< StringRef, uint32_t > | NameTable |
Protected Attributes inherited from llvm::sampleprof::SampleProfileWriter | |
| std::unique_ptr< raw_ostream > | OutputStream |
| Output stream where to emit the profile to. More... | |
| std::unique_ptr< ProfileSummary > | Summary |
| Profile summary. More... | |
| SampleProfileFormat | Format = SPF_None |
| Profile format. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from llvm::sampleprof::SampleProfileWriter | |
| static ErrorOr< std::unique_ptr< SampleProfileWriter > > | create (StringRef Filename, SampleProfileFormat Format) |
| Profile writer factory. More... | |
| static ErrorOr< std::unique_ptr< SampleProfileWriter > > | create (std::unique_ptr< raw_ostream > &OS, SampleProfileFormat Format) |
Create a new stream writer based on the value of Format. More... | |
Definition at line 144 of file SampleProfWriter.h.
|
protected |
Add a new section into section header table.
Definition at line 117 of file SampleProfWriter.cpp.
References llvm::sampleprof::hasSecFlag(), llvm::sampleprof::SampleProfileWriter::OutputStream, llvm::sampleprof::SecFlagCompress, and llvm::success.
|
protectedpure virtual |
|
protected |
Return the current position and prepare to use it as the start position of a section.
Definition at line 86 of file SampleProfWriter.cpp.
References llvm::zlib::BestSizeCompression, llvm::zlib::compress(), llvm::compress_failed, E, llvm::encodeULEB128(), llvm::sampleprof::hasSecFlag(), llvm::zlib::isAvailable(), llvm::sampleprof::SampleProfileWriter::OutputStream, llvm::sampleprof::SecFlagCompress, llvm::SmallVectorBase::size(), llvm::SmallString< InternalLen >::str(), llvm::success, and llvm::zlib_unavailable.
| void SampleProfileWriterExtBinaryBase::setToCompressAllSections | ( | ) |
Definition at line 391 of file SampleProfWriter.cpp.
References llvm::sampleprof::addSecFlags(), and llvm::sampleprof::SecFlagCompress.
| void SampleProfileWriterExtBinaryBase::setToCompressSection | ( | SecType | Type | ) |
Definition at line 396 of file SampleProfWriter.cpp.
References llvm::sampleprof::addSecFlags(), llvm::sampleprof::SampleProfileWriter::Format, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::insert(), llvm::support::little, llvm::ostream_seek_unsupported, llvm::sampleprof::SampleProfileWriter::OutputStream, llvm::sampleprof::SecFlagCompress, Size, llvm::success, and llvm::support::endian::Writer::write().
|
overridevirtual |
Write all the sample profiles in the given map of samples.
Reimplemented from llvm::sampleprof::SampleProfileWriter.
Definition at line 130 of file SampleProfWriter.cpp.
References llvm::success, and llvm::sampleprof::SampleProfileWriter::writeHeader().
|
protectedpure virtual |
|
protected |
Definition at line 164 of file SampleProfWriter.h.
1.8.13