[PATCH] D139603: [llvm-profdata] Add option to cap profile output size

Snehasish Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 3 11:34:22 PST 2023


snehasish added inline comments.


================
Comment at: llvm/tools/llvm-profdata/llvm-profdata.cpp:981
+/// this class can be extended to satisfy such need.
+class FunctionPruningStrategy {
+  std::vector<NameFunctionSamples> Functions;
----------------
snehasish wrote:
> How about moving this to SampleProfileWriter so that we can use this API in other tooling where we don't invoke llvm-profdata?
Re-opening since I think we could move the RewriteProfileSizeLimit and CalculateNumFunctionsToRemove method to SampleProfileWriter as well so that this heuristic (and subsequent updates to it) can be reused in internal tooling directly. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139603/new/

https://reviews.llvm.org/D139603



More information about the llvm-commits mailing list