LLVM 22.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 | TypeCountMap = std::map<FunctionId, uint64_t> |
Key represents type of a C++ polymorphic class type by its vtable and value represents its counter. | |
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 | CallsiteTypeMap = std::map<LineLocation, TypeCountMap> |
using | LocToLocMap |
using | NameFunctionSamples = std::pair<hash_code, const FunctionSamples *> |
using | InlineCallStack = SmallVector<FunctionSamples *, 10> |
Variables | |
constexpr char | kVTableProfPrefix [] = "vtables " |
const std::array< SmallVector< SecHdrTableEntry, 8 >, NumOfLayout > | ExtBinaryHdrLayoutTable |
using llvm::sampleprof::BodySampleMap = std::map<LineLocation, SampleRecord> |
Definition at line 763 of file SampleProf.h.
using llvm::sampleprof::CallsiteSampleMap = std::map<LineLocation, FunctionSamplesMap> |
Definition at line 767 of file SampleProf.h.
using llvm::sampleprof::CallsiteTypeMap = std::map<LineLocation, TypeCountMap> |
Definition at line 768 of file SampleProf.h.
using llvm::sampleprof::FunctionSamplesMap = std::map<FunctionId, FunctionSamples> |
Definition at line 766 of file SampleProf.h.
using llvm::sampleprof::InlineCallStack = SmallVector<FunctionSamples *, 10> |
Definition at line 882 of file SampleProfReader.h.
Definition at line 769 of file SampleProf.h.
using llvm::sampleprof::NameFunctionSamples = std::pair<hash_code, const FunctionSamples *> |
Definition at line 1471 of file SampleProf.h.
Definition at line 536 of file SampleProf.h.
Definition at line 535 of file SampleProf.h.
using llvm::sampleprof::TypeCountMap = std::map<FunctionId, uint64_t> |
Key represents type of a C++ polymorphic class type by its vtable and value represents its counter.
TODO: The class name FunctionId should be renamed to SymbolId in a refactor change.
Definition at line 330 of file SampleProf.h.
Enumerator | |
---|---|
ContextNone | |
ContextWasInlined | |
ContextShouldBeInlined | |
ContextDuplicatedIntoBase |
Definition at line 487 of file SampleProf.h.
Enumerator | |
---|---|
UnknownContext | |
RawContext | |
SyntheticContext | |
InlinedContext | |
MergedContext |
Definition at line 478 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 886 of file SampleProfReader.h.
Enumerator | |
---|---|
SPF_None | |
SPF_Text | |
SPF_Compact_Binary | |
SPF_GCC | |
SPF_Ext_Binary | |
SPF_Binary |
Definition at line 96 of file SampleProf.h.
Enumerator | |
---|---|
SPL_None | |
SPL_Nest | |
SPL_Flat |
Definition at line 105 of file SampleProf.h.
|
strong |
Enumerator | |
---|---|
SecFlagInValid | |
SecFlagCompress | |
SecFlagFlat |
Definition at line 174 of file SampleProf.h.
|
strong |
Enumerator | |
---|---|
SecFlagInvalid | |
SecFlagIsProbeBased | |
SecFlagHasAttribute |
Definition at line 214 of file SampleProf.h.
|
strong |
Enumerator | |
---|---|
SecFlagInvalid | |
SecFlagOrdered |
Definition at line 220 of file SampleProf.h.
|
strong |
Enumerator | |
---|---|
SecFlagInValid | |
SecFlagMD5Name | |
SecFlagFixedLengthMD5 | |
SecFlagUniqSuffix |
Definition at line 184 of file SampleProf.h.
|
strong |
Definition at line 194 of file SampleProf.h.
Enumerator | |
---|---|
DefaultLayout | |
CtxSplitLayout | |
NumOfLayout |
Definition at line 30 of file SampleProfWriter.h.
Enumerator | |
---|---|
SecInValid | |
SecProfSummary | |
SecNameTable | |
SecProfileSymbolList | |
SecFuncOffsetTable | |
SecFuncMetadata | |
SecCSNameTable | |
SecFuncProfileFirst | |
SecLBRProfile |
Definition at line 123 of file SampleProf.h.
|
inlinestatic |
Definition at line 256 of file SampleProf.h.
References verifySecFlag().
Referenced by llvm::sampleprof::SampleProfileWriterExtBinaryBase::addSectionFlag(), 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 1426 of file SampleProf.h.
References llvm::GlobalValue::getGUIDAssumingExternalLinkage(), and llvm::sampleprof::FunctionSamples::UseMD5.
Referenced by llvm::sampleprof::FunctionSamples::findFunctionSamplesAt(), llvm::SampleContextTracker::getAllContextSamplesFor(), llvm::SampleContextTracker::getAllContextSamplesFor(), llvm::SampleContextTracker::getBaseSamplesFor(), and llvm::SampleContextTracker::getCalleeContextSamplesFor().
|
inlinestatic |
Definition at line 136 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::HashKeyMap< MapT, KeyT, ValueT, MapTArgs >::find(), llvm::sampleprof::SampleContext::getHashCode(), llvm::sampleprof::HashKeyMap< MapT, KeyT, ValueT, MapTArgs >::lookup(), llvm::sampleprof::HashKeyMap< MapT, KeyT, ValueT, MapTArgs >::try_emplace(), and llvm::sampleprof::HashKeyMap< MapT, KeyT, ValueT, MapTArgs >::try_emplace().
|
inlinestatic |
Definition at line 752 of file SampleProf.h.
|
inlinestatic |
Definition at line 531 of file SampleProf.h.
References llvm::sampleprof::SampleContextFrame::getHashCode().
|
inlinestatic |
Definition at line 272 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::MachineFunction::CallSiteInfo::CallSiteInfo(), llvm::IndexedInstrProf::ComputeHash(), llvm::MCPseudoProbeSections::emit(), extractNumericCGTypeId(), getCallStackHash(), getCallStackHashV0(), llvm::InstrProfSymtab::getFuncOrVarName(), llvm::InstrProfSymtab::getFuncOrVarNameIfDefined(), llvm::InstrProfSymtab::getGlobalVariable(), llvm::GlobalValue::getGUIDAssumingExternalLinkage(), 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 265 of file SampleProf.cpp.
raw_ostream & llvm::sampleprof::operator<< | ( | raw_ostream & | OS, |
const LineLocation & | Loc ) |
Definition at line 132 of file SampleProf.cpp.
|
inline |
Definition at line 756 of file SampleProf.h.
raw_ostream & llvm::sampleprof::operator<< | ( | raw_ostream & | OS, |
const SampleRecord & | Sample ) |
Definition at line 193 of file SampleProf.cpp.
References llvm::sampleprof::SampleRecord::print().
|
inline |
Definition at line 147 of file FunctionId.h.
|
inline |
Definition at line 135 of file FunctionId.h.
|
inline |
Definition at line 151 of file FunctionId.h.
|
inline |
Definition at line 155 of file FunctionId.h.
|
inlinestatic |
Definition at line 264 of file SampleProf.h.
References verifySecFlag().
std::error_code llvm::sampleprof::serializeTypeMap | ( | const TypeCountMap & | Map, |
const MapVector< FunctionId, uint32_t > & | NameTable, | ||
raw_ostream & | OS ) |
Write Map
to the output stream.
Keys are linearized using NameTable
and written as ULEB128. Values are written as ULEB128 as well.
Definition at line 52 of file SampleProf.cpp.
References llvm::encodeULEB128(), llvm::MapVector< KeyT, ValueT, MapType, VectorType >::end(), llvm::MapVector< KeyT, ValueT, MapType, VectorType >::find(), llvm::success, and llvm::truncated_name_table.
Referenced by llvm::sampleprof::SampleProfileWriterBinary::writeCallsiteVTableProf().
void llvm::sampleprof::sortFuncProfiles | ( | const SampleProfileMap & | ProfileMap, |
std::vector< NameFunctionSamples > & | SortedProfiles ) |
Definition at line 271 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 111 of file SampleProf.h.
References llvm::Format, and SPF_Binary.
Referenced by llvm::sampleprof::SampleProfileReaderExtBinary::hasFormat(), llvm::sampleprof::SampleProfileReaderRawBinary::hasFormat(), and llvm::sampleprof::SampleProfileWriterBinary::writeMagicIdent().
|
inlinestatic |
Definition at line 118 of file SampleProf.h.
Referenced by llvm::sampleprof::SampleProfileReaderBinary::readMagicIdent(), and llvm::sampleprof::SampleProfileWriterBinary::writeMagicIdent().
|
inlinestatic |
Definition at line 229 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 245 of file SampleProfWriter.h.
Referenced by llvm::sampleprof::SampleProfileWriterExtBinaryBase::resetSecLayout().
|
constexpr |
Definition at line 94 of file SampleProf.h.
Referenced by ParseLine(), and llvm::sampleprof::SampleProfileWriterText::writeSample().