[profile] Add binary ids into indexed profiles
authorGulfem Savrun Yeniceri <gulfem@google.com>
Thu, 13 Oct 2022 00:50:10 +0000 (00:50 +0000)
committerGulfem Savrun Yeniceri <gulfem@google.com>
Thu, 29 Dec 2022 18:46:56 +0000 (18:46 +0000)
commit1ae7d83803e45f6053ec6a606f259653846926b8
tree5ebdc66aad135a8e2cb2e6ec81ae73982ae0eb9b
parentdf9400c579df37e25dc48162ebde7583fe943952
[profile] Add binary ids into indexed profiles

This patch adds support for including binary ids in an indexed profile.
It adds a new field into the header that points to the offset of the
binary id section. The binary id section consists of a size of the
section, and a list of binary ids (if they are present) that consist
of two parts: length and data.

This patch guarantees that indexed profile is backwards compatible
after adding binary ids.

Differential Revision: https://reviews.llvm.org/D135929
14 files changed:
compiler-rt/include/profile/InstrProfData.inc
compiler-rt/test/profile/Linux/binary-id.c
compiler-rt/test/profile/Linux/counter_promo_for.c
compiler-rt/test/profile/Linux/counter_promo_nest.c
compiler-rt/test/profile/Linux/counter_promo_while.c
compiler-rt/test/profile/Linux/instrprof-debug-info-correlate.c
llvm/include/llvm/ProfileData/InstrProf.h
llvm/include/llvm/ProfileData/InstrProfData.inc
llvm/include/llvm/ProfileData/InstrProfReader.h
llvm/include/llvm/ProfileData/InstrProfWriter.h
llvm/lib/ProfileData/InstrProf.cpp
llvm/lib/ProfileData/InstrProfReader.cpp
llvm/lib/ProfileData/InstrProfWriter.cpp
llvm/tools/llvm-profdata/llvm-profdata.cpp