[PATCH] D129107: [BOLT][HUGIFY] adds huge pages support of PIE/no-PIE binaries
Rafael Auler via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 28 11:13:43 PDT 2022
rafauler added a comment.
Thanks! I think we can simplify this a bit further. Let me know what you think.
================
Comment at: bolt/runtime/hugify.cpp:95
-static void hugify_for_old_kernel(uint8_t *from, uint8_t *to) {
- size_t size = to - from;
+static void hugifyForOldKernel(uint8_t *From, uint8_t *AlignedFrom,
+ uint8_t *AlignedTo) {
----------------
Remove From
================
Comment at: bolt/runtime/hugify.cpp:97
+ uint8_t *AlignedTo) {
+ const size_t Size = AlignedTo - From;
+ const size_t AlignedSize = AlignedTo - AlignedFrom;
----------------
Remove line, use AlignedSize only
================
Comment at: bolt/runtime/hugify.cpp:160
+ "[hugify] workaround with memory alignment for kernel < 5.10\n");)
+ hugifyForOldKernel(HotStart, From, To);
return;
----------------
Here pass only From,To
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129107/new/
https://reviews.llvm.org/D129107
More information about the llvm-commits
mailing list