[all-commits] [llvm/llvm-project] a6c14f: [profile] Fix profile merging with binary IDs

Petr Hosek via All-commits all-commits at lists.llvm.org
Thu Aug 12 22:47:12 PDT 2021


  Branch: refs/heads/release/13.x
  Home:   https://github.com/llvm/llvm-project
  Commit: a6c14fba70e170a279f7e77f068368f09d8c5eaf
      https://github.com/llvm/llvm-project/commit/a6c14fba70e170a279f7e77f068368f09d8c5eaf
  Author: Petr Hosek <phosek at google.com>
  Date:   2021-08-12 (Thu, 12 Aug 2021)

  Changed paths:
    M compiler-rt/include/profile/InstrProfData.inc
    M compiler-rt/lib/profile/InstrProfilingBuffer.c
    M compiler-rt/lib/profile/InstrProfilingMerge.c
    M compiler-rt/test/profile/Linux/binary-id.c
    M llvm/include/llvm/ProfileData/InstrProf.h
    M llvm/include/llvm/ProfileData/InstrProfData.inc
    M llvm/lib/ProfileData/InstrProfReader.cpp
    M llvm/test/tools/llvm-profdata/Inputs/c-general.profraw
    M llvm/test/tools/llvm-profdata/Inputs/compressed.profraw
    M llvm/test/tools/llvm-profdata/malformed-ptr-to-counter-array.test
    M llvm/test/tools/llvm-profdata/raw-32-bits-be.test
    M llvm/test/tools/llvm-profdata/raw-32-bits-le.test
    M llvm/test/tools/llvm-profdata/raw-64-bits-be.test
    M llvm/test/tools/llvm-profdata/raw-64-bits-le.test
    M llvm/test/tools/llvm-profdata/raw-two-profiles.test

  Log Message:
  -----------
  [profile] Fix profile merging with binary IDs

This fixes support for merging profiles which broke as a consequence
of e50a38840dc3db5813f74b1cd2e10e6d984d0e67. The issue was missing
adjustment in merge logic to account for the binary IDs which are
now included in the raw profile just after header.

In addition, this change also:
* Includes the version in module signature that's used for merging
to avoid accidental attempts to merge incompatible profiles.
* Moves the binary IDs size field after version field in the header
as was suggested in the review.

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

(cherry picked from commit 83302c84890e5e6cb74c7d6c9f8eaaa56db0077c)




More information about the All-commits mailing list