[PATCH] D114826: [memprof] Align each rawprofile section to 8b.
Snehasish Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 30 18:06:29 PST 2021
snehasish marked an inline comment as done.
snehasish added a comment.
PTAL, thanks!
================
Comment at: compiler-rt/lib/memprof/memprof_rawprofile.cpp:35
+// Returns the size rounded up to 8b.
+u64 alignedSize(const u64 Size) { return Size + Size % 8; }
} // namespace
----------------
vitalybuka wrote:
> tejohnson wrote:
> > Should this be Size + 8 - Size%8?
> RoundUpTo(size, 8)
>
> BTW why 8? should this be alignof(T) ?
Since each section in the profile starts with a u64, I hardcoded the value to 8. I added a comment to explain why.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114826/new/
https://reviews.llvm.org/D114826
More information about the llvm-commits
mailing list