31 200000, 300000, 400000, 500000, 600000, 500000, 600000, 700000,
32 800000, 900000, 950000, 990000, 999000, 999900, 999990, 999999};
41 addEntryCount(R.
Counts[0]);
60 if (DetailedSummaryCutoffs.empty())
62 std::sort(DetailedSummaryCutoffs.begin(), DetailedSummaryCutoffs.end());
63 auto Iter = CountFrequencies.begin();
64 const auto End = CountFrequencies.end();
67 uint64_t CurrSum = 0, Count = 0;
69 for (
const uint32_t Cutoff : DetailedSummaryCutoffs) {
78 while (CurrSum < DesiredCount && Iter !=
End) {
81 CurrSum += (Count * Freq);
85 assert(CurrSum >= DesiredCount);
93 return llvm::make_unique<ProfileSummary>(
100 return llvm::make_unique<ProfileSummary>(
105 void InstrProfSummaryBuilder::addEntryCount(uint64_t Count) {
112 void InstrProfSummaryBuilder::addInternalCount(uint64_t Count) {
114 if (Count > MaxInternalBlockCount)
115 MaxInternalBlockCount = Count;
uint64_t getZExtValue() const
Get zero extended value.
const BodySampleMap & getBodySamples() const
Return all the samples collected in the body of the function.
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.
static GCRegistry::Add< StatepointGC > D("statepoint-example","an example strategy for statepoint")
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 samples collected at the head of the function.
static GCRegistry::Add< CoreCLRGC > E("coreclr","CoreCLR-compatible GC")
This file contains the declarations for the subclasses of Constant, which represent the different fla...
uint64_t MaxFunctionCount
static const unsigned End
APInt sdiv(const APInt &RHS) const
Signed division function for APInt.
std::unique_ptr< ProfileSummary > getSummary()
void addRecord(const sampleprof::FunctionSamples &FS)
SummaryEntryVector DetailedSummary
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[]