[PATCH] D56342: [llvm-profdata] add value-cutoff functionality to show command

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 7 11:58:31 PST 2019


davidxl added inline comments.


================
Comment at: docs/CommandGuide/llvm-profdata.rst:226
+
+ Output the function names whose max count value are below the cutoff value.
+
----------------
'Only output names of functions whose .... '


================
Comment at: tools/llvm-profdata/llvm-profdata.cpp:675
+                            bool ShowAllFunctions, uint64_t ValueCutoff,
+                            bool ListBelow, const std::string &ShowFunction,
+                            bool TextFormat, raw_fd_ostream &OS) {
----------------
ListBelow --> OnlyListBelow


================
Comment at: tools/llvm-profdata/llvm-profdata.cpp:703
 
+  if (ListBelow) {
+    OS << "The list of functions with the maximum counter less than "
----------------
!TextFormat && ListBelow

Text dump option is not compatible with ListBelow, and it should take precedence


================
Comment at: tools/llvm-profdata/llvm-profdata.cpp:812
+  if (ValueCutoff > 0) {
+    OS << "Below Value Cutoff functions: " << BelowCutoffFunctions << "\n";
+    OS << "Number of Functions with maximum Count (>= " << ValueCutoff
----------------
Number of functions with maximum count (< " << ValueCutoff << "): " << ..


================
Comment at: tools/llvm-profdata/llvm-profdata.cpp:813
+    OS << "Below Value Cutoff functions: " << BelowCutoffFunctions << "\n";
+    OS << "Number of Functions with maximum Count (>= " << ValueCutoff
+       << "): " << PS->getNumFunctions() - BelowCutoffFunctions;
----------------
Functions -> functions


================
Comment at: tools/llvm-profdata/llvm-profdata.cpp:922
+               "less than this value will not be printed out. (Default is 0)"));
+  cl::opt<bool> ListBelow(
+      "list-below-cutoff", cl::init(false),
----------------
ListBelow --> OnlyListBelow


================
Comment at: tools/llvm-profdata/llvm-profdata.cpp:924
+      "list-below-cutoff", cl::init(false),
+      cl::desc("Print out the functions that with maximum count less than "
+               "ValueCutoff"));
----------------
The semantics seems to be 'only list functions with ...'


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

https://reviews.llvm.org/D56342





More information about the llvm-commits mailing list