Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion compiler-rt/test/profile/Linux/counter_promo_for.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
// RUN: %run %t.nopromo.gen
// RUN: llvm-profdata merge -o %t.nopromo.profdata %t.nopromo.prof/
// RUN: llvm-profdata show --counts --all-functions %t.nopromo.profdata > %t.nopromo.dump
// RUN: diff <(llvm-profdata show %t.promo.profdata) <(llvm-profdata show %t.nopromo.profdata)
// RUN: llvm-profdata show %t.promo.profdata > %t.promo.dump
// RUN: llvm-profdata show %t.nopromo.profdata > %t.nopromo.dump
// RUN: diff %t.promo.dump %t.nopromo.dump

int g;
__attribute__((noinline)) void bar(int i) { g += i; }
Expand Down
4 changes: 3 additions & 1 deletion compiler-rt/test/profile/Linux/counter_promo_nest.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
// RUN: %run %t.nopromo.gen
// RUN: llvm-profdata merge -o %t.nopromo.profdata %t.nopromo.prof/
// RUN: llvm-profdata show --counts --all-functions %t.nopromo.profdata > %t.nopromo.dump
// RUN: diff <(llvm-profdata show %t.promo.profdata) <(llvm-profdata show %t.nopromo.profdata)
// RUN: llvm-profdata show %t.promo.profdata > %t.promo.dump
// RUN: llvm-profdata show %t.nopromo.profdata > %t.nopromo.dump
// RUN: diff %t.promo.dump %t.nopromo.dump
int g;
__attribute__((noinline)) void bar() {
g++;
Expand Down
4 changes: 3 additions & 1 deletion compiler-rt/test/profile/Linux/counter_promo_while.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
// RUN: %run %t.nopromo.gen
// RUN: llvm-profdata merge -o %t.nopromo.profdata %t.nopromo.prof/
// RUN: llvm-profdata show --counts --all-functions %t.nopromo.profdata > %t.nopromo.dump
// RUN: diff <(llvm-profdata show %t.promo.profdata) <(llvm-profdata show %t.nopromo.profdata)
// RUN: llvm-profdata show %t.promo.profdata > %t.promo.dump
// RUN: llvm-profdata show %t.nopromo.profdata > %t.nopromo.dump
// RUN: diff %t.promo.dump %t.nopromo.dump
int g;
__attribute__((noinline)) void bar(int i) { g += i; }
__attribute__((noinline)) void foo(int n, int N) {
Expand Down
20 changes: 15 additions & 5 deletions compiler-rt/test/profile/Linux/instrprof-debug-info-correlate.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@
// 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 --all-functions --counts %t.normal.profdata) <(llvm-profdata show --all-functions --counts %t.d4.profdata)
// RUN: llvm-profdata show --all-functions --counts %t.normal.profdata > %t.normal.dump
// RUN: llvm-profdata show --all-functions --counts %t.d4.profdata > %t.d4.dump
// RUN: diff %t.normal.dump %t.d4.dump

// 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 --all-functions --counts %t.normal.profdata) <(llvm-profdata show --all-functions --counts %t.profdata)
// RUN: llvm-profdata show --all-functions --counts %t.normal.profdata > %t.normal2.dump
// RUN: llvm-profdata show --all-functions --counts %t.profdata > %t.prof.dump
// RUN: diff %t.normal2.dump %t.prof.dump

// 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
Expand All @@ -23,7 +27,9 @@
// 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 --all-functions --counts %t.cov.normal.profdata) <(llvm-profdata show --all-functions --counts %t.cov.profdata)
// RUN: llvm-profdata show --all-functions --counts %t.cov.normal.profdata > %t.cov.normal.dump
// RUN: llvm-profdata show --all-functions --counts %t.cov.profdata > %t.cov.dump
// RUN: diff %t.cov.normal.dump %t.cov.dump

// Test debug info correlate with online merging.

Expand All @@ -36,11 +42,15 @@
// RUN: env LLVM_PROFILE_FILE=%t.profdir/%m.proflite %run %t
// RUN: llvm-profdata merge -o %t.profdata --debug-info=%t %t.profdir/

// RUN: diff <(llvm-profdata show --all-functions --counts %t.normal.profdata) <(llvm-profdata show --all-functions --counts %t.profdata)
// RUN: llvm-profdata show --all-functions --counts %t.normal.profdata > %t.normal3.dump
// RUN: llvm-profdata show --all-functions --counts %t.profdata > %t.prof3.dump
// RUN: diff %t.normal3.dump %t.prof3.dump

// RUN: rm -rf %t.profdir && mkdir %t.profdir
// RUN: env LLVM_PROFILE_FILE=%t.profdir/%m.cov.proflite %run %t.cov
// RUN: env LLVM_PROFILE_FILE=%t.profdir/%m.cov.proflite %run %t.cov
// RUN: llvm-profdata merge -o %t.cov.profdata --debug-info=%t.cov %t.profdir/

// RUN: diff <(llvm-profdata show --all-functions --counts %t.cov.normal.profdata) <(llvm-profdata show --all-functions --counts %t.cov.profdata)
// RUN: llvm-profdata show --all-functions --counts %t.cov.normal.profdata > %t.cov.normal2.dump
// RUN: llvm-profdata show --all-functions --counts %t.cov.profdata > %t.cov2.dump
// RUN: diff %t.cov.normal2.dump %t.cov2.dump