class SampleProfileWriterExtBinaryBase
Declaration
class SampleProfileWriterExtBinaryBase
: public SampleProfileWriterBinary { /* full declaration omitted */ };
Description
Sample-based profile writer (binary format).
Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:186
Inherits from: SampleProfileWriterBinary
Member Variables
- protected llvm::sampleprof::SectionLayout SecLayout = DefaultLayout
- protected SmallVector<llvm::sampleprof::SecHdrTableEntry, 8> SectionHdrLayout = ExtBinaryHdrLayoutTable[DefaultLayout]
- protected uint64_t SecLBRProfileStart = 0
- private std::unique_ptr<raw_ostream> LocalBufStream
- private uint64_t FileStart
- private uint64_t SecHdrTableOffset
- private std::vector<SecHdrTableEntry> SecHdrTable
- private MapVector<llvm::sampleprof::SampleContext, uint64_t> FuncOffsetTable
- private bool UseMD5 = false
- private MapVector<llvm::sampleprof::SampleContext, uint32_t> CSNameTable
- CSNameTable maps function context to its offset in SecCSNameTable section. The offset will be used everywhere where the context is referenced.
- private llvm::sampleprof::ProfileSymbolList* ProfSymList = nullptr
Inherited from SampleProfileWriterBinary:
Inherited from SampleProfileWriter:
Method Overview
- protected void addContext(const llvm::sampleprof::SampleContext & Context)
- protected std::error_code addNewSection(llvm::sampleprof::SecType Sec, uint32_t LayoutIdx, uint64_t SectionStart)
- protected template <class SecFlagType>void addSectionFlag(uint32_t SectionIdx, SecFlagType Flag)
- protected template <class SecFlagType>void addSectionFlag(llvm::sampleprof::SecType Type, SecFlagType Flag)
- private void allocSecHdrTable()
- private std::error_code compressAndOutput()
- protected uint64_t markSectionStart(llvm::sampleprof::SecType Type, uint32_t LayoutIdx)
- public void resetSecLayout(llvm::sampleprof::SectionLayout SL)
- public void setPartialProfile()
- public void setProfileSymbolList(llvm::sampleprof::ProfileSymbolList * PSL)
- public void setToCompressAllSections()
- public void setToCompressSection(llvm::sampleprof::SecType Type)
- public void setUseMD5()
- protected virtual void verifySecLayout(llvm::sampleprof::SectionLayout SL)
- public std::error_code write(const llvm::sampleprof::SampleProfileMap & ProfileMap)
- protected std::error_code writeCSNameIdx(const llvm::sampleprof::SampleContext & Context)
- protected std::error_code writeCSNameTableSection()
- protected std::error_code writeContextIdx(const llvm::sampleprof::SampleContext & Context)
- protected virtual std::error_code writeCustomSection(llvm::sampleprof::SecType Type)
- protected std::error_code writeFuncMetadata(const llvm::sampleprof::SampleProfileMap & Profiles)
- protected std::error_code writeFuncMetadata(const llvm::sampleprof::FunctionSamples & Profile)
- protected std::error_code writeFuncOffsetTable()
- private std::error_code writeHeader(const llvm::sampleprof::SampleProfileMap & ProfileMap)
- protected std::error_code writeNameTable()
- protected std::error_code writeNameTableSection(const llvm::sampleprof::SampleProfileMap & ProfileMap)
- protected virtual std::error_code writeOneSection(llvm::sampleprof::SecType Type, uint32_t LayoutIdx, const llvm::sampleprof::SampleProfileMap & ProfileMap)
- protected std::error_code writeProfileSymbolListSection()
- public std::error_code writeSample(const llvm::sampleprof::FunctionSamples & S)
- private std::error_code writeSecHdrTable()
- protected virtual std::error_code writeSections(const llvm::sampleprof::SampleProfileMap & ProfileMap)
Inherited from SampleProfileWriterBinary:
- protected addContext
- protected addName
- protected addNames
- protected getNameTable
- protected stablizeNameTable
- protected writeBody
- protected writeContextIdx
- protected writeHeader
- protected writeMagicIdent
- protected writeNameIdx
- protected writeNameTable
- public writeSample
- protected writeSummary
Inherited from SampleProfileWriter:
- protected computeSummary
- public create
- public create
- public getOutputStream
- public resetSecLayout
- public setPartialProfile
- public setProfileSymbolList
- public setToCompressAllSections
- public setUseMD5
- public write
- protected writeFuncProfiles
- protected writeHeader
- public writeSample
Methods
¶void addContext(
const llvm::sampleprof::SampleContext&
Context)
void addContext(
const llvm::sampleprof::SampleContext&
Context)
Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:244
Parameters
- const llvm::sampleprof::SampleContext& Context
¶std::error_code addNewSection(
llvm::sampleprof::SecType Sec,
uint32_t LayoutIdx,
uint64_t SectionStart)
std::error_code addNewSection(
llvm::sampleprof::SecType Sec,
uint32_t LayoutIdx,
uint64_t SectionStart)
Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:230
Parameters
- llvm::sampleprof::SecType Sec
- uint32_t LayoutIdx
- uint64_t SectionStart
¶template <class SecFlagType>
void addSectionFlag(uint32_t SectionIdx,
SecFlagType Flag)
template <class SecFlagType>
void addSectionFlag(uint32_t SectionIdx,
SecFlagType Flag)
Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:240
Templates
- SecFlagType
Parameters
- uint32_t SectionIdx
- SecFlagType Flag
¶template <class SecFlagType>
void addSectionFlag(
llvm::sampleprof::SecType Type,
SecFlagType Flag)
template <class SecFlagType>
void addSectionFlag(
llvm::sampleprof::SecType Type,
SecFlagType Flag)
Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:233
Templates
- SecFlagType
Parameters
- llvm::sampleprof::SecType Type
- SecFlagType Flag
¶void allocSecHdrTable()
void allocSecHdrTable()
Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:287
¶std::error_code compressAndOutput()
std::error_code compressAndOutput()
Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:290
¶uint64_t markSectionStart(
llvm::sampleprof::SecType Type,
uint32_t LayoutIdx)
uint64_t markSectionStart(
llvm::sampleprof::SecType Type,
uint32_t LayoutIdx)
Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:229
Parameters
- llvm::sampleprof::SecType Type
- uint32_t LayoutIdx
¶void resetSecLayout(
llvm::sampleprof::SectionLayout SL)
void resetSecLayout(
llvm::sampleprof::SectionLayout SL)
Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:215
Parameters
- llvm::sampleprof::SectionLayout SL
¶void setPartialProfile()
void setPartialProfile()
Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:207
¶void setProfileSymbolList(
llvm::sampleprof::ProfileSymbolList* PSL)
void setProfileSymbolList(
llvm::sampleprof::ProfileSymbolList* PSL)
Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:211
Parameters
¶void setToCompressAllSections()
void setToCompressAllSections()
Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:191
¶void setToCompressSection(
llvm::sampleprof::SecType Type)
void setToCompressSection(
llvm::sampleprof::SecType Type)
Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:192
Parameters
- llvm::sampleprof::SecType Type
¶void setUseMD5()
void setUseMD5()
Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:196
¶virtual void verifySecLayout(
llvm::sampleprof::SectionLayout SL)
virtual void verifySecLayout(
llvm::sampleprof::SectionLayout SL)
Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:249
Parameters
- llvm::sampleprof::SectionLayout SL
¶std::error_code write(
const llvm::sampleprof::SampleProfileMap&
ProfileMap)
std::error_code write(
const llvm::sampleprof::SampleProfileMap&
ProfileMap)
Description
Write all the sample profiles in the given map of samples.
Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:189
Parameters
- const llvm::sampleprof::SampleProfileMap& ProfileMap
Returns
status code of the file update operation.
¶std::error_code writeCSNameIdx(
const llvm::sampleprof::SampleContext&
Context)
std::error_code writeCSNameIdx(
const llvm::sampleprof::SampleContext&
Context)
Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:262
Parameters
- const llvm::sampleprof::SampleContext& Context
¶std::error_code writeCSNameTableSection()
std::error_code writeCSNameTableSection()
Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:263
¶std::error_code writeContextIdx(
const llvm::sampleprof::SampleContext&
Context)
std::error_code writeContextIdx(
const llvm::sampleprof::SampleContext&
Context)
Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:261
Parameters
- const llvm::sampleprof::SampleContext& Context
¶virtual std::error_code writeCustomSection(
llvm::sampleprof::SecType Type)
virtual std::error_code writeCustomSection(
llvm::sampleprof::SecType Type)
Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:247
Parameters
- llvm::sampleprof::SecType Type
¶std::error_code writeFuncMetadata(
const llvm::sampleprof::SampleProfileMap&
Profiles)
std::error_code writeFuncMetadata(
const llvm::sampleprof::SampleProfileMap&
Profiles)
Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:265
Parameters
- const llvm::sampleprof::SampleProfileMap& Profiles
¶std::error_code writeFuncMetadata(
const llvm::sampleprof::FunctionSamples&
Profile)
std::error_code writeFuncMetadata(
const llvm::sampleprof::FunctionSamples&
Profile)
Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:266
Parameters
- const llvm::sampleprof::FunctionSamples& Profile
¶std::error_code writeFuncOffsetTable()
std::error_code writeFuncOffsetTable()
Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:270
¶std::error_code writeHeader(
const llvm::sampleprof::SampleProfileMap&
ProfileMap)
std::error_code writeHeader(
const llvm::sampleprof::SampleProfileMap&
ProfileMap)
Description
Write a file header for the profile file.
Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:289
Parameters
- const llvm::sampleprof::SampleProfileMap& ProfileMap
¶std::error_code writeNameTable()
std::error_code writeNameTable()
Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:260
¶std::error_code writeNameTableSection(
const llvm::sampleprof::SampleProfileMap&
ProfileMap)
std::error_code writeNameTableSection(
const llvm::sampleprof::SampleProfileMap&
ProfileMap)
Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:269
Parameters
- const llvm::sampleprof::SampleProfileMap& ProfileMap
¶virtual std::error_code writeOneSection(
llvm::sampleprof::SecType Type,
uint32_t LayoutIdx,
const llvm::sampleprof::SampleProfileMap&
ProfileMap)
virtual std::error_code writeOneSection(
llvm::sampleprof::SecType Type,
uint32_t LayoutIdx,
const llvm::sampleprof::SampleProfileMap&
ProfileMap)
Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:256
Parameters
- llvm::sampleprof::SecType Type
- uint32_t LayoutIdx
- const llvm::sampleprof::SampleProfileMap& ProfileMap
¶std::error_code writeProfileSymbolListSection()
std::error_code writeProfileSymbolListSection()
Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:271
¶std::error_code writeSample(
const llvm::sampleprof::FunctionSamples& S)
std::error_code writeSample(
const llvm::sampleprof::FunctionSamples& S)
Description
Write sample profiles in \p S.
Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:193
Parameters
- const llvm::sampleprof::FunctionSamples& S
Returns
status code of the file update operation.
¶std::error_code writeSecHdrTable()
std::error_code writeSecHdrTable()
Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:288
¶virtual std::error_code writeSections(
const llvm::sampleprof::SampleProfileMap&
ProfileMap)
virtual std::error_code writeSections(
const llvm::sampleprof::SampleProfileMap&
ProfileMap)
Declared at: llvm/include/llvm/ProfileData/SampleProfWriter.h:252
Parameters
- const llvm::sampleprof::SampleProfileMap& ProfileMap