[PATCH] D67726: [SampleFDO] Expose an interface to return the size of a section or the size of the profile for profile in ExtBinary format

Wei Mi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 19 11:16:43 PDT 2019


wmi added a comment.

In D67726#1675481 <https://reviews.llvm.org/D67726#1675481>, @davidxl wrote:

> Is the intended workflow to create a profile with full symbol list and then have an option to trim symbol list according to size impact? Why not do the trimming at the time of the profile creation?


Yes, that is the intended workflow. Because before creating the profile, we don't know how much size the profile will have especially after compression. For the size of profile symbol list section, we can estimate the size after compression, but since we already trim the profile iteratively by dropping symbols in FunctionSamples, regenerating the profile and reevaluating the size, I tend to use the same way to handle symbol list. The cons include longer profile generation time. The pros include preciseness -- when we limit the profile size to be 10M, the profile generated will be close to it but won't exceed it. If we estimate the size of the profile, there may be outliers.

We can have some methods to reduce the iterations of cutting the profile in the future. Currently it is not a problem.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D67726





More information about the llvm-commits mailing list