[PATCH] D107800: [CSSPGO][llvm-profgen] Cap context stack to reduce memory usage
Hongtao Yu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 10 17:06:32 PDT 2021
hoy added inline comments.
================
Comment at: llvm/tools/llvm-profgen/PerfReader.cpp:23
extern cl::opt<bool> ShowSourceLocations;
+extern cl::opt<int> CSProfCtxStackCap;
----------------
Nit: move this into ProfileGenerator.h to reduct the number of declarations?
================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.cpp:53
+cl::opt<int> CSProfCtxStackCap(
+ "csprof-ctx-stack-cap", cl::init(20), cl::ZeroOrMore,
+ cl::desc("Cap context stack at a given depth. No cap if the input is -1."));
----------------
wenlei wrote:
> I think we could unify the switch names, e.g. `csprof-max-context-depth` and `csprof-max-cold-context-depth`?
Thanks for working on this. We probably do not inline so many levels of functions. But would be good to run through some perf testing or to turn this off by default.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107800/new/
https://reviews.llvm.org/D107800
More information about the llvm-commits
mailing list