[PATCH] D110449: [llvm-profdata] Extend support of --topn to sample profiles
Wenlei He via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 24 15:04:03 PDT 2021
wenlei added a comment.
`hot-func-list` of sample pgo is the equivalent of `topn` for instr pgo. Sample pgo diverged from instr pgo here in the sense we use `hot-func-list` to print a hot function list where "hot" is defined by the dyn-instr percentile based threshold. So simply adding topn might be confusing, as using topn alone for sample pgo won't print the hot function list, unlike instr pgo.
if you want to grow or trim the hot function list, you could use the threshold cutoff switches. Ideally we should unify the switches for both instr pgo and sample pgo.
================
Comment at: llvm/tools/llvm-profdata/llvm-profdata.cpp:2352
static int showHotFunctionList(const sampleprof::SampleProfileMap &Profiles,
- ProfileSummary &PS, raw_fd_ostream &OS) {
+ ProfileSummary &PS, uint32_t topN,
+ raw_fd_ostream &OS) {
----------------
nit: TopN
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110449/new/
https://reviews.llvm.org/D110449
More information about the llvm-commits
mailing list