[llvm] [profdata] Use --hot-func-list to show all hot functions (PR #149428)

Mingming Liu via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 18 13:01:35 PDT 2025


================
@@ -2849,9 +2848,9 @@ static int showInstrProfile(ShowFormat SFormat, raw_fd_ostream &OS) {
   auto FS = vfs::getRealFileSystem();
   auto ReaderOrErr = InstrProfReader::create(Filename, *FS);
   std::vector<uint32_t> Cutoffs = std::move(DetailedSummaryCutoffs);
-  if (ShowDetailedSummary && Cutoffs.empty()) {
-    Cutoffs = ProfileSummaryBuilder::DefaultCutoffs;
-  }
+  if (Cutoffs.empty())
----------------
mingmingl-llvm wrote:

nit: remove nested if, something like 

```
if (Cutoffs.empty() && (ShowDetailedSummary || ShowHotFuncList)) {
    Cutoffs = ProfileSummaryBuilder::DefaultCutoffs;
}
```

https://github.com/llvm/llvm-project/pull/149428


More information about the llvm-commits mailing list