[llvm] [MemProf] Prune unneeded non-cold contexts (PR #124823)
Snehasish Kumar via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 28 15:19:53 PST 2025
================
@@ -51,6 +51,13 @@ cl::opt<bool> MemProfReportHintedSizes(
"memprof-report-hinted-sizes", cl::init(false), cl::Hidden,
cl::desc("Report total allocation sizes of hinted allocations"));
+// This is useful if we have enabled reporting of hinted sizes, and want to get
+// information from the indexing step for all contexts (especially for testing),
+// or have specified a value less than 100% for -memprof-cloning-cold-threshold.
+cl::opt<bool> MemProfKeepAllNotColdContexts(
+ "memprof-keep-all-not-cold-contexts", cl::init(false), cl::Hidden,
+ cl::desc("Disable pruning of non-cold contexts unneeded for cold cloning"));
----------------
snehasish wrote:
nit: The current description is a bit hard to parse how about "Keep all non-cold contexts (increases cloning overheads)" instead of the current description.
Also should the default be `true` (existing behaviour) since internal users set `-memprof-cloning-cold-threshold` to less than 100?
https://github.com/llvm/llvm-project/pull/124823
More information about the llvm-commits
mailing list