[PATCH] D118515: [llvm-profgen] On-demand track optimized-away inlinees for preinliner.

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 7 23:20:47 PST 2022


wenlei accepted this revision.
wenlei added a comment.
This revision is now accepted and ready to land.

lgtm, thanks.



================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.cpp:608-609
+
+  // Flush the symbolizer to save memory.
+  Binary->flushSymbolizer();
 }
----------------
hoy wrote:
> wenlei wrote:
> > It is weird to have profile generator flush symbolizer of ProfileBinary, how much saving is this comparing to on-demand context size tracking?  
> > 
> > I assume the symbolization here is only needed for dwarf base profile, can we free symbolizer for probe profile generation right after ProfiledBinary::load? 
> The symbolizer consumes quite some memory and it's needed in both probe and dwarf case to calculate code sizes for inlinees.  Perhaps I should just reset the symbolizer pointer instead of flushing it.
Ok, sounds good. It works for saving memory, but just wanted to note that this is hacky to flush symbolizer owned by ProfiledBinary at a random place by its user and yet APIs of ProfiledBinary depend on the availability of symbolizer.. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118515



More information about the llvm-commits mailing list