<div dir="ltr"><div class="gmail_extra">You are right. Count[0] is not entry count for the function. </div><div class="gmail_extra"><br></div><div class="gmail_extra">The code here is to to make the summary compatible with existing 'MaxFunctionCount' for now. Eventually the use of MaxFunctionCount will become obsolete (replaced with other metrics), and this part can be removed.</div><div class="gmail_extra"><br></div><div class="gmail_extra">David</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 4, 2016 at 5:39 PM, Sean Silva via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Wed, Feb 17, 2016 at 10:18 AM, Easwaran Raman via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Author: eraman<br>
Date: Wed Feb 17 12:18:47 2016<br>
New Revision: 261119<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=261119&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=261119&view=rev</a><br>
Log:<br>
Add a profile summary class specific to instrumentation profiles.<br>
<br>
Modify ProfileSummary class to make it not instrumented profile specific.<br>
Add a new InstrumentedProfileSummary class that inherits from ProfileSummary.<br>
<br>
Differential Revision: <a href="http://reviews.llvm.org/D17310" rel="noreferrer" target="_blank">http://reviews.llvm.org/D17310</a><br>
<br>
<br>
Modified:<br>
    llvm/trunk/include/llvm/ProfileData/InstrProf.h<br>
    llvm/trunk/include/llvm/ProfileData/InstrProfReader.h<br>
    llvm/trunk/include/llvm/ProfileData/ProfileCommon.h<br>
    llvm/trunk/lib/ProfileData/InstrProfReader.cpp<br>
    llvm/trunk/lib/ProfileData/InstrProfWriter.cpp<br>
    llvm/trunk/lib/ProfileData/ProfileSummary.cpp<br>
    llvm/trunk/tools/llvm-profdata/llvm-profdata.cpp<br>
    llvm/trunk/unittests/ProfileData/InstrProfTest.cpp<br>
<br>
Modified: llvm/trunk/include/llvm/ProfileData/InstrProf.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ProfileData/InstrProf.h?rev=261119&r1=261118&r2=261119&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ProfileData/InstrProf.h?rev=261119&r1=261118&r2=261119&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/ProfileData/InstrProf.h (original)<br>
+++ llvm/trunk/include/llvm/ProfileData/InstrProf.h Wed Feb 17 12:18:47 2016<br>
@@ -757,8 +757,8 @@ struct Summary {<br>
   void setEntry(uint32_t I, const ProfileSummaryEntry &E) {<br>
     Entry &ER = getCutoffEntryBase()[I];<br>
     ER.Cutoff = E.Cutoff;<br>
-    ER.MinBlockCount = E.MinBlockCount;<br>
-    ER.NumBlocks = E.NumBlocks;<br>
+    ER.MinBlockCount = E.MinCount;<br>
+    ER.NumBlocks = E.NumCounts;<br>
   }<br>
<br>
   Summary(uint32_t Size) { memset(this, 0, Size); }<br>
<br>
Modified: llvm/trunk/include/llvm/ProfileData/InstrProfReader.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ProfileData/InstrProfReader.h?rev=261119&r1=261118&r2=261119&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ProfileData/InstrProfReader.h?rev=261119&r1=261118&r2=261119&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/ProfileData/InstrProfReader.h (original)<br>
+++ llvm/trunk/include/llvm/ProfileData/InstrProfReader.h Wed Feb 17 12:18:47 2016<br>
@@ -353,7 +353,7 @@ private:<br>
   /// The index into the profile data.<br>
   std::unique_ptr<InstrProfReaderIndexBase> Index;<br>
   /// Profile summary data.<br>
-  std::unique_ptr<ProfileSummary> Summary;<br>
+  std::unique_ptr<InstrProfSummary> Summary;<br>
<br>
   IndexedInstrProfReader(const IndexedInstrProfReader &) = delete;<br>
   IndexedInstrProfReader &operator=(const IndexedInstrProfReader &) = delete;<br>
@@ -406,7 +406,7 @@ public:<br>
   // to be used by llvm-profdata (for dumping). Avoid using this when<br>
   // the client is the compiler.<br>
   InstrProfSymtab &getSymtab() override;<br>
-  ProfileSummary &getSummary() { return *(Summary.get()); }<br>
+  InstrProfSummary &getSummary() { return *(Summary.get()); }<br>
 };<br>
