LLVM 20.0.0git
|
Classes | |
class | DefaultFunctionPruningStrategy |
class | FunctionId |
This class represents a function that is read from a sample profile. More... | |
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... | |
class | HashKeyMap |
This class is a wrapper to associative container MapT<KeyT, ValueT> using the hash value of the original key as the new key. 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 | SampleProfileMap |
This class provides operator overloads to the map container using MD5 as the key type, so that existing code can still work in most cases using SampleContext as key. 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< FunctionId, FunctionSamples > |
using | CallsiteSampleMap = std::map< LineLocation, FunctionSamplesMap > |
using | LocToLocMap = std::unordered_map< LineLocation, LineLocation, LineLocationHash > |
using | NameFunctionSamples = std::pair< hash_code, const FunctionSamples * > |
using | InlineCallStack = SmallVector< FunctionSamples *, 10 > |
Variables | |
const std::array< SmallVector< SecHdrTableEntry, 8 >, NumOfLayout > | ExtBinaryHdrLayoutTable |
using llvm::sampleprof::BodySampleMap = typedef std::map<LineLocation, SampleRecord> |
Definition at line 732 of file SampleProf.h.
using llvm::sampleprof::CallsiteSampleMap = typedef std::map<LineLocation, FunctionSamplesMap> |
Definition at line 736 of file SampleProf.h.
using llvm::sampleprof::FunctionSamplesMap = typedef std::map<FunctionId, FunctionSamples> |
Definition at line 735 of file SampleProf.h.
using llvm::sampleprof::InlineCallStack = typedef SmallVector<FunctionSamples *, 10> |
Definition at line 866 of file SampleProfReader.h.
using llvm::sampleprof::LocToLocMap = typedef std::unordered_map<LineLocation, LineLocation, LineLocationHash> |
Definition at line 737 of file SampleProf.h.
using llvm::sampleprof::NameFunctionSamples = typedef std::pair<hash_code, const FunctionSamples *> |
Definition at line 1344 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.
Enumerator | |
---|---|
ContextNone | |
ContextWasInlined | |
ContextShouldBeInlined | |
ContextDuplicatedIntoBase |
Definition at line 456 of file SampleProf.h.
Enumerator | |
---|---|
UnknownContext | |
RawContext | |
SyntheticContext | |
InlinedContext | |
MergedContext |
Definition at line 447 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 870 of file SampleProfReader.h.
Enumerator | |
---|---|
SPF_None | |
SPF_Text | |
SPF_Compact_Binary | |
SPF_GCC | |
SPF_Ext_Binary | |
SPF_Binary |
Definition at line 91 of file SampleProf.h.
Enumerator | |
---|---|
SPL_None | |
SPL_Nest | |
SPL_Flat |
Definition at line 100 of file SampleProf.h.
|
strong |
Enumerator | |
---|---|
SecFlagInValid | |
SecFlagCompress | |
SecFlagFlat |
Definition at line 169 of file SampleProf.h.
|
strong |
Enumerator | |
---|---|
SecFlagInvalid | |
SecFlagIsProbeBased | |
SecFlagHasAttribute |
Definition at line 206 of file SampleProf.h.
|
strong |
Enumerator | |
---|---|
SecFlagInvalid | |
SecFlagOrdered |
Definition at line 212 of file SampleProf.h.
|
strong |
Enumerator | |
---|---|
SecFlagInValid | |
SecFlagMD5Name | |
SecFlagFixedLengthMD5 | |
SecFlagUniqSuffix |
Definition at line 179 of file SampleProf.h.
|
strong |
Definition at line 189 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 118 of file SampleProf.h.
|
inlinestatic |
Definition at line 248 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 1299 of file SampleProf.h.
References llvm::GlobalValue::getGUID(), Name, and llvm::sampleprof::FunctionSamples::UseMD5.
Referenced by llvm::sampleprof::FunctionSamples::findFunctionSamplesAt(), llvm::SampleContextTracker::getAllContextSamplesFor(), llvm::SampleContextTracker::getBaseSamplesFor(), and llvm::SampleContextTracker::getCalleeContextSamplesFor().
|
inlinestatic |
Definition at line 131 of file SampleProf.h.
References SecCSNameTable, SecFuncMetadata, SecFuncOffsetTable, SecInValid, SecLBRProfile, SecNameTable, SecProfileSymbolList, and SecProfSummary.
Referenced by llvm::sampleprof::SampleProfileReaderExtBinaryBase::dumpSectionInfo().
|
inline |
Definition at line 171 of file FunctionId.h.
References llvm::sampleprof::FunctionId::getHashCode().
Referenced by llvm::sampleprof::HashKeyMap< MapT, KeyT, ValueT, MapTArgs >::count(), llvm::sampleprof::HashKeyMap< MapT, KeyT, ValueT, MapTArgs >::find(), llvm::sampleprof::SampleContext::getHashCode(), llvm::sampleprof::HashKeyMap< MapT, KeyT, ValueT, MapTArgs >::lookup(), and llvm::sampleprof::HashKeyMap< MapT, KeyT, ValueT, MapTArgs >::try_emplace().
|
inlinestatic |
Definition at line 721 of file SampleProf.h.
References llvm::sampleprof::SampleContext::getHashCode().
|
inlinestatic |
Definition at line 500 of file SampleProf.h.
References llvm::sampleprof::SampleContextFrame::getHashCode().
|
inlinestatic |
Definition at line 264 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().
|
inline |
Definition at line 167 of file FunctionId.h.
References llvm::sampleprof::FunctionId::getHashCode().
Referenced by llvm::IndexedInstrProf::ComputeHash(), llvm::MCPseudoProbeSections::emit(), getCallStackHash(), getCallStackHashV0(), llvm::InstrProfSymtab::getFuncOrVarName(), llvm::InstrProfSymtab::getFuncOrVarNameIfDefined(), llvm::InstrProfSymtab::getGlobalVariable(), llvm::GlobalValue::getGUID(), llvm::sampleprof::FunctionId::getHashCode(), and llvm::sampleprof::SampleProfileReaderExtBinaryBase::readFuncProfiles().
|
inline |
Definition at line 139 of file FunctionId.h.
|
inline |
Definition at line 143 of file FunctionId.h.
|
inline |
Definition at line 159 of file FunctionId.h.
raw_ostream & llvm::sampleprof::operator<< | ( | raw_ostream & | OS, |
const FunctionSamples & | FS | ||
) |
Definition at line 196 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().
|
inline |
Definition at line 725 of file SampleProf.h.
References OS, and llvm::sampleprof::SampleContext::toString().
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().
|
inline |
Definition at line 147 of file FunctionId.h.
|
inline |
Definition at line 135 of file FunctionId.h.
References LHS, llvm::operator==(), and RHS.
|
inline |
Definition at line 151 of file FunctionId.h.
|
inline |
Definition at line 155 of file FunctionId.h.
|
inlinestatic |
Definition at line 256 of file SampleProf.h.
References verifySecFlag().
void llvm::sampleprof::sortFuncProfiles | ( | const SampleProfileMap & | ProfileMap, |
std::vector< NameFunctionSamples > & | SortedProfiles | ||
) |
Definition at line 202 of file SampleProf.cpp.
References A, 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 106 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 113 of file SampleProf.h.
Referenced by llvm::sampleprof::SampleProfileReaderBinary::readMagicIdent(), and llvm::sampleprof::SampleProfileWriterBinary::writeMagicIdent().
|
inlinestatic |
Definition at line 221 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 237 of file SampleProfWriter.h.
Referenced by llvm::sampleprof::SampleProfileWriterExtBinaryBase::resetSecLayout().