|
static ErrorOr< std::unique_ptr< SampleProfileWriter > > | create (StringRef Filename, SampleProfileFormat Format) |
| Profile writer factory.
|
|
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 .
|
|
uint64_t | markSectionStart (SecType Type, uint32_t LayoutIdx) |
| Return the current position and prepare to use it as the start position of a section given the section type Type and its position LayoutIdx in SectionHdrLayout.
|
|
std::error_code | addNewSection (SecType Sec, uint32_t LayoutIdx, uint64_t SectionStart) |
| Add a new section into section header table given the section type Type , its position LayoutIdx in SectionHdrLayout and the location SectionStart where the section should be written to.
|
|
template<class SecFlagType > |
void | addSectionFlag (SecType Type, SecFlagType Flag) |
|
template<class SecFlagType > |
void | addSectionFlag (uint32_t SectionIdx, SecFlagType Flag) |
|
void | addContext (const SampleContext &Context) override |
|
virtual std::error_code | writeCustomSection (SecType Type)=0 |
|
virtual void | verifySecLayout (SectionLayout SL)=0 |
|
virtual std::error_code | writeSections (const SampleProfileMap &ProfileMap)=0 |
|
virtual std::error_code | writeOneSection (SecType Type, uint32_t LayoutIdx, const SampleProfileMap &ProfileMap) |
|
std::error_code | writeNameTable () override |
|
std::error_code | writeContextIdx (const SampleContext &Context) override |
|
std::error_code | writeCSNameIdx (const SampleContext &Context) |
|
std::error_code | writeCSNameTableSection () |
|
std::error_code | writeFuncMetadata (const SampleProfileMap &Profiles) |
|
std::error_code | writeFuncMetadata (const FunctionSamples &Profile) |
|
std::error_code | writeNameTableSection (const SampleProfileMap &ProfileMap) |
|
std::error_code | writeFuncOffsetTable () |
|
std::error_code | writeProfileSymbolListSection () |
|
virtual MapVector< FunctionId, uint32_t > & | getNameTable () |
|
virtual std::error_code | writeMagicIdent (SampleProfileFormat Format) |
|
virtual std::error_code | writeNameTable () |
|
std::error_code | writeHeader (const SampleProfileMap &ProfileMap) override |
| Write a file header for the profile file.
|
|
std::error_code | writeSummary () |
|
virtual std::error_code | writeContextIdx (const SampleContext &Context) |
|
std::error_code | writeNameIdx (FunctionId FName) |
|
std::error_code | writeBody (const FunctionSamples &S) |
|
void | stablizeNameTable (MapVector< FunctionId, uint32_t > &NameTable, std::set< FunctionId > &V) |
|
void | addName (FunctionId FName) |
|
virtual void | addContext (const SampleContext &Context) |
|
void | addNames (const FunctionSamples &S) |
|
| SampleProfileWriter (std::unique_ptr< raw_ostream > &OS) |
|
virtual std::error_code | writeHeader (const SampleProfileMap &ProfileMap)=0 |
| Write a file header for the profile file.
|
|
virtual std::error_code | writeFuncProfiles (const SampleProfileMap &ProfileMap) |
|
std::error_code | writeWithSizeLimitInternal (SampleProfileMap &ProfileMap, size_t OutputSizeLimit, FunctionPruningStrategy *Strategy) |
|
void | computeSummary (const SampleProfileMap &ProfileMap) |
| Compute summary for this profile.
|
|
SectionLayout | SecLayout = DefaultLayout |
|
SmallVector< SecHdrTableEntry, 8 > | SectionHdrLayout |
|
uint64_t | SecLBRProfileStart = 0 |
|
MapVector< FunctionId, uint32_t > | NameTable |
|
size_t | LineCount |
| For writeWithSizeLimit in text mode, each newline takes 1 additional byte on Windows when actually written to the file, but not written to a memory buffer.
|
|
std::unique_ptr< raw_ostream > | OutputStream |
| Output stream where to emit the profile to.
|
|
std::unique_ptr< ProfileSummary > | Summary |
| Profile summary.
|
|
SampleProfileFormat | Format = SPF_None |
| Profile format.
|
|
Definition at line 410 of file SampleProfWriter.h.