[PATCH] D87840: [lld] Add a new known text prefix - ".text.split."

Snehasish Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 17 10:07:30 PDT 2020


snehasish created this revision.
snehasish added a reviewer: MaskRay.
Herald added subscribers: llvm-commits, arichardson, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
snehasish requested review of this revision.

".text.split." holds symbols which are split out from functions in
other input sections. For example, with -fsplit-machine-functions,
placing the cold parts in .text.split instead of .text.unlikely mitigates
against poor profile inaccuracy. Techniques such as hugepage remapping can
make conservative decisions at the section granularity.
Additionally we find small improvement in icache and tlb metrics (3-5%)
due to improved locality.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D87840

Files:
  lld/ELF/Writer.cpp


Index: lld/ELF/Writer.cpp
===================================================================
--- lld/ELF/Writer.cpp
+++ lld/ELF/Writer.cpp
@@ -131,9 +131,15 @@
   // SampleFDO is used, if a function doesn't have sample, it could be very
   // cold or it could be a new function never being sampled. Those functions
   // will be kept in the ".text.unknown" section.
+  // ".text.split." holds symbols which are split out from functions in other
+  // input sections. For example, with -fsplit-machine-functions, placing the
+  // cold parts in .text.split instead of .text.unlikely mitigates against poor
+  // profile inaccuracy. Techniques such as hugepage remapping can make
+  // conservative decisions at the section granularity. Additionally we find
+  // small improvement in icache and tlb metrics due to improved locality.
   if (config->zKeepTextSectionPrefix)
     for (StringRef v : {".text.hot.", ".text.unknown.", ".text.unlikely.",
-                        ".text.startup.", ".text.exit."})
+                        ".text.startup.", ".text.exit.", ".text.split."})
       if (isSectionPrefix(v, s->name))
         return v.drop_back();
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87840.292551.patch
Type: text/x-patch
Size: 1155 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200917/dd5752f3/attachment.bin>


More information about the llvm-commits mailing list