<br>
 } // end namespace llvm<br>
<br>
Modified: llvm/trunk/include/llvm/ProfileData/ProfileCommon.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ProfileData/ProfileCommon.h?rev=261119&r1=261118&r2=261119&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ProfileData/ProfileCommon.h?rev=261119&r1=261118&r2=261119&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/ProfileData/ProfileCommon.h (original)<br>
+++ llvm/trunk/include/llvm/ProfileData/ProfileCommon.h Wed Feb 17 12:18:47 2016<br>
@@ -25,59 +25,70 @@ namespace IndexedInstrProf {<br>
 struct Summary;<br>
 }<br>
 struct InstrProfRecord;<br>
-///// Profile summary computation ////<br>
-// The 'show' command displays richer summary of the profile data. The profile<br>
-// summary is one or more (Cutoff, MinBlockCount, NumBlocks) triplets. Given a<br>
-// target execution count percentile, we compute the minimum number of blocks<br>
-// needed to reach this target and the minimum execution count of these blocks.<br>
+// The profile summary is one or more (Cutoff, MinCount, NumCounts) triplets.<br>
+// The semantics of counts depend on the type of profile. For instrumentation<br>
+// profile, counts are block counts and for sample profile, counts are<br>
+// per-line samples. Given a target counts percentile, we compute the minimum<br>
+// number of counts needed to reach this target and the minimum among these<br>
+// counts.<br>
 struct ProfileSummaryEntry {<br>
-  uint32_t Cutoff;        ///< The required percentile of total execution count.<br>
-  uint64_t MinBlockCount; ///< The minimum execution count for this percentile.<br>
-  uint64_t NumBlocks;     ///< Number of blocks >= the minumum execution count.<br>
-  ProfileSummaryEntry(uint32_t TheCutoff, uint64_t TheMinBlockCount,<br>
-                      uint64_t TheNumBlocks)<br>
-      : Cutoff(TheCutoff), MinBlockCount(TheMinBlockCount),<br>
-        NumBlocks(TheNumBlocks) {}<br>
+  uint32_t Cutoff;    ///< The required percentile of counts.<br>
+  uint64_t MinCount;  ///< The minimum count for this percentile.<br>
+  uint64_t NumCounts; ///< Number of counts >= the minimum count.<br>
+  ProfileSummaryEntry(uint32_t TheCutoff, uint64_t TheMinCount,<br>
+                      uint64_t TheNumCounts)<br>
+      : Cutoff(TheCutoff), MinCount(TheMinCount), NumCounts(TheNumCounts) {}<br>
 };<br>
