[PATCH] D122210: [llvm-profdata] Unify default cutoffs for detailed summary printing

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 23 14:57:45 PDT 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG0ca8ff4da1bd: [llvm-profdata] Unify default cutoffs for detailed summary printing (authored by wenlei).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122210/new/

https://reviews.llvm.org/D122210

Files:
  llvm/test/tools/llvm-profdata/suppl-instr-with-sample.test
  llvm/tools/llvm-profdata/llvm-profdata.cpp


Index: llvm/tools/llvm-profdata/llvm-profdata.cpp
===================================================================
--- llvm/tools/llvm-profdata/llvm-profdata.cpp
+++ llvm/tools/llvm-profdata/llvm-profdata.cpp
@@ -2133,7 +2133,7 @@
   auto ReaderOrErr = InstrProfReader::create(Filename);
   std::vector<uint32_t> Cutoffs = std::move(DetailedSummaryCutoffs);
   if (ShowDetailedSummary && Cutoffs.empty()) {
-    Cutoffs = {800000, 900000, 950000, 990000, 999000, 999900, 999990};
+    Cutoffs = ProfileSummaryBuilder::DefaultCutoffs;
   }
   InstrProfSummaryBuilder Builder(std::move(Cutoffs));
   if (Error E = ReaderOrErr.takeError())
Index: llvm/test/tools/llvm-profdata/suppl-instr-with-sample.test
===================================================================
--- llvm/test/tools/llvm-profdata/suppl-instr-with-sample.test
+++ llvm/test/tools/llvm-profdata/suppl-instr-with-sample.test
@@ -93,6 +93,14 @@
 MIX5-NEXT: Total number of blocks: 9
 MIX5-NEXT: Total count: 6525
 MIX5-NEXT: Detailed summary:
+MIX5-NEXT: 1 blocks with count >= 3000 account for 1 percentage of the total counts.
+MIX5-NEXT: 1 blocks with count >= 3000 account for 10 percentage of the total counts.
+MIX5-NEXT: 1 blocks with count >= 3000 account for 20 percentage of the total counts.
+MIX5-NEXT: 1 blocks with count >= 3000 account for 30 percentage of the total counts.
+MIX5-NEXT: 1 blocks with count >= 3000 account for 40 percentage of the total counts.
+MIX5-NEXT: 2 blocks with count >= 2000 account for 50 percentage of the total counts.
+MIX5-NEXT: 2 blocks with count >= 2000 account for 60 percentage of the total counts.
+MIX5-NEXT: 2 blocks with count >= 2000 account for 70 percentage of the total counts.
 MIX5-NEXT: 3 blocks with count >= 1000 account for 80 percentage of the total counts.
 MIX5-NEXT: 3 blocks with count >= 1000 account for 90 percentage of the total counts.
 MIX5-NEXT: 4 blocks with count >= 500 account for 95 percentage of the total counts.
@@ -100,3 +108,4 @@
 MIX5-NEXT: 6 blocks with count >= 12 account for 99.9 percentage of the total counts.
 MIX5-NEXT: 6 blocks with count >= 12 account for 99.99 percentage of the total counts.
 MIX5-NEXT: 6 blocks with count >= 12 account for 99.999 percentage of the total counts.
+MIX5-NEXT: 6 blocks with count >= 12 account for 99.9999 percentage of the total counts.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122210.417757.patch
Type: text/x-patch
Size: 2346 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220323/b34117ef/attachment.bin>


More information about the llvm-commits mailing list