LLVM  14.0.0git
Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
llvm::ProfileSummaryBuilder Class Reference

#include "llvm/ProfileData/ProfileCommon.h"

Inheritance diagram for llvm::ProfileSummaryBuilder:
Inheritance graph
[legend]
Collaboration diagram for llvm::ProfileSummaryBuilder:
Collaboration graph
[legend]

Static Public Member Functions

static const ProfileSummaryEntrygetEntryForPercentile (SummaryEntryVector &DS, uint64_t Percentile)
 Find the summary entry for a desired percentile of counts. More...
 
static uint64_t getHotCountThreshold (SummaryEntryVector &DS)
 
static uint64_t getColdCountThreshold (SummaryEntryVector &DS)
 

Static Public Attributes

static const ArrayRef< uint32_tDefaultCutoffs
 A vector of useful cutoff values for detailed summary. More...
 

Protected Member Functions

 ProfileSummaryBuilder (std::vector< uint32_t > Cutoffs)
 
 ~ProfileSummaryBuilder ()=default
 
void addCount (uint64_t Count)
 This is called when a count is seen in the profile. More...
 
void computeDetailedSummary ()
 

Protected Attributes

SummaryEntryVector DetailedSummary
 
uint64_t TotalCount = 0
 
uint64_t MaxCount = 0
 
uint64_t MaxFunctionCount = 0
 
uint32_t NumCounts = 0
 
uint32_t NumFunctions = 0
 

Detailed Description

Definition at line 40 of file ProfileCommon.h.

Constructor & Destructor Documentation

◆ ProfileSummaryBuilder()

llvm::ProfileSummaryBuilder::ProfileSummaryBuilder ( std::vector< uint32_t Cutoffs)
inlineprotected

Definition at line 56 of file ProfileCommon.h.

◆ ~ProfileSummaryBuilder()

llvm::ProfileSummaryBuilder::~ProfileSummaryBuilder ( )
protecteddefault

Member Function Documentation

◆ addCount()

void llvm::ProfileSummaryBuilder::addCount ( uint64_t  Count)
inlineprotected

This is called when a count is seen in the profile.

Definition at line 101 of file ProfileCommon.h.

References MaxCount, NumCounts, and TotalCount.

Referenced by llvm::SampleProfileSummaryBuilder::addRecord().

◆ computeDetailedSummary()

void ProfileSummaryBuilder::computeDetailedSummary ( )
protected

◆ getColdCountThreshold()

uint64_t ProfileSummaryBuilder::getColdCountThreshold ( SummaryEntryVector DS)
static

◆ getEntryForPercentile()

const ProfileSummaryEntry & ProfileSummaryBuilder::getEntryForPercentile ( SummaryEntryVector DS,
uint64_t  Percentile 
)
static

Find the summary entry for a desired percentile of counts.

Definition at line 83 of file ProfileSummaryBuilder.cpp.

References llvm::SIInstrFlags::DS, and llvm::partition_point().

Referenced by getColdCountThreshold(), and getHotCountThreshold().

◆ getHotCountThreshold()

uint64_t ProfileSummaryBuilder::getHotCountThreshold ( SummaryEntryVector DS)
static

Member Data Documentation

◆ DefaultCutoffs

const ArrayRef< uint32_t > ProfileSummaryBuilder::DefaultCutoffs
static
Initial value:

A vector of useful cutoff values for detailed summary.

Definition at line 65 of file ProfileCommon.h.

Referenced by llvm::sampleprof::SampleProfileWriter::computeSummary(), and llvm::sampleprof::SampleProfileReader::computeSummary().

◆ DetailedSummary

SummaryEntryVector llvm::ProfileSummaryBuilder::DetailedSummary
protected

◆ MaxCount

uint64_t llvm::ProfileSummaryBuilder::MaxCount = 0
protected

◆ MaxFunctionCount

uint64_t llvm::ProfileSummaryBuilder::MaxFunctionCount = 0
protected

◆ NumCounts

uint32_t llvm::ProfileSummaryBuilder::NumCounts = 0
protected

◆ NumFunctions

uint32_t llvm::ProfileSummaryBuilder::NumFunctions = 0
protected

◆ TotalCount

uint64_t llvm::ProfileSummaryBuilder::TotalCount = 0
protected

The documentation for this class was generated from the following files:
DefaultCutoffsData
static const uint32_t DefaultCutoffsData[]
Definition: ProfileSummaryBuilder.cpp:74