1 ;; The test fails on Windows. Fix it before removing the following requirement.
2 ; REQUIRES: x86_64-linux
3 ; RUN: llvm-profgen --format=text --perfscript=%S/Inputs/cs-interrupt.perfscript --binary=%S/Inputs/noinline-cs-noprobe.perfbin --output=%t --skip-symbolization --profile-summary-cold-count=0 --csspgo-preinliner=0 --gen-cs-nested-profile=0
4 ; RUN: FileCheck %s --input-file %t --check-prefix=CHECK-UNWINDER
5 ; RUN: llvm-profgen --format=text --perfscript=%S/Inputs/cs-interrupt.perfscript --binary=%S/Inputs/noinline-cs-noprobe.perfbin --output=%t --profile-summary-cold-count=0 --csspgo-preinliner=0 --gen-cs-nested-profile=0
6 ; RUN: FileCheck %s --input-file %t
8 ; CHECK: [main:1 @ foo]:72:0
11 ; CHECK: [main:1 @ foo:3 @ bar]:67:4
24 ; CHECK-UNWINDER-NEXT: 0
25 ; CHECK-UNWINDER-NEXT: 1
26 ; CHECK-UNWINDER-NEXT: ffffffffffc00001->5c3:1
27 ; CHECK-UNWINDER-NEXT: [bar]
28 ; CHECK-UNWINDER-NEXT: 1
29 ; CHECK-UNWINDER-NEXT: 5b0-5c3:1
30 ; CHECK-UNWINDER-NEXT: 0
31 ; CHECK-UNWINDER-NEXT: [foo]
32 ; CHECK-UNWINDER-NEXT: 2
33 ; CHECK-UNWINDER-NEXT: 5ff-62f:2
34 ; CHECK-UNWINDER-NEXT: 645-645:2
35 ; CHECK-UNWINDER-NEXT: 3
36 ; CHECK-UNWINDER-NEXT: 62f->5b0:2
37 ; CHECK-UNWINDER-NEXT: 637->645:2
38 ; CHECK-UNWINDER-NEXT: 645->5ff:2
39 ; CHECK-UNWINDER-NEXT: [main:1 @ foo]
40 ; CHECK-UNWINDER-NEXT: 3
41 ; CHECK-UNWINDER-NEXT: 5ff-62f:4
42 ; CHECK-UNWINDER-NEXT: 634-637:4
43 ; CHECK-UNWINDER-NEXT: 645-645:4
44 ; CHECK-UNWINDER-NEXT: 3
45 ; CHECK-UNWINDER-NEXT: 62f->5b0:4
46 ; CHECK-UNWINDER-NEXT: 637->645:4
47 ; CHECK-UNWINDER-NEXT: 645->5ff:4
48 ; CHECK-UNWINDER-NEXT: [main:1 @ foo:3 @ bar]
49 ; CHECK-UNWINDER-NEXT: 4
50 ; CHECK-UNWINDER-NEXT: 5b0-5c8:2
51 ; CHECK-UNWINDER-NEXT: 5b0-5d7:2
52 ; CHECK-UNWINDER-NEXT: 5c3-5d7:1
53 ; CHECK-UNWINDER-NEXT: 5e5-5e9:4
54 ; CHECK-UNWINDER-NEXT: 3
55 ; CHECK-UNWINDER-NEXT: 5c8->5dc:2
56 ; CHECK-UNWINDER-NEXT: 5d7->5e5:4
57 ; CHECK-UNWINDER-NEXT: 5e9->634:4
60 ; clang -O0 -g test.c -o a.out
63 int bar(int x, int y) {
72 while (i++ < 4000 * 4000)
73 if (i % 91) s = bar(i, s); else s += 30;
74 printf("sum is %d\n", s);