llvm-project/llvm/tools/llvm-profgen
Hongtao Yu 34e131b0f2 [llvm-profgen] On-demand track optimized-away inlinees for preinliner.
Tracking optimized-away inlinees based on all probes in a binary is expansive in terms of memory usage I'm making the tracking on-demand based on profiled functions only. This saves about 10%  memory overall for a medium-sized benchmark.

Before:

   note: After parsePerfTraces
   note: Thu Jan 27 18:42:09 2022
   note: VM: 8.68 GB   RSS: 8.39 GB
   note: After computeSizeForProfiledFunctions
   note: Thu Jan 27 18:42:41 2022
   note: **VM: 10.63 GB   RSS: 10.20 GB**
   note: After generateProbeBasedProfile
   note: Thu Jan 27 18:45:49 2022
   note: VM: 25.00 GB   RSS: 24.95 GB
   note: After postProcessProfiles
   note: Thu Jan 27 18:49:29 2022
   note: VM: 26.34 GB   RSS: 26.27 GB

After:
   note: After parsePerfTraces
   note: Fri Jan 28 12:04:49 2022
   note: VM: 8.68 GB   RSS: 7.65 GB
   note: After computeSizeForProfiledFunctions
   note: Fri Jan 28 12:05:26 2022
   note: **VM: 8.68 GB   RSS: 8.42 GB**
   note: After generateProbeBasedProfile
   note: Fri Jan 28 12:08:03 2022
   note: VM: 22.93 GB   RSS: 22.89 GB
   note: After postProcessProfiles
   note: Fri Jan 28 12:11:30 2022
   note: VM: 24.27 GB   RSS: 24.22 GB

This should be a no-diff change in terms of profile quality.

Reviewed By: wenlei

Differential Revision: https://reviews.llvm.org/D118515
2022-02-08 08:33:23 -08:00
..
CMakeLists.txt [llvm-profgen] Switch to DWARF-based symbol and ranges 2021-10-29 09:59:12 -07:00
CSPreInliner.cpp [llvm-profgen] Turn on preinliner by default 2021-12-14 17:46:57 -08:00
CSPreInliner.h [CSSPGO] Split context string to deduplicate function name used in the context. 2021-08-30 20:09:29 -07:00
CallContext.h [CSSPGO] Rename the field of SampleContextFrame 2021-10-04 19:06:59 -07:00
ErrorHandling.h [llvm-profgen] Fix bug of setting function entry 2021-11-12 12:18:43 -08:00
PerfReader.cpp [llvm-profgen] Clean up unnecessary memory reservations between phases. 2022-02-01 16:27:54 -08:00
PerfReader.h [CSSPGO][llvm-profgen] Fix external address issues of perf reader (return to external addr part) 2021-12-14 16:40:54 -08:00
ProfileGenerator.cpp [llvm-profgen] On-demand track optimized-away inlinees for preinliner. 2022-02-08 08:33:23 -08:00
ProfileGenerator.h [CSSPGO] Use nested context-sensitive profile. 2021-12-14 14:40:25 -08:00
ProfiledBinary.cpp [llvm-profgen] On-demand track optimized-away inlinees for preinliner. 2022-02-08 08:33:23 -08:00
ProfiledBinary.h [llvm-profgen] On-demand track optimized-away inlinees for preinliner. 2022-02-08 08:33:23 -08:00
llvm-profgen.cpp Revert "[llvm-profgen] Clean up unnecessary memory reservations between phases." 2022-02-01 14:44:48 -08:00