<br>
 class ProfileSummary {<br>
-  // We keep track of the number of times a count appears in the profile and<br>
-  // keep the map sorted in the descending order of counts.<br>
+  // We keep track of the number of times a count (block count or samples)<br>
+  // appears in the profile. The map is kept sorted in the descending order of<br>
+  // counts.<br>
   std::map<uint64_t, uint32_t, std::greater<uint64_t>> CountFrequencies;<br>
+<br>
+protected:<br>
   std::vector<ProfileSummaryEntry> DetailedSummary;<br>
   std::vector<uint32_t> DetailedSummaryCutoffs;<br>
-  // Sum of all counts.<br>
-  uint64_t TotalCount;<br>
-  uint64_t MaxBlockCount, MaxInternalBlockCount, MaxFunctionCount;<br>
-  uint32_t NumBlocks, NumFunctions;<br>
-  inline void addCount(uint64_t Count, bool IsEntry);<br>
+  uint64_t TotalCount, MaxCount;<br>
+  uint32_t NumCounts;<br>
+  ProfileSummary(std::vector<uint32_t> Cutoffs)<br>
+      : DetailedSummaryCutoffs(Cutoffs), TotalCount(0), MaxCount(0),<br>
+        NumCounts(0) {}<br>
+  ProfileSummary() : TotalCount(0), MaxCount(0), NumCounts(0) {}<br>
+  inline void addCount(uint64_t Count);<br>
<br>
 public:<br>
   static const int Scale = 1000000;<br>
-  ProfileSummary(std::vector<uint32_t> Cutoffs)<br>
-      : DetailedSummaryCutoffs(Cutoffs), TotalCount(0), MaxBlockCount(0),<br>
-        MaxInternalBlockCount(0), MaxFunctionCount(0), NumBlocks(0),<br>
-        NumFunctions(0) {}<br>
-  ProfileSummary(const IndexedInstrProf::Summary &S);<br>
-  void addRecord(const InstrProfRecord &);<br>
   inline std::vector<ProfileSummaryEntry> &getDetailedSummary();<br>
   void computeDetailedSummary();<br>
-  uint32_t getNumBlocks() { return NumBlocks; }<br>
+};<br>
+<br>
+class InstrProfSummary : public ProfileSummary {<br>
+  uint64_t MaxInternalBlockCount, MaxFunctionCount;<br>
+  uint32_t NumFunctions;<br>
+  inline void addEntryCount(uint64_t Count);<br>
+  inline void addInternalCount(uint64_t Count);<br>
+<br>
+public:<br>
+  InstrProfSummary(std::vector<uint32_t> Cutoffs)<br>
+      : ProfileSummary(Cutoffs), MaxInternalBlockCount(0), MaxFunctionCount(0),<br>
+        NumFunctions(0) {}<br>
+  InstrProfSummary(const IndexedInstrProf::Summary &S);<br>
+  void addRecord(const InstrProfRecord &);<br>
+  uint32_t getNumBlocks() { return NumCounts; }<br>
   uint64_t getTotalCount() { return TotalCount; }<br>
   uint32_t getNumFunctions() { return NumFunctions; }<br>
   uint64_t getMaxFunctionCount() { return MaxFunctionCount; }<br>
-  uint64_t getMaxBlockCount() { return MaxBlockCount; }<br>
+  uint64_t getMaxBlockCount() { return MaxCount; }<br>
   uint64_t getMaxInternalBlockCount() { return MaxInternalBlockCount; }<br>
 };<br>
<br>
 // This is called when a count is seen in the profile.<br>
