[PATCH] D137620: [BOLT] Don't align .text to pageAlign
Denis Revunov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 7 05:10:58 PST 2022
treapster added a comment.
> I don't have any performance data for regular-size pages. It will be good to collect some, e.g. for clang. If there's indeed no difference, we can do page-size alignment only for huge pages.
I'm not sure how to properly collect such data without polluting it with noise from OS and build system. Simply timing builds will produce a very diverse set of values without obvious correlation with the binary used.
> Is it b/c we assume there's nothing but a PHDR table before the code in the new segment?
Well, if we create new segment it's guaranteed there's nothing but a PHDR table before the code because we call mapCodeSections before anything else.
> Should we always align and disregarding the padding then (i.e. keep things as they are)? Sorry, if I missed your point.
My point is to align only when it makes sense, and aligning after PHDR does not. With use-old-text it's not so clear, so we can align in that case if you feel like it, but at least we shouldn't align after PHDR. And also it doesn't make sense to align to 2 MB in absence of hugify(because we won't get huge pages anyway), so i think we should act as if -no-huge-pages is true by default.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137620/new/
https://reviews.llvm.org/D137620
More information about the llvm-commits
mailing list