[all-commits] [llvm/llvm-project] d3dd07: Revert "[profile] Fix profile merging with binary ...

Petr Hosek via All-commits all-commits at lists.llvm.org
Fri Jul 30 18:56:33 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d3dd07e3d05a72da8834044d2efa885845c7d879
      https://github.com/llvm/llvm-project/commit/d3dd07e3d05a72da8834044d2efa885845c7d879
  Author: Petr Hosek <phosek at google.com>
  Date:   2021-07-30 (Fri, 30 Jul 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/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:
  -----------
  Revert "[profile] Fix profile merging with binary IDs"

This reverts commit dcadd64986b8a84dc244d4e7faa848fb4c18cea6.


  Commit: 83302c84890e5e6cb74c7d6c9f8eaaa56db0077c
      https://github.com/llvm/llvm-project/commit/83302c84890e5e6cb74c7d6c9f8eaaa56db0077c
  Author: Petr Hosek <phosek at google.com>
  Date:   2021-07-30 (Fri, 30 Jul 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


Compare: https://github.com/llvm/llvm-project/compare/dfb6f7b01595...83302c84890e


More information about the All-commits mailing list