[all-commits] [llvm/llvm-project] 3a4d37: [memprof] Align each rawprofile section to 8b.

Snehasish Kumar via All-commits all-commits at lists.llvm.org
Tue Nov 30 20:19:17 PST 2021

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3a4d373ec2ba676dc91fba06631a776785f8a6eb
  Author: Snehasish Kumar <snehasishk at google.com>
  Date:   2021-11-30 (Tue, 30 Nov 2021)

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

  Log Message:
  [memprof] Align each rawprofile section to 8b.

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.

Differential Revision: https://reviews.llvm.org/D114826

More information about the All-commits mailing list