-void ProfileSummary::addCount(uint64_t Count, bool IsEntry) {<br>
+void ProfileSummary::addCount(uint64_t Count) {<br>
   TotalCount += Count;<br>
-  if (Count > MaxBlockCount)<br>
-    MaxBlockCount = Count;<br>
-  if (!IsEntry && Count > MaxInternalBlockCount)<br>
-    MaxInternalBlockCount = Count;<br>
-  NumBlocks++;<br>
+  if (Count > MaxCount)<br>
+    MaxCount = Count;<br>
+  NumCounts++;<br>
   CountFrequencies[Count]++;<br>
 }<br>
<br>
<br>
Modified: llvm/trunk/lib/ProfileData/InstrProfReader.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ProfileData/InstrProfReader.cpp?rev=261119&r1=261118&r2=261119&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ProfileData/InstrProfReader.cpp?rev=261119&r1=261118&r2=261119&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/ProfileData/InstrProfReader.cpp (original)<br>
+++ llvm/trunk/lib/ProfileData/InstrProfReader.cpp Wed Feb 17 12:18:47 2016<br>
@@ -589,15 +589,15 @@ IndexedInstrProfReader::readSummary(Inde<br>
     for (unsigned I = 0; I < SummarySize / sizeof(uint64_t); I++)<br>
       Dst[I] = endian::byte_swap<uint64_t, little>(Src[I]);<br>
<br>
-    // initialize ProfileSummary using the SummaryData from disk.<br>
-    this->Summary = llvm::make_unique<ProfileSummary>(*(SummaryData.get()));<br>
+    // initialize InstrProfSummary using the SummaryData from disk.<br>
+    this->Summary = llvm::make_unique<InstrProfSummary>(*(SummaryData.get()));<br>
     return Cur + SummarySize;<br>
   } else {<br>
     // For older version of profile data, we need to compute on the fly:<br>
     using namespace IndexedInstrProf;<br>
     std::vector<uint32_t> Cutoffs(&SummaryCutoffs[0],<br>
                                   &SummaryCutoffs[NumSummaryCutoffs]);<br>
-    this->Summary = llvm::make_unique<ProfileSummary>(Cutoffs);<br>
+    this->Summary = llvm::make_unique<InstrProfSummary>(Cutoffs);<br>
     this->Summary->computeDetailedSummary();<br>
     return Cur;<br>
   }<br>
<br>
Modified: llvm/trunk/lib/ProfileData/InstrProfWriter.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ProfileData/InstrProfWriter.cpp?rev=261119&r1=261118&r2=261119&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ProfileData/InstrProfWriter.cpp?rev=261119&r1=261118&r2=261119&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/ProfileData/InstrProfWriter.cpp (original)<br>
+++ llvm/trunk/lib/ProfileData/InstrProfWriter.cpp Wed Feb 17 12:18:47 2016<br>
@@ -84,7 +84,7 @@ public:<br>
   typedef uint64_t offset_type;<br>
<br>
   support::endianness ValueProfDataEndianness;<br>
-  ProfileSummary *TheProfileSummary;<br>
+  InstrProfSummary *TheProfileSummary;<br>
<br>
   InstrProfRecordWriterTrait() : ValueProfDataEndianness(support::little) {}<br>
   static hash_value_type ComputeHash(key_type_ref K) {<br>
@@ -197,7 +197,7 @@ bool InstrProfWriter::shouldEncodeData(c<br>
 }<br>
<br>
 static void setSummary(IndexedInstrProf::Summary *TheSummary,<br>
-                       ProfileSummary &PS) {<br>
+                       InstrProfSummary &PS) {<br>
   using namespace IndexedInstrProf;<br>
   std::vector<ProfileSummaryEntry> &Res = PS.getDetailedSummary();<br>
   TheSummary->NumSummaryFields = Summary::NumKinds;<br>
@@ -219,7 +219,7 @@ void InstrProfWriter::writeImpl(ProfOStr<br>
   using namespace IndexedInstrProf;<br>
   std::vector<uint32_t> Cutoffs(&SummaryCutoffs[0],<br>
                                 &SummaryCutoffs[NumSummaryCutoffs]);<br>
-  ProfileSummary PS(Cutoffs);<br>
+  InstrProfSummary PS(Cutoffs);<br>
   InfoObj->TheProfileSummary = &PS;<br>
<br>
   // Populate the hash table generator.<br>
<br>
Modified: llvm/trunk/lib/ProfileData/ProfileSummary.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ProfileData/ProfileSummary.cpp?rev=261119&r1=261118&r2=261119&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ProfileData/ProfileSummary.cpp?rev=261119&r1=261118&r2=261119&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/ProfileData/ProfileSummary.cpp (original)<br>
+++ llvm/trunk/lib/ProfileData/ProfileSummary.cpp Wed Feb 17 12:18:47 2016<br>
@@ -16,17 +16,14 @@<br>
<br>
 using namespace llvm;<br>
<br>
-void ProfileSummary::addRecord(const InstrProfRecord &R) {<br>
-  NumFunctions++;<br>
-  if (R.Counts[0] > MaxFunctionCount)<br>
-    MaxFunctionCount = R.Counts[0];<br>
-<br>
-  for (size_t I = 0, E = R.Counts.size(); I < E; ++I)<br>
-    addCount(R.Counts[I], (I == 0));<br>
+void InstrProfSummary::addRecord(const InstrProfRecord &R) {<br>
+  addEntryCount(R.Counts[0]);<br></blockquote><div><br></div></div></div><div>Hi Easwaran, David,</div><div><br></div><div>Sorry if this is a silly question, but I remember that in D15540 David specifically mentioned that in IR profiles we do not necessarily have a counter for the entry block. What is the justification for Counts[0] as the "entry count" even in IR instr? The analogous function entry count in llvm-profdata.cpp is not emitted with an IR profile: <a href="http://llvm.org/klaus/llvm/blob/master/tools/llvm-profdata/llvm-profdata.cpp#L-304" target="_blank">http://llvm.org/klaus/llvm/blob/master/tools/llvm-profdata/llvm-profdata.cpp#L-304</a></div><div><br></div><div>-- Sean Silva</div><div><div class="h5"><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
+  for (size_t I = 1, E = R.Counts.size(); I < E; ++I)<br>
+    addInternalCount(R.Counts[I]);<br>
 }<br>
<br>
 // The argument to this method is a vector of cutoff percentages and the return<br>
-// value is a vector of (Cutoff, MinBlockCount, NumBlocks) triplets.<br>
+// value is a vector of (Cutoff, MinCount, NumCounts) triplets.<br>
 void ProfileSummary::computeDetailedSummary() {<br>
   if (DetailedSummaryCutoffs.empty())<br>
     return;<br>
@@ -34,7 +31,7 @@ void ProfileSummary::computeDetailedSumm<br>
   auto End = CountFrequencies.end();<br>
   std::sort(DetailedSummaryCutoffs.begin(), DetailedSummaryCutoffs.end());<br>
<br>
-  uint32_t BlocksSeen = 0;<br>
+  uint32_t CountsSeen = 0;<br>
   uint64_t CurrSum = 0, Count = 0;<br>
<br>
   for (uint32_t Cutoff : DetailedSummaryCutoffs) {<br>
@@ -50,26 +47,40 @@ void ProfileSummary::computeDetailedSumm<br>
       Count = Iter->first;<br>
       uint32_t Freq = Iter->second;<br>
       CurrSum += (Count * Freq);<br>
-      BlocksSeen += Freq;<br>
+      CountsSeen += Freq;<br>
       Iter++;<br>
     }<br>
     assert(CurrSum >= DesiredCount);<br>
-    ProfileSummaryEntry PSE = {Cutoff, Count, BlocksSeen};<br>
+    ProfileSummaryEntry PSE = {Cutoff, Count, CountsSeen};<br>
     DetailedSummary.push_back(PSE);<br>
   }<br>
 }<br>
<br>
-ProfileSummary::ProfileSummary(const IndexedInstrProf::Summary &S)<br>
-    : TotalCount(S.get(IndexedInstrProf::Summary::TotalBlockCount)),<br>
-      MaxBlockCount(S.get(IndexedInstrProf::Summary::MaxBlockCount)),<br>
-      MaxInternalBlockCount(<br>
-          S.get(IndexedInstrProf::Summary::MaxInternalBlockCount)),<br>
+InstrProfSummary::InstrProfSummary(const IndexedInstrProf::Summary &S)<br>
+    : ProfileSummary(), MaxInternalBlockCount(S.get(<br>
+                            IndexedInstrProf::Summary::MaxInternalBlockCount)),<br>
       MaxFunctionCount(S.get(IndexedInstrProf::Summary::MaxFunctionCount)),<br>
-      NumBlocks(S.get(IndexedInstrProf::Summary::TotalNumBlocks)),<br>
       NumFunctions(S.get(IndexedInstrProf::Summary::TotalNumFunctions)) {<br>
+<br>
+  TotalCount = S.get(IndexedInstrProf::Summary::TotalBlockCount);<br>
+  MaxCount = S.get(IndexedInstrProf::Summary::MaxBlockCount);<br>
+  NumCounts = S.get(IndexedInstrProf::Summary::TotalNumBlocks);<br>
+<br>
   for (unsigned I = 0; I < S.NumCutoffEntries; I++) {<br>
     const IndexedInstrProf::Summary::Entry &Ent = S.getEntry(I);<br>
     DetailedSummary.emplace_back((uint32_t)Ent.Cutoff, Ent.MinBlockCount,<br>
                                  Ent.NumBlocks);<br>
   }<br>
 }<br>
+void InstrProfSummary::addEntryCount(uint64_t Count) {<br>
+  addCount(Count);<br>
+  NumFunctions++;<br>
+  if (Count > MaxFunctionCount)<br>
+    MaxFunctionCount = Count;<br>
+}<br>
+<br>
+void InstrProfSummary::addInternalCount(uint64_t Count) {<br>
+  addCount(Count);<br>
+  if (Count > MaxInternalBlockCount)<br>
+    MaxInternalBlockCount = Count;<br>
+}<br>
<br>
Modified: llvm/trunk/tools/llvm-profdata/llvm-profdata.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-profdata/llvm-profdata.cpp?rev=261119&r1=261118&r2=261119&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-profdata/llvm-profdata.cpp?rev=261119&r1=261118&r2=261119&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/tools/llvm-profdata/llvm-profdata.cpp (original)<br>
+++ llvm/trunk/tools/llvm-profdata/llvm-profdata.cpp Wed Feb 17 12:18:47 2016<br>
@@ -268,7 +268,7 @@ static int showInstrProfile(std::string<br>
   if (ShowDetailedSummary && DetailedSummaryCutoffs.empty()) {<br>
     Cutoffs = {800000, 900000, 950000, 990000, 999000, 999900, 999990};<br>
   }<br>
-  ProfileSummary PS(Cutoffs);<br>
+  InstrProfSummary PS(Cutoffs);<br>
   if (std::error_code EC = ReaderOrErr.getError())<br>
     exitWithErrorCode(EC, Filename);<br>
<br>
@@ -352,7 +352,7 @@ static int showInstrProfile(std::string<br>
     OS << "Total number of blocks: " << PS.getNumBlocks() << "\n";<br>
     OS << "Total count: " << PS.getTotalCount() << "\n";<br>
     for (auto Entry : PS.getDetailedSummary()) {<br>
-      OS << Entry.NumBlocks << " blocks with count >= " << Entry.MinBlockCount<br>
+      OS << Entry.NumCounts << " blocks with count >= " << Entry.MinCount<br>
          << " account for "<br>
          << format("%0.6g", (float)Entry.Cutoff / ProfileSummary::Scale * 100)<br>
          << " percentage of the total counts.\n";<br>
<br>
Modified: llvm/trunk/unittests/ProfileData/InstrProfTest.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ProfileData/InstrProfTest.cpp?rev=261119&r1=261118&r2=261119&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ProfileData/InstrProfTest.cpp?rev=261119&r1=261118&r2=261119&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/unittests/ProfileData/InstrProfTest.cpp (original)<br>
+++ llvm/trunk/unittests/ProfileData/InstrProfTest.cpp Wed Feb 17 12:18:47 2016<br>
@@ -154,7 +154,7 @@ TEST_F(InstrProfTest, get_profile_summar<br>
   auto Profile = Writer.writeBuffer();<br>
   readProfile(std::move(Profile));<br>
<br>
-  ProfileSummary &PS = Reader->getSummary();<br>
+  InstrProfSummary &PS = Reader->getSummary();<br>
   ASSERT_EQ(2305843009213693952U, PS.getMaxFunctionCount());<br>
   ASSERT_EQ(2305843009213693952U, PS.getMaxBlockCount());<br>
   ASSERT_EQ(10U, PS.getNumBlocks());<br>
@@ -171,10 +171,10 @@ TEST_F(InstrProfTest, get_profile_summar<br>
   auto NinetyFivePerc = std::find_if(Details.begin(), Details.end(), Predicate);<br>
   Cutoff = 990000;<br>
   auto NinetyNinePerc = std::find_if(Details.begin(), Details.end(), Predicate);<br>
-  ASSERT_EQ(576460752303423488U, EightyPerc->MinBlockCount);<br>
-  ASSERT_EQ(288230376151711744U, NinetyPerc->MinBlockCount);<br>
-  ASSERT_EQ(288230376151711744U, NinetyFivePerc->MinBlockCount);<br>
-  ASSERT_EQ(72057594037927936U, NinetyNinePerc->MinBlockCount);<br>
+  ASSERT_EQ(576460752303423488U, EightyPerc->MinCount);<br>
+  ASSERT_EQ(288230376151711744U, NinetyPerc->MinCount);<br>
+  ASSERT_EQ(288230376151711744U, NinetyFivePerc->MinCount);<br>
+  ASSERT_EQ(72057594037927936U, NinetyNinePerc->MinCount);<br>
 }<br>
<br>
 TEST_P(MaybeSparseInstrProfTest, get_icall_data_read_write) {<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div></div></div><br></div></div>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div></div>