llvm::SampleProfileSummaryBuilder

Builder that constructs a ProfileSummary from sample profile data.

Synopsis

Declared in <llvm/ProfileData/ProfileCommon.h>

class SampleProfileSummaryBuilder final
    : public ProfileSummaryBuilder

Base Classes

NameDescription
ProfileSummaryBuilderBase builder that accumulates profile counts and computes a ProfileSummary.

Member Functions

NameDescription
SampleProfileSummaryBuilder [constructor]Construct a builder that will compute summary entries for Cutoffs.
addRecord Incorporate sample counts from a function's sample profile.
computeSummaryForProfiles Compute a profile summary from a map of function sample profiles.
getSummary Compute and return the sample profile summary from recorded samples.

Static Member Functions

NameDescription
getColdCountThreshold Return the maximum count treated as cold for the given detailed summary.
getEntryForPercentile Find the summary entry for a desired percentile of counts.
getHotCountThreshold Return the minimum count treated as hot for the given detailed summary.

Static Data Members

NameDescription
DefaultCutoffs A vector of useful cutoff values for detailed summary.

Protected Member Functions

NameDescription
addCount This is called when a count is seen in the profile.
computeDetailedSummary Compute the detailed percentile summary from the accumulated counts.

Protected Data Members

NameDescription
DetailedSummary Detailed percentile summary entries computed from the accumulated counts.
MaxCount Maximum profile count seen so far.
MaxFunctionCount Maximum function entry count seen so far.
NumCounts Number of individual profile counts recorded so far.
NumFunctions Number of functions recorded so far.
TotalCount Sum of all profile counts recorded so far.