Utilities for analyzing and applying memory profile information.

Types

Name

Description

AllMemProfData

Top‐level MemProf dataset used with YAML for now.

AllocationInfo

Allocation site with inline frame contents for temporary in‐memory use.

CallSiteInfo

Call site information with frame contents stored inline.

CallStack

Helper to iterate stack ids in memprof metadata or ThinLTO summaries.

CallStackIdConverter

Function object that returns a call stack for a given CallStackId.

CallStackLookupTrait

OnDiskChainedHashTable lookup trait for CallStackId to FrameId sequences.

CallStackRadixTreeBuilder

Builder that compresses call stacks into a serialized radix tree array.

CallStackTrie

Trie of profiled call‐stack contexts for one allocation call.

CallStackWriterTrait

OnDiskChainedHashTable writer trait for CallStackId to FrameId sequences.

CallerCalleePairExtractor

Extracts caller‐callee pairs from the call stack radix tree array.

DataAccessProfData

Encapsulates the data access profile data and the methods to operate on it. This class provides profile look‐up, serialization and deserialization.

DataAccessProfRecord

The data access profiles for a symbol.

Frame

Call frame for a dynamic allocation context, typically from a stack depot.

FrameIdConverter

Function object that returns a Frame for a given FrameId.

FrameLookupTrait

OnDiskChainedHashTable lookup trait for FrameId to Frame mappings.

FrameStat

Aggregate occurrence statistics for a single FrameId across call stacks.

FrameWriterTrait

OnDiskChainedHashTable writer trait for FrameId to Frame mappings.

GUIDHex64

Strong typedef for a 64‐bit MemProf function GUID in YAML.

GUIDMemProfRecordPair

Pair of a function GUID and its MemProf record for YAML I/O.

IndexedAllocationInfo

Allocation site that stores its call stack as a CallStackId.

IndexedCallSiteInfo

Call site information that stores frames by CallStackId.

IndexedCallstackIdConverter

Convenience wrapper around FrameIdConverter and CallStackIdConverter for tests.

IndexedMemProfData

Space‐optimized container for indexed MemProf profile data.

IndexedMemProfRecord

MemProf profile for one function, storing frames by identifier.

LineLocation

Source location of a call expressed as line offset plus column.

LinearCallStackIdConverter

Function object that returns a call stack stored in the profile array.

LinearFrameIdConverter

Function object that returns a Frame stored at an index into the profile.

MemProfReader

Reader for MemProf profile data populated from external sources.

MemProfRecord

MemProf profile for one function with frame contents stored inline.

MemProfSummary

Summary statistics for a MemProf profile.

MemProfSummaryBuilder

Builds aggregate MemProf summary statistics from allocation profile records.

PortableMemInfoBlock

Portable MemInfoBlock whose fields may be partially serialized by schema.

RawMemProfReader

MemProfReader that populates data from raw binary instrumentation profiles.

RecordLookupTrait

OnDiskChainedHashTable lookup trait for IndexedMemProfRecord entries.

RecordWriterTrait

OnDiskChainedHashTable writer trait for IndexedMemProfRecord entries.

SourceLocation

The location of data in the source code. Used by profile lookup API.

YAMLMemProfReader

MemProfReader that populates data from a YAML MemProf profile.

YamlDataAccessProfData

Owned YAML‐friendly view of memprof::DataAccessProfData.

Type Aliases

Name

Description

CallEdgeTy

Pair of a call‐site LineLocation and the callee function GUID.

CallStackId

Identifier indexing into the table of call stacks.

CallStackMap

Map from stack‐depot id to virtual addresses for each PC in a callstack.

ContextSizeTypePair

Pair of profiled context size data and its allocation type.

FrameId

Hash identifier for a unique call Frame.

LinearCallStackId

Dense linear index into the call stack array used by newer indexed formats.

LinearFrameId

Dense linear index into the frame array used by newer indexed formats.

LocToLocMap

Map from a profile source location to the matching location in the IR.

MemProfSchema

Ordered list of Meta field identifiers describing a MemInfoBlock schema.

SymbolHandle

Owning handle identifying a profiled data symbol.

SymbolHandleRef

Non‐owning handle identifying a profiled data symbol.

Enums

Name

Description

AnnotationKind

Eligibility of a global variable for section‐prefix annotation.

IndexedVersion

Versions of the indexed MemProf profile format.

Meta

Identifiers for fields stored in a PortableMemInfoBlock schema.

Functions

Name

Description

IsAnnotationOK

Returns true if the annotation kind of the global variable GV is AnnotationOK.

addAmbiguousAttribute

Adds an "ambiguous" memprof attribute to call with a matched allocation profile but that we haven't yet been able to disambiguate.

buildCallstackMetadata

Build callstack metadata from the provided list of call stack ids.

computeFrameHistogram

Compute a histogram of Frames in call stacks.

computeFullStackId

Generate a single hash id for a given callstack.

computeUndriftMap

Compute an undrifting map from profile locations to IR locations.

extractCallsFromIR

Extract all calls from the IR, keyed by caller GUID.

getAllocType

Return the allocation type for a given set of memory profile values.

getAllocTypeAttributeString

Returns the string to use in attributes with the given type.

getAnnotationKind

Returns the annotation kind of the global variable GV.

getFullSchema

Return the full schema of MemInfoBlock fields currently in use.

getGUID

Return the memprof GUID for FunctionName after LTO suffix canonicalization.

getHotColdSchema

Return the schema of fields used for hot/cold memory hinting.

getMIBAllocType

Returns the allocation type from an MIB metadata node.

getMIBStackNode

Returns the stack node from an MIB metadata node.

getMemprofOptionsSymbolDarwinLinkageName

Return the Darwin linkage name of the memprof default‐options string.

getMemprofOptionsSymbolName

Return the IR‐level name of the memprof default‐options string symbol.

hasSingleAllocType

True if the AllocTypes bitmask contains just a single type.

metadataIncludesAllContextSizeInfo

Whether the alloc memeprof metadata will include context size info for all MIBs.

metadataMayIncludeContextSizeInfo

Whether the alloc memprof metadata may include context size info for some MIBs (but possibly not all).

readMemProfSchema

Read a MemProfSchema from Buffer, advancing it past the schema bytes.

recordContextSizeInfoForAnalysis

Whether we need to record the context size info in the alloc trie used to build metadata.

removeAnyExistingAmbiguousAttribute

Removes any existing "ambiguous" memprof attribute. Called before we apply a specific allocation type such as "cold", "notcold", or "hot".

Variables

Name

Description

MaximumSupportedVersion

Newest indexed MemProf format version supported by this reader/writer.

MinimumSupportedVersion

Oldest indexed MemProf format version supported by this reader/writer.

Created with MrDocs