|
LLVM 24.0.0git
|
Classes | |
| class | DefaultFunctionPruningStrategy |
| struct | EytzingerModeT |
| class | EytzingerSampleProfileNameTable |
| 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... | |
| class | MD5SampleProfileNameTable |
| 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 | 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... | |
| struct | SecHdrTableEntry |
| class | StringSampleProfileNameTable |
Typedefs | |
| using | TypeCountMap = SortedVectorMap<FunctionId, uint64_t, 0> |
| 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 = SortedVectorMap<LineLocation, SampleRecord, 0> |
| using | FunctionSamplesMap = std::map<FunctionId, FunctionSamples> |
| using | CallsiteSampleMap = std::map<LineLocation, FunctionSamplesMap> |
| using | CallsiteTypeMap = SortedVectorMap<LineLocation, TypeCountMap, 0> |
| 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 EytzingerModeT | EytzingerMode {} |
| const std::array< SmallVector< SecHdrTableEntry, 8 >, NumOfLayout > | ExtBinaryHdrLayoutTable |
Definition at line 813 of file SampleProf.h.
| using llvm::sampleprof::CallsiteSampleMap = std::map<LineLocation, FunctionSamplesMap> |
Definition at line 817 of file SampleProf.h.
Definition at line 818 of file SampleProf.h.
| using llvm::sampleprof::FunctionSamplesMap = std::map<FunctionId, FunctionSamples> |
Definition at line 816 of file SampleProf.h.
| using llvm::sampleprof::InlineCallStack = SmallVector<FunctionSamples *, 10> |
Definition at line 1194 of file SampleProfReader.h.
Definition at line 819 of file SampleProf.h.
| using llvm::sampleprof::NameFunctionSamples = std::pair<hash_code, const FunctionSamples *> |
Definition at line 1567 of file SampleProf.h.
Definition at line 587 of file SampleProf.h.
Definition at line 586 of file SampleProf.h.
| using llvm::sampleprof::TypeCountMap = SortedVectorMap<FunctionId, uint64_t, 0> |
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 375 of file SampleProf.h.
| Enumerator | |
|---|---|
| ContextNone | |
| ContextWasInlined | |
| ContextShouldBeInlined | |
| ContextDuplicatedIntoBase | |
Definition at line 532 of file SampleProf.h.
| Enumerator | |
|---|---|
| UnknownContext | |
| RawContext | |
| SyntheticContext | |
| InlinedContext | |
| MergedContext | |
Definition at line 523 of file SampleProf.h.
|
strong |
| Enumerator | |
|---|---|
| Nested | |
| Flat | |
| Inlinee | |
| NumSpans | |
Definition at line 217 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 1198 of file SampleProfReader.h.
| Enumerator | |
|---|---|
| SPF_None | |
| SPF_Text | |
| SPF_Compact_Binary | |
| SPF_GCC | |
| SPF_Ext_Binary | |
| SPF_Binary | |
Definition at line 99 of file SampleProf.h.
| Enumerator | |
|---|---|
| SPL_None | |
| SPL_Nest | |
| SPL_Flat | |
Definition at line 108 of file SampleProf.h.
|
strong |
| Enumerator | |
|---|---|
| SecFlagInValid | |
| SecFlagCompress | |
| SecFlagFlat | |
Definition at line 194 of file SampleProf.h.
|
strong |
| Enumerator | |
|---|---|
| SecFlagInvalid | |
| SecFlagIsProbeBased | |
| SecFlagHasAttribute | |
Definition at line 243 of file SampleProf.h.
|
strong |
| Enumerator | |
|---|---|
| SecFlagInvalid | |
| SecFlagOrdered | |
| SecFlagEytzinger | |
Definition at line 249 of file SampleProf.h.
|
strong |
| Enumerator | |
|---|---|
| SecFlagInValid | |
| SecFlagMD5Name | |
| SecFlagFixedLengthMD5 | |
| SecFlagUniqSuffix | |
| SecFlagEytzinger | |
Definition at line 204 of file SampleProf.h.
|
strong |
| Enumerator | |
|---|---|
| SecFlagInValid | |
| SecFlagMD5 | |
Definition at line 219 of file SampleProf.h.
|
strong |
Definition at line 223 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 143 of file SampleProf.h.
|
inlinestatic |
Definition at line 292 of file SampleProf.h.
References uint64_t, and verifySecFlag().
Referenced by llvm::sampleprof::SampleProfileWriterExtBinaryBase::addSectionFlag(), and llvm::sampleprof::SampleProfileWriterExtBinaryBase::setToCompressAllSections().
Definition at line 132 of file SampleProf.h.
References LatestVersion, MinSupportedVersion, uint64_t, 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 1522 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 156 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 uint64_t.
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 802 of file SampleProf.h.
|
inlinestatic |
Definition at line 582 of file SampleProf.h.
References llvm::sampleprof::SampleContextFrame::getHashCode().
|
inlinestatic |
Definition at line 308 of file SampleProf.h.
References uint64_t, and verifySecFlag().
Referenced by llvm::sampleprof::SampleProfileWriterExtBinaryBase::addNewSection(), getSecFlagsStr(), llvm::sampleprof::SampleProfileWriterExtBinaryBase::markSectionStart(), llvm::sampleprof::SampleProfileReaderExtBinaryBase::readImpl(), llvm::sampleprof::SampleProfileReaderExtBinaryBase::readOneSection(), and llvm::sampleprof::SampleProfileWriterExtBinaryBase::writeOneSection().
|
inline |
Definition at line 167 of file FunctionId.h.
References uint64_t.
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 262 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 806 of file SampleProf.h.
| raw_ostream & llvm::sampleprof::operator<< | ( | raw_ostream & | OS, |
| const SampleRecord & | Sample ) |
Definition at line 196 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 300 of file SampleProf.h.
References uint64_t, and 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 268 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 114 of file SampleProf.h.
References llvm::Format, SPF_Binary, and uint64_t.
Referenced by llvm::sampleprof::SampleProfileReaderExtBinary::hasFormat(), llvm::sampleprof::SampleProfileReaderRawBinary::hasFormat(), and llvm::sampleprof::SampleProfileWriterBinary::writeMagicIdent().
|
inlinestatic |
Definition at line 138 of file SampleProf.h.
References inline, SPVersion(), and uint64_t.
Referenced by SPVersion().
|
inlinestatic |
Definition at line 261 of file SampleProf.h.
References llvm_unreachable, SecFuncMetadata, SecFuncOffsetTable, SecNameTable, SecProfileSymbolList, and SecProfSummary.
Referenced by addSecFlag(), hasSecFlag(), and removeSecFlag().
|
staticconstexpr |
Definition at line 126 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 253 of file SampleProfWriter.h.
Referenced by llvm::sampleprof::SampleProfileWriterExtBinaryBase::resetSecLayout().
|
inlineconstexpr |
Definition at line 978 of file SampleProfReader.h.
Referenced by llvm::sampleprof::SampleProfileReaderExtBinaryBase::readEytzingerFuncOffsetTable().
|
inlineconstexpr |
Definition at line 977 of file SampleProfReader.h.
Referenced by llvm::sampleprof::SampleProfileReaderExtBinaryBase::readLegacyFuncOffsetTable(), and llvm::sampleprof::SampleProfileReaderExtBinaryBase::SampleProfileReaderExtBinaryBase().
|
constexpr |
Definition at line 97 of file SampleProf.h.
Referenced by ParseLine(), and llvm::sampleprof::SampleProfileWriterText::writeSample().
|
staticconstexpr |
Definition at line 129 of file SampleProf.h.
Referenced by formatVersionIsSupported().
|
staticconstexpr |
Definition at line 122 of file SampleProf.h.
Referenced by formatVersionIsSupported().