llvm::sampleprof

Sample profile data structures and helpers.

Types

NameDescription
DefaultFunctionPruningStrategy Default pruning strategy that drops functions with the fewest samples.
EytzingerModeT Tag type selecting Eytzinger parallel-array storage for SampleProfileFuncOffsetTable.
EytzingerSampleProfileNameTable Name table using Eytzinger-ordered MD5 spans for nested and flat names.
FunctionId Represents a function name from a sample profile as a string or MD5 hash.
FunctionPruningStrategy Strategy for dropping functions when writing a size-limited profile.
FunctionSamples Representation of the samples collected for a function.
HashKeyMap Map that stores values under the hash of the original key.
InMemoryModeT Tag type selecting in-memory DenseMap storage for SampleProfileFuncOffsetTable.
LazySampleProfileNameTable Name table that lazily reads fixed-length MD5 hashes from a memory buffer.
LineLocation Represents the relative location of an instruction.
MD5SampleProfileNameTable Name table backed by an eagerly loaded vector of MD5 FunctionIds.
ProfileConverter Helper class for converting between sample profile layouts.
ProfileSymbolList Records function symbols present in the binary that produced the profile.
ProfiledCallGraph Call graph built from sample profiles for IPO analyses.
ProfiledCallGraphEdge Directed call-graph edge weighted by sample profile data.
ProfiledCallGraphNode Call-graph node representing a profiled function and its outgoing edges.
SampleContext Calling context, leaf function, and state for a FunctionSamples profile.
SampleContextFrame Represents a context frame with profile function and line location.
SampleContextFrameHash Hash functor for SampleContextFrameVector.
SampleContextTrimmer Helper that trims and merges cold context-sensitive profiles.
SampleProfileFuncOffsetTable A unified wrapper representing the function offset table.
SampleProfileMap Map from MD5 context hash to FunctionSamples with SampleContext-friendly API.
SampleProfileNameTable Unified read-only name table for sample profile function identifiers.
SampleProfileReader Sample-based profile reader.
SampleProfileReaderBinary Sample profile reader for binary profile formats.
SampleProfileReaderExtBinary Sample profile reader for the common extensible binary format sections.
SampleProfileReaderExtBinaryBase Base reader for sample profiles in the extensible binary format.
SampleProfileReaderGCC Sample profile reader for GCC AutoFDO (GCOV-based) profiles.
SampleProfileReaderItaniumRemapper Remaps sample profile symbol names using Itanium component equivalences.
SampleProfileReaderRawBinary Sample profile reader for the raw (non-extensible) binary format.
SampleProfileReaderText Sample profile reader for the text profile format.
SampleProfileWriter Sample-based profile writer. Base class.
SampleProfileWriterBinary Sample-based profile writer (binary format).
SampleProfileWriterExtBinary Writer for the standard extensible binary sample profile format.
SampleProfileWriterExtBinaryBase Base writer for the extensible binary sample profile format.
SampleProfileWriterRawBinary Sample-based profile writer for the raw binary format.
SampleProfileWriterText Sample-based profile writer (text format).
SampleRecord Representation of a single sample record.
SecHdrTableEntry One entry in the extensible binary section header table.
StringSampleProfileNameTable Name table backed by an eagerly loaded vector of string FunctionIds.

Type Aliases

NameDescription
BodySampleMap Map from line location to body sample record.
CallsiteSampleMap Map from callsite location to nested callee FunctionSamples.
CallsiteTypeMap Map from callsite location to vtable/type sample counts.
FunctionSamplesMap Map from callee function id to nested FunctionSamples.
InlineCallStack Call stack of nested FunctionSamples used while reading GCC AFDO profiles.
LocToLocMap Map remapping IR locations to matched profile locations.
NameFunctionSamples Pair of a profile key hash and a FunctionSamples pointer.
SampleContextFrameVector Growable vector of SampleContextFrame values.
SampleContextFrames Immutable view of a sequence of SampleContextFrame values.
TypeCountMap Map from C++ polymorphic class type (by vtable) to its sample counter.

Enums

NameDescription
ContextAttributeMask Attribute of context associated with FunctionSamples.
ContextStateMask State of context associated with FunctionSamples.
EytzingerSpan Span identifiers for an Eytzinger-layout name table.
FSDiscriminatorPass Flow-sensitive (FS) discriminator pass used when encoding discriminators.
HistType GCC histogram kinds; only call-target histograms are needed here.
SampleProfileFormat On-disk sample profile format identifiers.
SampleProfileLayout Layout of nested versus flattened sample profiles.
SecCommonFlags Flags common to all extensible binary sample profile sections.
SecFuncMetadataFlags Flags specific to the function metadata section.
SecFuncOffsetFlags Flags specific to the function offset table section.
SecNameTableFlags Flags specific to the name table section.
SecProfSummaryFlags Flags specific to the profile summary section.
SecProfileSymbolListFlags Flags specific to the profile symbol list section.
SecType Section types used by extensible binary sample profile readers/writers.
SectionLayout Section ordering layouts for extensible binary sample profiles.

Functions

NameDescription
MD5Hash Return the MD5 hash code of Obj.
addSecFlag Set Flag on section header Entry.
hasSecFlag Return true if section header Entry has Flag set.
hash_value Return a hash value for Obj suitable for LLVM hashing utilities.
removeSecFlag Clear Flag on section header Entry.
serializeTypeMap Write Map to the output stream. Keys are linearized using NameTable and written as ULEB128. Values are written as ULEB128 as well.
sortFuncProfiles Sort profiles from ProfileMap into SortedProfiles by name hash.
verifySecFlag Assert that Flag is legal for section Type.
operator<< Stream insertion operators
operator== Return true if LHS and RHS are equal.
operator!= Return true if LHS and RHS are not equal.
operator< Return true if LHS is ordered before RHS.
operator<= Return true if LHS is ordered before or equal to RHS.
operator> Return true if LHS is ordered after RHS.
operator>= Return true if LHS is ordered after or equal to RHS.

Variables

NameDescription
ExtBinaryHdrLayoutTable Section header layouts for each extensible binary SectionLayout.
EytzingerMode Tag value selecting Eytzinger mode for SampleProfileFuncOffsetTable.
InMemoryMode Tag value selecting in-memory mode for SampleProfileFuncOffsetTable.
kVTableProfPrefix Prefix used when encoding vtable type profiles in name tables.