57 lines · c
1// Value profiling is currently not supported in lightweight mode.2// 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.cpp3// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t.normal4// RUN: llvm-profdata merge -o %t.normal.profdata %t.profraw5 6// RUN: %clang_pgogen -o %t.d4 -g -gdwarf-4 -mllvm --profile-correlate=debug-info -mllvm --disable-vp=true %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instrprof-debug-info-correlate-foo.cpp7// RUN: env LLVM_PROFILE_FILE=%t.d4.proflite %run %t.d48// RUN: llvm-profdata merge -o %t.d4.profdata --debug-info=%t.d4 %t.d4.proflite9 10// RUN: llvm-profdata show --all-functions --counts %t.normal.profdata > %t.normal.dump11// RUN: llvm-profdata show --all-functions --counts %t.d4.profdata > %t.d4.dump12// RUN: diff %t.normal.dump %t.d4.dump13 14// RUN: %clang_pgogen -o %t -g -mllvm --profile-correlate=debug-info -mllvm --disable-vp=true %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instrprof-debug-info-correlate-foo.cpp15// RUN: env LLVM_PROFILE_FILE=%t.proflite %run %t16// RUN: llvm-profdata merge -o %t.profdata --debug-info=%t %t.proflite17 18// RUN: llvm-profdata show --all-functions --counts %t.normal.profdata > %t.normal2.dump19// RUN: llvm-profdata show --all-functions --counts %t.profdata > %t.prof.dump20// RUN: diff %t.normal2.dump %t.prof.dump21 22// RUN: %clang_pgogen -o %t.cov -g -mllvm --profile-correlate=debug-info -mllvm -pgo-function-entry-coverage -mllvm --disable-vp=true %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instrprof-debug-info-correlate-foo.cpp23// RUN: env LLVM_PROFILE_FILE=%t.cov.proflite %run %t.cov24// RUN: llvm-profdata merge -o %t.cov.profdata --debug-info=%t.cov %t.cov.proflite25 26// 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.cpp27// RUN: env LLVM_PROFILE_FILE=%t.cov.profraw %run %t.cov.normal28// RUN: llvm-profdata merge -o %t.cov.normal.profdata %t.cov.profraw29 30// RUN: llvm-profdata show --all-functions --counts %t.cov.normal.profdata > %t.cov.normal.dump31// RUN: llvm-profdata show --all-functions --counts %t.cov.profdata > %t.cov.dump32// RUN: diff %t.cov.normal.dump %t.cov.dump33 34// Test debug info correlate with online merging.35 36// RUN: env LLVM_PROFILE_FILE=%t-1.profraw %run %t.normal37// RUN: env LLVM_PROFILE_FILE=%t-2.profraw %run %t.normal38// RUN: llvm-profdata merge -o %t.normal.profdata %t-1.profraw %t-2.profraw39 40// RUN: rm -rf %t.profdir && mkdir %t.profdir41// RUN: env LLVM_PROFILE_FILE=%t.profdir/%m.proflite %run %t42// RUN: env LLVM_PROFILE_FILE=%t.profdir/%m.proflite %run %t43// RUN: llvm-profdata merge -o %t.profdata --debug-info=%t %t.profdir/44 45// RUN: llvm-profdata show --all-functions --counts %t.normal.profdata > %t.normal3.dump46// RUN: llvm-profdata show --all-functions --counts %t.profdata > %t.prof3.dump47// RUN: diff %t.normal3.dump %t.prof3.dump48 49// RUN: rm -rf %t.profdir && mkdir %t.profdir50// RUN: env LLVM_PROFILE_FILE=%t.profdir/%m.cov.proflite %run %t.cov51// RUN: env LLVM_PROFILE_FILE=%t.profdir/%m.cov.proflite %run %t.cov52// RUN: llvm-profdata merge -o %t.cov.profdata --debug-info=%t.cov %t.profdir/53 54// RUN: llvm-profdata show --all-functions --counts %t.cov.normal.profdata > %t.cov.normal2.dump55// RUN: llvm-profdata show --all-functions --counts %t.cov.profdata > %t.cov2.dump56// RUN: diff %t.cov.normal2.dump %t.cov2.dump57