[llvm] [MemProf] Prune unneeded non-cold contexts (PR #124823)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 28 15:38:40 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"));
----------------
teresajohnson wrote:

I will change the description. But I wanted to point out that we are not currently using -memprof-cloning-cold-threshold, only -memprof-matching-cold-threshold which doesn't rely on the metadata. I would like to keep the default here true to reduce overhead by default.

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


More information about the llvm-commits mailing list