29 200000, 300000, 400000, 500000, 600000, 700000, 800000,
30 900000, 950000, 990000, 999000, 999900, 999990, 999999};
39 addEntryCount(R.
Counts[0]);
48 if (!isCallsiteSample) {
56 for (
const auto &CS :
I.second)
63 if (DetailedSummaryCutoffs.empty())
66 auto Iter = CountFrequencies.begin();
67 const auto End = CountFrequencies.end();
70 uint64_t CurrSum = 0, Count = 0;
72 for (
const uint32_t Cutoff : DetailedSummaryCutoffs) {
81 while (CurrSum < DesiredCount && Iter != End) {
84 CurrSum += (Count * Freq);
88 assert(CurrSum >= DesiredCount);
96 return std::make_unique<ProfileSummary>(
103 return std::make_unique<ProfileSummary>(
108 void InstrProfSummaryBuilder::addEntryCount(uint64_t Count) {
115 void InstrProfSummaryBuilder::addInternalCount(uint64_t Count) {
117 if (Count > MaxInternalBlockCount)
118 MaxInternalBlockCount = Count;
uint64_t getZExtValue() const
Get zero extended value.
This class represents lattice values for constants.
APInt sdiv(const APInt &RHS) const
Signed division function for APInt.
void addRecord(const sampleprof::FunctionSamples &FS, bool isCallsiteSample=false)
static const ArrayRef< uint32_t > DefaultCutoffs
A vector of useful cutoff values for detailed summary.
void addCount(uint64_t Count)
This is called when a count is seen in the profile.
void addRecord(const InstrProfRecord &)
Representation of the samples collected for a function.
void computeDetailedSummary()
This file contains the simple types necessary to represent the attributes associated with functions a...
uint64_t getHeadSamples() const
Return the total number of branch samples that have the function as the branch target.
const BodySampleMap & getBodySamples() const
Return all the samples collected in the body of the function.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
uint64_t MaxFunctionCount
void sort(IteratorTy Start, IteratorTy End)
std::unique_ptr< ProfileSummary > getSummary()
SummaryEntryVector DetailedSummary
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
Class for arbitrary precision integers.
std::unique_ptr< ProfileSummary > getSummary()
std::vector< uint64_t > Counts
Profiling information for a single function.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static const uint32_t DefaultCutoffsData[]
const CallsiteSampleMap & getCallsiteSamples() const
Return all the callsite samples collected in the body of the function.