1 ; RUN: llvm-profgen --format=text --perfscript=%S/Inputs/noinline-cs-pseudoprobe.perfscript --binary=%S/Inputs/noinline-cs-pseudoprobe.perfbin --output=%t --show-unwinder-output --profile-summary-cold-count=0 | FileCheck %s --check-prefix=CHECK-UNWINDER
2 ; RUN: FileCheck %s --input-file %t
3 ; RUN: llvm-profgen --format=text --perfscript=%S/Inputs/noinline-cs-pseudoprobe.aggperfscript --binary=%S/Inputs/noinline-cs-pseudoprobe.perfbin --output=%t --show-unwinder-output --profile-summary-cold-count=0 | FileCheck %s --check-prefix=CHECK-UNWINDER
4 ; RUN: FileCheck %s --input-file %t
7 ; CHECK: [main:2 @ foo]:75:0
15 ; CHECK-NEXT: 8: 15 bar:15
17 ; CHECK-NEXT: !CFGChecksum: 563088904013236
18 ; CHECK:[main:2 @ foo:8 @ bar]:30:15
21 ; CHECK-NEXT: !CFGChecksum: 72617220756
24 ; CHECK-UNWINDER: Binary(noinline-cs-pseudoprobe.perfbin)'s Range Counter:
25 ; CHECK-UNWINDER-NEXT: main:2
26 ; CHECK-UNWINDER-NEXT: (79e, 7bf): 15
27 ; CHECK-UNWINDER-NEXT: (7c4, 7cf): 15
28 ; CHECK-UNWINDER-NEXT: main:2 @ foo:8
29 ; CHECK-UNWINDER-NEXT: (760, 77f): 15
31 ; CHECK-UNWINDER: Binary(noinline-cs-pseudoprobe.perfbin)'s Branch Counter:
32 ; CHECK-UNWINDER-NEXT: main:2
33 ; CHECK-UNWINDER-NEXT: (7bf, 760): 15
34 ; CHECK-UNWINDER-NEXT: (7cf, 79e): 16
35 ; CHECK-UNWINDER-NEXT: main:2 @ foo:8
36 ; CHECK-UNWINDER-NEXT: (77f, 7c4): 17
39 ; clang -O3 -fexperimental-new-pass-manager -fuse-ld=lld -fpseudo-probe-for-profiling
40 ; -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Xclang -mdisable-tail-calls
41 ; -fno-inline-functions -g test.c -o a.out
45 int bar(int x, int y) {
54 while (i++ < 4000 * 4000)
55 if (i % 91) s = bar(i, s); else s += 30;
56 printf("sum is %d\n", s);