LLVM 17.0.0git
|
Classes | |
class | DefaultFunctionPruningStrategy |
class | FunctionPruningStrategy |
When writing a profile with size limit, user may want to use a different strategy to reduce function count other than dropping functions with fewest samples first. More... | |
class | FunctionSamples |
Representation of the samples collected for a function. More... | |
struct | LineLocation |
Represents the relative location of an instruction. More... | |
struct | LineLocationHash |
class | ProfileConverter |
Helper class for profile conversion. More... | |
class | ProfiledCallGraph |
struct | ProfiledCallGraphEdge |
struct | ProfiledCallGraphNode |
class | ProfileSymbolList |
ProfileSymbolList records the list of function symbols shown up in the binary used to generate the profile. More... | |
class | SampleContext |
struct | SampleContextFrame |
struct | SampleContextFrameHash |
class | SampleContextTrimmer |
SampleContextTrimmer impelements helper functions to trim, merge cold context profiles. More... | |
class | SampleProfileReader |
Sample-based profile reader. More... | |
class | SampleProfileReaderBinary |
class | SampleProfileReaderExtBinary |
class | SampleProfileReaderExtBinaryBase |
SampleProfileReaderExtBinaryBase/SampleProfileWriterExtBinaryBase defines the basic structure of the extensible binary format. More... | |
class | SampleProfileReaderGCC |
class | SampleProfileReaderItaniumRemapper |
SampleProfileReaderItaniumRemapper remaps the profile data from a sample profile data reader, by applying a provided set of equivalences between components of the symbol names in the profile. More... | |
class | SampleProfileReaderRawBinary |
class | SampleProfileReaderText |
class | SampleProfileWriter |
Sample-based profile writer. Base class. More... | |
class | SampleProfileWriterBinary |
Sample-based profile writer (binary format). More... | |
class | SampleProfileWriterExtBinary |
class | SampleProfileWriterExtBinaryBase |
class | SampleProfileWriterRawBinary |
class | SampleProfileWriterText |
Sample-based profile writer (text format). More... | |
class | SampleRecord |
Representation of a single sample record. More... | |
class | SampleSorter |
Sort a LocationT->SampleT map by LocationT. More... | |
struct | SecHdrTableEntry |
Typedefs | |
using | SampleContextFrameVector = SmallVector< SampleContextFrame, 1 > |
using | SampleContextFrames = ArrayRef< SampleContextFrame > |
using | BodySampleMap = std::map< LineLocation, SampleRecord > |
using | FunctionSamplesMap = std::map< std::string, FunctionSamples, std::less<> > |
using | CallsiteSampleMap = std::map< LineLocation, FunctionSamplesMap > |
using | LocToLocMap = std::unordered_map< LineLocation, LineLocation, LineLocationHash > |
using | SampleProfileMap = std::unordered_map< SampleContext, FunctionSamples, SampleContext::Hash > |
using | NameFunctionSamples = std::pair< SampleContext, const FunctionSamples * > |
using | InlineCallStack = SmallVector< FunctionSamples *, 10 > |
Functions | |
static uint64_t | SPMagic (SampleProfileFormat Format=SPF_Binary) |
static StringRef | getRepInFormat (StringRef Name, bool UseMD5, std::string &GUIDBuf) |
Get the proper representation of a string according to whether the current Format uses MD5 to represent the string. | |
static uint64_t | SPVersion () |
static std::string | getSecName (SecType Type) |
template<class SecFlagType > | |
static void | verifySecFlag (SecType Type, SecFlagType Flag) |
template<class SecFlagType > | |
static void | addSecFlag (SecHdrTableEntry &Entry, SecFlagType Flag) |
template<class SecFlagType > | |
static void | removeSecFlag (SecHdrTableEntry &Entry, SecFlagType Flag) |
template<class SecFlagType > | |
static bool | hasSecFlag (const SecHdrTableEntry &Entry, SecFlagType Flag) |
raw_ostream & | operator<< (raw_ostream &OS, const LineLocation &Loc) |
raw_ostream & | operator<< (raw_ostream &OS, const SampleRecord &Sample) |
static hash_code | hash_value (const SampleContextFrame &arg) |
static hash_code | hash_value (const SampleContext &arg) |
raw_ostream & | operator<< (raw_ostream &OS, const FunctionSamples &FS) |
void | sortFuncProfiles (const SampleProfileMap &ProfileMap, std::vector< NameFunctionSamples > &SortedProfiles) |
Variables | |
const std::array< SmallVector< SecHdrTableEntry, 8 >, NumOfLayout > | ExtBinaryHdrLayoutTable |
using llvm::sampleprof::BodySampleMap = typedef std::map<LineLocation, SampleRecord> |
Definition at line 721 of file SampleProf.h.
using llvm::sampleprof::CallsiteSampleMap = typedef std::map<LineLocation, FunctionSamplesMap> |
Definition at line 725 of file SampleProf.h.
using llvm::sampleprof::FunctionSamplesMap = typedef std::map<std::string, FunctionSamples, std::less<> > |
Definition at line 724 of file SampleProf.h.
using llvm::sampleprof::InlineCallStack = typedef SmallVector<FunctionSamples *, 10> |
Definition at line 824 of file SampleProfReader.h.
using llvm::sampleprof::LocToLocMap = typedef std::unordered_map<LineLocation, LineLocation, LineLocationHash> |
Definition at line 726 of file SampleProf.h.
using llvm::sampleprof::NameFunctionSamples = typedef std::pair<SampleContext, const FunctionSamples *> |
Definition at line 1273 of file SampleProf.h.
using llvm::sampleprof::SampleContextFrames = typedef ArrayRef<SampleContextFrame> |
Definition at line 505 of file SampleProf.h.
using llvm::sampleprof::SampleContextFrameVector = typedef SmallVector<SampleContextFrame, 1> |
Definition at line 504 of file SampleProf.h.
using llvm::sampleprof::SampleProfileMap = typedef std::unordered_map<SampleContext, FunctionSamples, SampleContext::Hash> |
Definition at line 1270 of file SampleProf.h.
Enumerator | |
---|---|
ContextNone | |
ContextWasInlined | |
ContextShouldBeInlined | |
ContextDuplicatedIntoBase |
Definition at line 461 of file SampleProf.h.
Enumerator | |
---|---|
UnknownContext | |
RawContext | |
SyntheticContext | |
InlinedContext | |
MergedContext |
Definition at line 452 of file SampleProf.h.
Enumerator | |
---|---|
Base | |
Pass0 | |
Pass1 | |
Pass2 | |
Pass3 | |
Pass4 | |
PassLast |
Definition at line 57 of file Discriminator.h.
Enumerator | |
---|---|
HIST_TYPE_INTERVAL | |
HIST_TYPE_POW2 | |
HIST_TYPE_SINGLE_VALUE | |
HIST_TYPE_CONST_DELTA | |
HIST_TYPE_INDIR_CALL | |
HIST_TYPE_AVERAGE | |
HIST_TYPE_IOR | |
HIST_TYPE_INDIR_CALL_TOPN |
Definition at line 828 of file SampleProfReader.h.
Enumerator | |
---|---|
SPF_None | |
SPF_Text | |
SPF_Compact_Binary | |
SPF_GCC | |
SPF_Ext_Binary | |
SPF_Binary |
Definition at line 90 of file SampleProf.h.
Enumerator | |
---|---|
SPL_None | |
SPL_Nest | |
SPL_Flat |
Definition at line 99 of file SampleProf.h.
|
strong |
Enumerator | |
---|---|
SecFlagInValid | |
SecFlagCompress | |
SecFlagFlat |
Definition at line 178 of file SampleProf.h.
|
strong |
Enumerator | |
---|---|
SecFlagInvalid | |
SecFlagIsProbeBased | |
SecFlagHasAttribute |
Definition at line 215 of file SampleProf.h.
|
strong |
Enumerator | |
---|---|
SecFlagInvalid | |
SecFlagOrdered |
Definition at line 221 of file SampleProf.h.
|
strong |
Enumerator | |
---|---|
SecFlagInValid | |
SecFlagMD5Name | |
SecFlagFixedLengthMD5 | |
SecFlagUniqSuffix |
Definition at line 188 of file SampleProf.h.
|
strong |
Definition at line 198 of file SampleProf.h.
Enumerator | |
---|---|
DefaultLayout | |
CtxSplitLayout | |
NumOfLayout |
Definition at line 29 of file SampleProfWriter.h.
Enumerator | |
---|---|
SecInValid | |
SecProfSummary | |
SecNameTable | |
SecProfileSymbolList | |
SecFuncOffsetTable | |
SecFuncMetadata | |
SecCSNameTable | |
SecFuncProfileFirst | |
SecLBRProfile |
Definition at line 127 of file SampleProf.h.
|
inlinestatic |
Definition at line 257 of file SampleProf.h.
References verifySecFlag().
Referenced by llvm::sampleprof::SampleProfileWriterExtBinaryBase::addSectionFlag(), and llvm::sampleprof::SampleProfileWriterExtBinaryBase::setToCompressAllSections().
|
inlinestatic |
Get the proper representation of a string according to whether the current Format uses MD5 to represent the string.
Definition at line 114 of file SampleProf.h.
References llvm::GlobalValue::getGUID(), and Name.
Referenced by llvm::sampleprof::FunctionSamples::findFunctionSamplesAt(), llvm::SampleContextTracker::getBaseSamplesFor(), llvm::SampleContextTracker::getCalleeContextSamplesFor(), llvm::sampleprof::SampleProfileReader::getOrCreateSamplesFor(), and llvm::sampleprof::SampleProfileReader::getSamplesFor().
|
inlinestatic |
Definition at line 140 of file SampleProf.h.
References SecCSNameTable, SecFuncMetadata, SecFuncOffsetTable, SecInValid, SecLBRProfile, SecNameTable, SecProfileSymbolList, and SecProfSummary.
Referenced by llvm::sampleprof::SampleProfileReaderExtBinaryBase::dumpSectionInfo().
|
inlinestatic |
Definition at line 713 of file SampleProf.h.
References llvm::sampleprof::SampleContext::getContextFrames(), llvm::sampleprof::SampleContext::getName(), llvm::sampleprof::SampleContext::hasContext(), and hash_value().
|
inlinestatic |
Definition at line 499 of file SampleProf.h.
References llvm::sampleprof::LineLocation::Discriminator, llvm::sampleprof::SampleContextFrame::FuncName, llvm::hash_combine(), llvm::sampleprof::LineLocation::LineOffset, and llvm::sampleprof::SampleContextFrame::Location.
Referenced by llvm::sampleprof::SampleContext::getHashCode(), and hash_value().
|
inlinestatic |
Definition at line 273 of file SampleProf.h.
References verifySecFlag().
Referenced by llvm::sampleprof::SampleProfileWriterExtBinaryBase::addNewSection(), getSecFlagsStr(), llvm::sampleprof::SampleProfileWriterExtBinaryBase::markSectionStart(), llvm::sampleprof::SampleProfileReaderExtBinaryBase::readImpl(), and llvm::sampleprof::SampleProfileReaderExtBinaryBase::readOneSection().
raw_ostream & llvm::sampleprof::operator<< | ( | raw_ostream & | OS, |
const FunctionSamples & | FS | ||
) |
Definition at line 195 of file SampleProf.cpp.
References OS.
raw_ostream & llvm::sampleprof::operator<< | ( | raw_ostream & | OS, |
const LineLocation & | Loc | ||
) |
Definition at line 111 of file SampleProf.cpp.
References OS, and llvm::sampleprof::LineLocation::print().
raw_ostream & llvm::sampleprof::operator<< | ( | raw_ostream & | OS, |
const SampleRecord & | Sample | ||
) |
Definition at line 148 of file SampleProf.cpp.
References OS, and llvm::sampleprof::SampleRecord::print().
|
inlinestatic |
Definition at line 265 of file SampleProf.h.
References verifySecFlag().
void llvm::sampleprof::sortFuncProfiles | ( | const SampleProfileMap & | ProfileMap, |
std::vector< NameFunctionSamples > & | SortedProfiles | ||
) |
Definition at line 201 of file SampleProf.cpp.
References A, assert(), B, I, and llvm::stable_sort().
Referenced by llvm::sampleprof::DefaultFunctionPruningStrategy::DefaultFunctionPruningStrategy(), llvm::sampleprof::SampleProfileReader::dump(), llvm::sampleprof::SampleProfileReader::dumpJson(), and llvm::sampleprof::SampleProfileWriter::writeFuncProfiles().
|
inlinestatic |
Definition at line 105 of file SampleProf.h.
References llvm::Format.
Referenced by llvm::sampleprof::SampleProfileReaderRawBinary::hasFormat(), llvm::sampleprof::SampleProfileReaderExtBinary::hasFormat(), and llvm::sampleprof::SampleProfileWriterBinary::writeMagicIdent().
|
inlinestatic |
Definition at line 122 of file SampleProf.h.
Referenced by llvm::sampleprof::SampleProfileReaderBinary::readMagicIdent(), and llvm::sampleprof::SampleProfileWriterBinary::writeMagicIdent().
|
inlinestatic |
Definition at line 230 of file SampleProf.h.
References llvm_unreachable, SecFuncMetadata, SecFuncOffsetTable, SecNameTable, and SecProfSummary.
Referenced by addSecFlag(), hasSecFlag(), and removeSecFlag().
const std::array<SmallVector<SecHdrTableEntry, 8>, NumOfLayout> llvm::sampleprof::ExtBinaryHdrLayoutTable |
Definition at line 227 of file SampleProfWriter.h.
Referenced by llvm::sampleprof::SampleProfileWriterExtBinaryBase::resetSecLayout().