[PATCH] D149684: [MemProf] Use profiled lifetime access density directly
Snehasish Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 2 13:38:22 PDT 2023
snehasish accepted this revision.
snehasish added a comment.
This revision is now accepted and ready to land.
lgtm
================
Comment at: llvm/lib/Analysis/MemoryProfileInfo.cpp:22
+// Upper bound on accesses per byte per sec for marking an allocation cold.
+cl::opt<float> MemProfAccessesPerBytePerSecColdThreshold(
+ "memprof-accesses-per-byte-per-sec-cold-threshold", cl::init(0.05),
----------------
AccessesPerBytePerSec seems to be synonymous to LifetimeAccessDensity which we use elsewhere in this patch. Can we use the same (latter) phrase for this option too? E.g `MemprofLifetimeAccessDensityColdThreshold`
Also update the options and description if you choose to adopt this suggestion.
================
Comment at: llvm/unittests/Analysis/MemoryProfileInfoTest.cpp:74
+ // so compute the TotalLifetime right at the threshold.
+ uint64_t TotalLifetimeThreshold =
+ MemProfAveLifetimeColdThreshold * AllocCount * 1000;
----------------
nit: const
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149684/new/
https://reviews.llvm.org/D149684
More information about the llvm-commits
mailing list