Tracker that manages context‐sensitive profiles for CSSPGO.

Synopsis

Declared in <llvm/Transforms/IPO/SampleContextTracker.h>

class SampleContextTracker;

Description

Profile tracker that manages profiles and its associated context. It provides interfaces used by sample profile loader to query context profile or base profile for given function or location; it also manages context tree manipulation that is needed to accommodate inline decisions so we have accurate post‐inline profile for functions. Internally context profiles are organized in a trie, with each node representing profile for specific calling context and the context is identified by path from root to the node.

Types

Name

Description

Iterator

Forward iterator over context trie nodes in breadth‐first order.

Type Aliases

Name

Description

ContextSamplesTy

Vector of context‐sensitive function sample profiles.

Member Functions

Name

Description

SampleContextTracker [constructor]

Constructors

begin

Return an iterator to the first context trie node.

createContextLessProfileMap

Create a merged context‐less profile map in ContextLessProfiles.

dump

Dump the internal context profile trie.

end

Return an iterator past the last context trie node.

getAllContextSamplesFor

getAllContextSamplesFor overloads

getBaseSamplesFor

getBaseSamplesFor overloads

getCalleeContextSamplesFor

Query context profile for a specific callee at a callsite.

getContextFor

Retrieve the context trie node for Context.

getContextNodeForProfile

Return the trie node associated with profile FSamples, or null.

getContextSamplesFor

getContextSamplesFor overloads

getContextString

getContextString overloads

getFuncNameFor

Get the real function name for trie node Node.

getFuncToCtxtProfiles

Return the map from function name to context profiles.

getIndirectCalleeContextSamplesFor

Get samples for indirect call targets at the callsite given by DIL.

getOrCreateContextPath

Return the trie node for Context, creating the path when allowed.

getRootContext

Return the root node of the context trie.

markContextSamplesInlined

Mark context profile InlinedSamples as inlined.

populateFuncToCtxtMap

Populate the FuncToCtxtProfiles map after the trie is built.

promoteMergeContextSamplesTree

Promote and merge the context samples tree for callee CalleeName at Inst.

Created with MrDocs