mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-12 07:22:12 +00:00
NFC fix class members initialization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282951 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8948c796f5
commit
66c32d553d
@ -45,22 +45,21 @@ inline const char *getUnlikelySectionPrefix() { return ".unlikely"; }
|
|||||||
class ProfileSummaryBuilder {
|
class ProfileSummaryBuilder {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// We keep track of the number of times a count (block count or samples)
|
/// We keep track of the number of times a count (block count or samples)
|
||||||
// appears in the profile. The map is kept sorted in the descending order of
|
/// appears in the profile. The map is kept sorted in the descending order of
|
||||||
// counts.
|
/// counts.
|
||||||
std::map<uint64_t, uint32_t, std::greater<uint64_t>> CountFrequencies;
|
std::map<uint64_t, uint32_t, std::greater<uint64_t>> CountFrequencies;
|
||||||
std::vector<uint32_t> DetailedSummaryCutoffs;
|
std::vector<uint32_t> DetailedSummaryCutoffs;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SummaryEntryVector DetailedSummary;
|
SummaryEntryVector DetailedSummary;
|
||||||
ProfileSummaryBuilder(std::vector<uint32_t> Cutoffs)
|
ProfileSummaryBuilder(std::vector<uint32_t> Cutoffs)
|
||||||
: DetailedSummaryCutoffs(std::move(Cutoffs)), TotalCount(0), MaxCount(0),
|
: DetailedSummaryCutoffs(std::move(Cutoffs)) {}
|
||||||
MaxFunctionCount(0), NumCounts(0), NumFunctions(0) {}
|
|
||||||
inline void addCount(uint64_t Count);
|
inline void addCount(uint64_t Count);
|
||||||
~ProfileSummaryBuilder() = default;
|
~ProfileSummaryBuilder() = default;
|
||||||
void computeDetailedSummary();
|
void computeDetailedSummary();
|
||||||
uint64_t TotalCount, MaxCount, MaxFunctionCount;
|
uint64_t TotalCount = 0, MaxCount = 0, MaxFunctionCount = 0;
|
||||||
uint32_t NumCounts, NumFunctions;
|
uint32_t NumCounts = 0, NumFunctions = 0;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// \brief A vector of useful cutoff values for detailed summary.
|
/// \brief A vector of useful cutoff values for detailed summary.
|
||||||
@ -68,13 +67,13 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
class InstrProfSummaryBuilder final : public ProfileSummaryBuilder {
|
class InstrProfSummaryBuilder final : public ProfileSummaryBuilder {
|
||||||
uint64_t MaxInternalBlockCount;
|
uint64_t MaxInternalBlockCount = 0;
|
||||||
inline void addEntryCount(uint64_t Count);
|
inline void addEntryCount(uint64_t Count);
|
||||||
inline void addInternalCount(uint64_t Count);
|
inline void addInternalCount(uint64_t Count);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
InstrProfSummaryBuilder(std::vector<uint32_t> Cutoffs)
|
InstrProfSummaryBuilder(std::vector<uint32_t> Cutoffs)
|
||||||
: ProfileSummaryBuilder(std::move(Cutoffs)), MaxInternalBlockCount(0) {}
|
: ProfileSummaryBuilder(std::move(Cutoffs)) {}
|
||||||
void addRecord(const InstrProfRecord &);
|
void addRecord(const InstrProfRecord &);
|
||||||
std::unique_ptr<ProfileSummary> getSummary();
|
std::unique_ptr<ProfileSummary> getSummary();
|
||||||
};
|
};
|
||||||
@ -88,7 +87,7 @@ public:
|
|||||||
std::unique_ptr<ProfileSummary> getSummary();
|
std::unique_ptr<ProfileSummary> getSummary();
|
||||||
};
|
};
|
||||||
|
|
||||||
// This is called when a count is seen in the profile.
|
/// This is called when a count is seen in the profile.
|
||||||
void ProfileSummaryBuilder::addCount(uint64_t Count) {
|
void ProfileSummaryBuilder::addCount(uint64_t Count) {
|
||||||
TotalCount += Count;
|
TotalCount += Count;
|
||||||
if (Count > MaxCount)
|
if (Count > MaxCount)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user