|
LLVM 24.0.0git
|
Classes | |
| class | DefaultFunctionPruningStrategy |
| class | EagerSampleProfileNameTable |
| class | EytzingerSampleProfileNameTable |
| class | FuncOffsetHashTableInfo |
| Trait class for reading the on-disk function offset hash table mapping function name GUIDs to their offsets in the SecLBRProfile section. More... | |
| class | FuncOffsetHashTableWriterInfo |
| Trait class for writing the on-disk function offset hash table mapping function name GUIDs to their offsets in the SecLBRProfile section. More... | |
| 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 | InMemoryModeT |
| Tags to select the initialization mode of SampleProfileFuncOffsetTable. More... | |
| class | LazySampleProfileNameTable |
| struct | LineLocation |
| Represents the relative location of an instruction. More... | |
| struct | OnDiskModeT |
| 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 | SampleProfileFuncOffsetTable |
| A unified wrapper representing the function offset table. 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 | SampleProfileNameSet |
| A helper class that wraps a local set of string names from NameTable. More... | |
| class | SampleProfileNameTable |
| Sample-based profile reader. More... | |
| class | SampleProfileReader |
| 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 = DenseMap<LineLocation, LineLocation> |
| using | NameFunctionSamples = std::pair<hash_code, const FunctionSamples *> |
| using | InlineCallStack = SmallVector<FunctionSamples *, 10> |
Variables | |
| constexpr char | kVTableProfPrefix [] = "vtables " |
| static constexpr uint64_t | MinSupportedVersion = 103 |
| static constexpr uint64_t | DefaultVersion = 103 |
| static constexpr uint64_t | LatestVersion = 104 |
| constexpr InMemoryModeT | InMemoryMode {} |
| constexpr OnDiskModeT | OnDiskMode {} |
| const std::array< SmallVector< SecHdrTableEntry, 8 >, NumOfLayout > | ExtBinaryHdrLayoutTable |
| using llvm::sampleprof::BodySampleMap = std::map<LineLocation, SampleRecord> |
Definition at line 802 of file SampleProf.h.
| using llvm::sampleprof::CallsiteSampleMap = std::map<LineLocation, FunctionSamplesMap> |
Definition at line 806 of file SampleProf.h.
| using llvm::sampleprof::CallsiteTypeMap = std::map<LineLocation, TypeCountMap> |
Definition at line 807 of file SampleProf.h.
| using llvm::sampleprof::FunctionSamplesMap = std::map<FunctionId, FunctionSamples> |
Definition at line 805 of file SampleProf.h.
| using llvm::sampleprof::InlineCallStack = SmallVector<FunctionSamples *, 10> |
Definition at line 1124 of file SampleProfReader.h.
Definition at line 808 of file SampleProf.h.
| using llvm::sampleprof::NameFunctionSamples = std::pair<hash_code, const FunctionSamples *> |
Definition at line 1522 of file SampleProf.h.
Definition at line 576 of file SampleProf.h.
Definition at line 575 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 369 of file SampleProf.h.
| Enumerator | |
|---|---|
| ContextNone | |
| ContextWasInlined | |
| ContextShouldBeInlined | |
| ContextDuplicatedIntoBase | |
Definition at line 521 of file SampleProf.h.
| Enumerator | |
|---|---|
| UnknownContext | |
| RawContext | |
| SyntheticContext | |
| InlinedContext | |
| MergedContext | |
Definition at line 512 of file SampleProf.h.
|
strong |
| Enumerator | |
|---|---|
| CS | |
| Flat | |
| Inlinee | |
| NumSpans | |
Definition at line 215 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 1128 of file SampleProfReader.h.
| Enumerator | |
|---|---|
| SPF_None | |
| SPF_Text | |
| SPF_Compact_Binary | |
| SPF_GCC | |
| SPF_Ext_Binary | |
| SPF_Binary | |
Definition at line 97 of file SampleProf.h.
| Enumerator | |
|---|---|
| SPL_None | |
| SPL_Nest | |
| SPL_Flat | |
Definition at line 106 of file SampleProf.h.
|
strong |
| Enumerator | |
|---|---|
| SecFlagInValid | |
| SecFlagCompress | |
| SecFlagFlat | |
Definition at line 192 of file SampleProf.h.
|
strong |
| Enumerator | |
|---|---|
| SecFlagInvalid | |
| SecFlagIsProbeBased | |
| SecFlagHasAttribute | |
Definition at line 241 of file SampleProf.h.
|
strong |
| Enumerator | |
|---|---|
| SecFlagInvalid | |
| SecFlagOrdered | |
Definition at line 247 of file SampleProf.h.
|
strong |
| Enumerator | |
|---|---|
| SecFlagInValid | |
| SecFlagMD5Name | |
| SecFlagFixedLengthMD5 | |
| SecFlagUniqSuffix | |
| SecFlagEytzinger | |
Definition at line 202 of file SampleProf.h.
|
strong |
| Enumerator | |
|---|---|
| SecFlagInValid | |
| SecFlagMD5 | |
Definition at line 217 of file SampleProf.h.
|
strong |
Definition at line 221 of file SampleProf.h.
| Enumerator | |
|---|---|
| DefaultLayout | |
| CtxSplitLayout | |
| NumOfLayout | |
Definition at line 31 of file SampleProfWriter.h.
| Enumerator | |
|---|---|
| SecInValid | |
| SecProfSummary | |
| SecNameTable | |
| SecProfileSymbolList | |
| SecFuncOffsetTable | |
| SecFuncMetadata | |
| SecCSNameTable | |
| SecFuncProfileFirst | |
| SecLBRProfile | |
Definition at line 141 of file SampleProf.h.
|
inlinestatic |
Definition at line 286 of file SampleProf.h.
References verifySecFlag().
Referenced by llvm::sampleprof::SampleProfileWriterExtBinaryBase::addSectionFlag(), llvm::sampleprof::SampleProfileWriterExtBinaryBase::addSectionFlag(), and llvm::sampleprof::SampleProfileWriterExtBinaryBase::setToCompressAllSections().
Definition at line 130 of file SampleProf.h.
References LatestVersion, MinSupportedVersion, and llvm::Version.
Referenced by llvm::sampleprof::SampleProfileWriter::create(), llvm::sampleprof::SampleProfileReaderBinary::readMagicIdent(), and llvm::sampleprof::SampleProfileWriter::setFormatVersion().
|
inlinestatic |
Get the proper representation of a string according to whether the current Format uses MD5 to represent the string.
Definition at line 1477 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 154 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.
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 791 of file SampleProf.h.
|
inlinestatic |
Definition at line 571 of file SampleProf.h.
References llvm::sampleprof::SampleContextFrame::getHashCode().
|
inlinestatic |
Definition at line 302 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.
Referenced by llvm::MachineFunction::CallSiteInfo::CallSiteInfo(), llvm::sampleprof::ProfileSymbolList::collectGUIDs(), llvm::IndexedInstrProf::ComputeHash(), llvm::sampleprof::ProfileSymbolList::contains(), dumpInlineCallStack(), llvm::MCPseudoProbeSections::emit(), extractNumericCGTypeId(), getCallStackHash(), getCallStackHashV0(), llvm::InstrProfSymtab::getFuncOrVarName(), llvm::InstrProfSymtab::getFuncOrVarNameIfDefined(), llvm::InstrProfSymtab::getGlobalVariable(), llvm::GlobalValue::getGUIDAssumingExternalLinkage(), llvm::sampleprof::FunctionId::getHashCode(), getStringContentHash(), 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 267 of file SampleProf.cpp.
| raw_ostream & llvm::sampleprof::operator<< | ( | raw_ostream & | OS, |
| const LineLocation & | Loc ) |
Definition at line 134 of file SampleProf.cpp.
|
inline |
Definition at line 795 of file SampleProf.h.
| raw_ostream & llvm::sampleprof::operator<< | ( | raw_ostream & | OS, |
| const SampleRecord & | Sample ) |
Definition at line 195 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 294 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 54 of file SampleProf.cpp.
References llvm::encodeULEB128(), llvm::MapVector< KeyT, ValueT, MapType, VectorType, N >::end(), llvm::MapVector< KeyT, ValueT, MapType, VectorType, N >::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 273 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 112 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 136 of file SampleProf.h.
References inline, and SPVersion().
Referenced by SPVersion().
|
inlinestatic |
Definition at line 256 of file SampleProf.h.
References llvm_unreachable, SecFuncMetadata, SecFuncOffsetTable, SecNameTable, SecProfileSymbolList, and SecProfSummary.
Referenced by addSecFlag(), hasSecFlag(), and removeSecFlag().
|
staticconstexpr |
Definition at line 124 of file SampleProf.h.
Referenced by llvm::sampleprof::SampleProfileWriter::create(), and getExtensionVersion().
| const std::array<SmallVector<SecHdrTableEntry, 8>, NumOfLayout> llvm::sampleprof::ExtBinaryHdrLayoutTable |
Definition at line 252 of file SampleProfWriter.h.
Referenced by llvm::sampleprof::SampleProfileWriterExtBinaryBase::resetSecLayout().
|
inlineconstexpr |
Definition at line 926 of file SampleProfReader.h.
Referenced by llvm::sampleprof::SampleProfileReaderExtBinaryBase::readFuncOffsetTable(), and llvm::sampleprof::SampleProfileReaderExtBinaryBase::SampleProfileReaderExtBinaryBase().
|
constexpr |
Definition at line 95 of file SampleProf.h.
Referenced by ParseLine(), and llvm::sampleprof::SampleProfileWriterText::writeSample().
|
staticconstexpr |
Definition at line 127 of file SampleProf.h.
Referenced by formatVersionIsSupported().
|
staticconstexpr |
Definition at line 120 of file SampleProf.h.
Referenced by formatVersionIsSupported().
|
inlineconstexpr |
Definition at line 927 of file SampleProfReader.h.