[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 16:01:09 PST 2021


snehasish created this revision.
snehasish added a reviewer: davidxl.
Herald added a subscriber: hiraditya.
snehasish requested review of this revision.
Herald added projects: Sanitizers, LLVM.
Herald added subscribers: llvm-commits, Sanitizers.

The first 8b of each raw profile section need to be aligned to 8b since
the first item in each section is a u64 count of the number of items in
the section.
Summary of changes:

- Assert alignment when reading counts.
- Update test to check alignment, relax some size checks to allow padding.
- Update raw binary inputs for llvm-profdata tests.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D114826

Files:
  compiler-rt/lib/memprof/memprof_rawprofile.cpp
  compiler-rt/lib/memprof/tests/rawprofile.cpp
  llvm/lib/ProfileData/RawMemProfReader.cpp
  llvm/test/tools/llvm-profdata/Inputs/basic.memprofraw
  llvm/test/tools/llvm-profdata/Inputs/multi.memprofraw
  llvm/test/tools/llvm-profdata/memprof-basic.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114826.390846.patch
Type: text/x-patch
Size: 6893 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211201/ba38e6f2/attachment.bin>


More information about the llvm-commits mailing list