forked from OSchip/llvm-project
538208f6c0
For sampleFDO, because the optimized build uses profile generated from previous release, often we couldn't tell a function without profile was truely cold or just newly created so we had to treat them conservatively and put them in .text section instead of .text.unlikely. The result was when we persue the best performance by locking .text.hot and .text in memory, we wasted a lot of memory to keep cold functions inside. This problem has been largely solved for regular sampleFDO using profile-symbol-list (https://reviews.llvm.org/D66374), but for the case when we use partial profile, we still waste a lot of memory because of it. In https://reviews.llvm.org/D62540, we propose to save functions with unknown hotness information in a special section called ".text.unknown", so that compiler will treat those functions as luck-warm, but runtime can choose not to mlock the special section in memory or use other strategy to save memory. That will solve most of the memory problem even if we use a partial profile. The patch adds the support in lld for the special section.For sampleFDO, because the optimized build uses profile generated from previous release, often we couldn't tell a function without profile was truely cold or just newly created so we had to treat them conservatively and put them in .text section instead of .text.unlikely. The result was when we persue the best performance by locking .text.hot and .text in memory, we wasted a lot of memory to keep cold functions inside. This problem has been largely solved for regular sampleFDO using profile-symbol-list (https://reviews.llvm.org/D66374), but for the case when we use partial profile, we still waste a lot of memory because of it. In https://reviews.llvm.org/D62540, we propose to save functions with unknown hotness information in a special section called ".text.unknown", so that compiler will treat those functions as luck-warm, but runtime can choose not to mlock the special section in memory or use other strategy to save memory. That will solve most of the memory problem even if we use a partial profile. The patch adds the support in lld for the special section. Differential Revision: https://reviews.llvm.org/D79590 |
||
---|---|---|
.. | ||
Arch | ||
AArch64ErrataFix.cpp | ||
AArch64ErrataFix.h | ||
ARMErrataFix.cpp | ||
ARMErrataFix.h | ||
CMakeLists.txt | ||
CallGraphSort.cpp | ||
CallGraphSort.h | ||
Config.h | ||
DWARF.cpp | ||
DWARF.h | ||
Driver.cpp | ||
Driver.h | ||
DriverUtils.cpp | ||
EhFrame.cpp | ||
EhFrame.h | ||
ICF.cpp | ||
ICF.h | ||
InputFiles.cpp | ||
InputFiles.h | ||
InputSection.cpp | ||
InputSection.h | ||
LTO.cpp | ||
LTO.h | ||
LinkerScript.cpp | ||
LinkerScript.h | ||
MapFile.cpp | ||
MapFile.h | ||
MarkLive.cpp | ||
MarkLive.h | ||
Options.td | ||
OutputSections.cpp | ||
OutputSections.h | ||
README.md | ||
Relocations.cpp | ||
Relocations.h | ||
ScriptLexer.cpp | ||
ScriptLexer.h | ||
ScriptParser.cpp | ||
ScriptParser.h | ||
SymbolTable.cpp | ||
SymbolTable.h | ||
Symbols.cpp | ||
Symbols.h | ||
SyntheticSections.cpp | ||
SyntheticSections.h | ||
Target.cpp | ||
Target.h | ||
Thunks.cpp | ||
Thunks.h | ||
Writer.cpp | ||
Writer.h |
README.md
See docs/NewLLD.rst