diff options
| -rw-r--r-- | compiler-rt/test/profile/Inputs/instrprof-value-prof-real.c | 17 | ||||
| -rw-r--r-- | compiler-rt/test/profile/instrprof-value-prof.test | 4 |
2 files changed, 19 insertions, 2 deletions
diff --git a/compiler-rt/test/profile/Inputs/instrprof-value-prof-real.c b/compiler-rt/test/profile/Inputs/instrprof-value-prof-real.c index 9ce6aeaa93c..65e57990072 100644 --- a/compiler-rt/test/profile/Inputs/instrprof-value-prof-real.c +++ b/compiler-rt/test/profile/Inputs/instrprof-value-prof-real.c @@ -46,6 +46,23 @@ int main() { Fp = getFunc(511 - I); for (J = 0; J < 2000 - I; J++) Fp(); +#ifdef STRESS + Fp = getFunc(I); + for (J = 0; J < 2000 - I; J++) + Fp(); + + Fp = getFunc(I); + for (J = 0; J < 2000 - I; J++) + Fp(); + + Fp = getFunc(I); + for (J = 0; J < 2000 - I; J++) + Fp(); + + Fp = getFunc(I); + for (J = 0; J < 2000 - I; J++) + Fp(); +#endif } #ifdef CALL_SHARED shared_entry(); diff --git a/compiler-rt/test/profile/instrprof-value-prof.test b/compiler-rt/test/profile/instrprof-value-prof.test index dc936435724..72b29cfc4dd 100644 --- a/compiler-rt/test/profile/instrprof-value-prof.test +++ b/compiler-rt/test/profile/instrprof-value-prof.test @@ -11,8 +11,8 @@ // RUN: llvm-profdata merge -text %t.ir.profdata -o %t.ir.proftxt // RUN: FileCheck %S/Inputs/instrprof-value-prof-real.c --check-prefix=IR < %t.ir.proftxt -// RUN: %clang_profgen -O2 -mllvm -disable-vp=false -Xclang -fprofile-instrument=llvm -mllvm -vp-static-alloc=true -o %t.ir.warn %S/Inputs/instrprof-value-prof-real.c -// RUN: env LLVM_PROFILE_FILE=%t.ir.profraw %run %t.ir.warn 2>&1 |FileCheck --check-prefix=WARNING %s +// RUN: %clang_profgen -O2 -mllvm -disable-vp=false -Xclang -fprofile-instrument=llvm -mllvm -vp-static-alloc=true -DSTRESS=1 -o %t.ir.warn %S/Inputs/instrprof-value-prof-real.c +// RUN: env LLVM_PROFILE_FILE=%t.ir.profraw LLVM_VP_MAX_NUM_VALS_PER_SITE=255 %run %t.ir.warn 2>&1 |FileCheck --check-prefix=WARNING %s // IR level instrumentation with dynamic memory allocation // RUN: %clang_profgen -O2 -mllvm -disable-vp=false -Xclang -fprofile-instrument=llvm -mllvm -vp-static-alloc=false -mllvm -vp-counters-per-site=256 -o %t.ir.dyn %S/Inputs/instrprof-value-prof-real.c |

