[PATCH] D25456: [InstrProf] Add support for dead_strip+live_support functionality

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 10 21:40:33 PDT 2016


mehdi_amini added inline comments.


================
Comment at: include/llvm/ProfileData/InstrProf.h:58
   return AddSegment ? "__DATA," INSTR_PROF_DATA_SECT_NAME_STR
+                      ",regular,live_support"
                     : INSTR_PROF_DATA_SECT_NAME_STR;
----------------
davidxl wrote:
> What is the exact meaning of this attribute? Does it mark the section 'not' the  root of the reference graph (which allows symbols just referenced from this section to be GCed)?
> 
> Garbage collection for dead function (with profile instrumentation) is currently also broken on Linux because -fdata-sections is not honored by for prof data symbols.
I see this section as "reversing" the edges in the dead-strip algorithm: if a symbol foo is in the live_support section, the linker will keep it alive if the symbols *referenced by* foo are live.
(Nothing is expected to reference foo).


https://reviews.llvm.org/D25456





More information about the llvm-commits mailing list