<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">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>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">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><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">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><br></div></div>