15 #ifndef LLVM_PROFILEDATA_PROFILECOMMON_H 16 #define LLVM_PROFILEDATA_PROFILECOMMON_H 31 namespace sampleprof {
45 std::map<uint64_t, uint32_t, std::greater<uint64_t>> CountFrequencies;
46 std::vector<uint32_t> DetailedSummaryCutoffs;
50 uint64_t TotalCount = 0;
51 uint64_t MaxCount = 0;
52 uint64_t MaxFunctionCount = 0;
57 : DetailedSummaryCutoffs(
std::move(Cutoffs)) {}
60 inline void addCount(uint64_t Count);
61 void computeDetailedSummary();
69 uint64_t MaxInternalBlockCount = 0;
71 inline void addEntryCount(uint64_t Count);
72 inline void addInternalCount(uint64_t Count);
79 std::unique_ptr<ProfileSummary> getSummary();
88 std::unique_ptr<ProfileSummary> getSummary();
97 CountFrequencies[Count]++;
102 #endif // LLVM_PROFILEDATA_PROFILECOMMON_H ProfileSummaryBuilder(std::vector< uint32_t > Cutoffs)
const char * getUnlikelySectionPrefix()
This class represents lattice values for constants.
const char * getHotSectionPrefix()
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.
SampleProfileSummaryBuilder(std::vector< uint32_t > Cutoffs)
Representation of the samples collected for a function.
InstrProfSummaryBuilder(std::vector< uint32_t > Cutoffs)
SummaryEntryVector DetailedSummary
Profiling information for a single function.
std::vector< ProfileSummaryEntry > SummaryEntryVector