1 ; RUN: llvm-profgen --format=text --perfscript=%S/Inputs/noinline-cs-pseudoprobe.perfscript --binary=%S/Inputs/noinline-cs-pseudoprobe.perfbin --output=%t --skip-symbolization --profile-summary-cold-count=0
2 ; RUN: FileCheck %s --input-file %t --check-prefix=CHECK-UNWINDER
3 ; RUN: llvm-profgen --format=text --perfscript=%S/Inputs/noinline-cs-pseudoprobe.perfscript --binary=%S/Inputs/noinline-cs-pseudoprobe.perfbin --output=%t --profile-summary-cold-count=0 --csspgo-preinliner=0 --gen-cs-nested-profile=0
4 ; RUN: FileCheck %s --input-file %t
5 ; RUN: llvm-profgen --format=text --perfscript=%S/Inputs/noinline-cs-pseudoprobe.aggperfscript --binary=%S/Inputs/noinline-cs-pseudoprobe.perfbin --output=%t --skip-symbolization --profile-summary-cold-count=0
6 ; RUN: FileCheck %s --input-file %t --check-prefix=CHECK-UNWINDER
7 ; RUN: llvm-profgen --format=text --perfscript=%S/Inputs/noinline-cs-pseudoprobe.aggperfscript --binary=%S/Inputs/noinline-cs-pseudoprobe.perfbin --output=%t --profile-summary-cold-count=0 --csspgo-preinliner=0 --gen-cs-nested-profile=0
8 ; RUN: FileCheck %s --input-file %t
11 ; CHECK: [main:2 @ foo]:75:0
19 ; CHECK-NEXT: 8: 15 bar:15
21 ; CHECK-NEXT: !CFGChecksum: 563088904013236
22 ; CHECK:[main:2 @ foo:8 @ bar]:30:15
25 ; CHECK-NEXT: !CFGChecksum: 72617220756
27 ; CHECK-UNWINDER: [0x7f4]
28 ; CHECK-UNWINDER-NEXT: 2
29 ; CHECK-UNWINDER-NEXT: 79e-7bf:15
30 ; CHECK-UNWINDER-NEXT: 7c4-7cf:15
31 ; CHECK-UNWINDER-NEXT: 2
32 ; CHECK-UNWINDER-NEXT: 7bf->760:15
33 ; CHECK-UNWINDER-NEXT: 7cf->79e:16
34 ; CHECK-UNWINDER-NEXT: [0x7f4 @ 0x7bf]
35 ; CHECK-UNWINDER-NEXT: 1
36 ; CHECK-UNWINDER-NEXT: 760-77f:15
37 ; CHECK-UNWINDER-NEXT: 1
38 ; CHECK-UNWINDER-NEXT: 77f->7c4:17
41 ; clang -O3 -fuse-ld=lld -fpseudo-probe-for-profiling
42 ; -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Xclang -mdisable-tail-calls
43 ; -fno-inline-functions -g test.c -o a.out
47 int bar(int x, int y) {
56 while (i++ < 4000 * 4000)
57 if (i % 91) s = bar(i, s); else s += 30;
58 printf("sum is %d\n", s);