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
27 lines
1.9 KiB
C
27 lines
1.9 KiB
C
// Value profiling is currently not supported in lightweight mode.
|
|
// RUN: %clang_pgogen -o %t.normal -mllvm --disable-vp=true %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instrprof-debug-info-correlate-foo.cpp
|
|
// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t.normal
|
|
// RUN: llvm-profdata merge -o %t.normal.profdata %t.profraw
|
|
|
|
// RUN: %clang_pgogen -o %t.d4 -g -gdwarf-4 -mllvm --debug-info-correlate -mllvm --disable-vp=true %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instrprof-debug-info-correlate-foo.cpp
|
|
// RUN: env LLVM_PROFILE_FILE=%t.d4.proflite %run %t.d4
|
|
// RUN: llvm-profdata merge -o %t.d4.profdata --debug-info=%t.d4 %t.d4.proflite
|
|
|
|
// RUN: diff <(llvm-profdata show %t.normal.profdata) <(llvm-profdata show %t.d4.profdata)
|
|
|
|
// RUN: %clang_pgogen -o %t -g -mllvm --debug-info-correlate -mllvm --disable-vp=true %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instrprof-debug-info-correlate-foo.cpp
|
|
// RUN: env LLVM_PROFILE_FILE=%t.proflite %run %t
|
|
// RUN: llvm-profdata merge -o %t.profdata --debug-info=%t %t.proflite
|
|
|
|
// RUN: diff <(llvm-profdata show %t.normal.profdata) <(llvm-profdata show %t.profdata)
|
|
|
|
// RUN: %clang_pgogen -o %t.cov -g -mllvm --debug-info-correlate -mllvm -pgo-function-entry-coverage -mllvm --disable-vp=true %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instrprof-debug-info-correlate-foo.cpp
|
|
// RUN: env LLVM_PROFILE_FILE=%t.cov.proflite %run %t.cov
|
|
// RUN: llvm-profdata merge -o %t.cov.profdata --debug-info=%t.cov %t.cov.proflite
|
|
|
|
// RUN: %clang_pgogen -o %t.cov.normal -mllvm --pgo-function-entry-coverage -mllvm --disable-vp=true %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instrprof-debug-info-correlate-foo.cpp
|
|
// RUN: env LLVM_PROFILE_FILE=%t.cov.profraw %run %t.cov.normal
|
|
// RUN: llvm-profdata merge -o %t.cov.normal.profdata %t.cov.profraw
|
|
|
|
// RUN: diff <(llvm-profdata show %t.cov.normal.profdata) <(llvm-profdata show %t.cov.profdata)
|