1RUN: llvm-profdata merge --sample --text -output=%t.proftext %S/Inputs/cs-sample-preinline.proftext --gen-cs-nested-profile=1 -generate-merged-base-profiles=0
2RUN: FileCheck %s < %t.proftext --match-full-lines --strict-whitespace
3RUN: llvm-profdata merge --sample --text -output=%t.probe.proftext %S/Inputs/cs-sample-preinline-probe.proftext --gen-cs-nested-profile=1 -generate-merged-base-profiles=0
4RUN: FileCheck %s < %t.probe.proftext --match-full-lines --strict-whitespace -check-prefix=PROBE
5RUN: llvm-profdata merge --sample --extbinary -output=%t.profbin %S/Inputs/cs-sample-preinline.proftext --gen-cs-nested-profile=1 -generate-merged-base-profiles=0
6RUN: llvm-profdata merge --sample --text -output=%t2.proftext %t.profbin
7RUN: FileCheck %s < %t2.proftext --match-full-lines --strict-whitespace
8RUN: llvm-profdata show --sample -show-sec-info-only %t.profbin | FileCheck %s -check-prefix=PREINLINE
9RUN: llvm-profdata merge --sample --text -output=%t3.proftext %S/Inputs/cs-sample-preinline.proftext --gen-cs-nested-profile=1 -generate-merged-base-profiles=1
10RUN: FileCheck %s < %t3.proftext --match-full-lines --strict-whitespace -check-prefix=RECOUNT
11RUN: llvm-profdata merge --sample --extbinary -output=%t2.profbin %S/Inputs/cs-sample-preinline.proftext --gen-cs-nested-profile=1 -generate-merged-base-profiles=1
12RUN: llvm-profdata show -sample -detailed-summary %S/Inputs/cs-sample-preinline.proftext | FileCheck %s -check-prefix=SUMMARY
13RUN: llvm-profdata show -sample -detailed-summary %t2.profbin | FileCheck %s -check-prefix=SUMMARY-NEST
14RUN: llvm-profdata show -sample -detailed-summary %t3.proftext | FileCheck %s -check-prefix=SUMMARY-NEST
15
16
17; CHECK:main:1968621:12
18; CHECK-NEXT: 2: 24
19; CHECK-NEXT: 3: 17 _Z5funcAi:7
20; CHECK-NEXT: 3.1: 10 _Z5funcBi:11
21; CHECK-NEXT: 3: _Z5funcAi:1467388
22; CHECK-NEXT:  0: 10
23; CHECK-NEXT:  3: 24
24; CHECK-NEXT:  1: _Z8funcLeafi:1467299
25; CHECK-NEXT:   0: 6
26; CHECK-NEXT:   1: 6
27; CHECK-NEXT:   3: 287884
28; CHECK-NEXT:   4: 287864 _Z3fibi:315608
29; CHECK-NEXT:   15: 23
30; CHECK-NEXT:   !Attributes: 2
31; CHECK-NEXT:  !Attributes: 2
32; CHECK-NEXT: 3.1: _Z5funcBi:500954
33; CHECK-NEXT:  0: 19
34; CHECK-NEXT:  3: 12
35; CHECK-NEXT:  1: _Z8funcLeafi:500853
36; CHECK-NEXT:   0: 15
37; CHECK-NEXT:   1: 15
38; CHECK-NEXT:   3: 74946
39; CHECK-NEXT:   4: 74941 _Z3fibi:82359
40; CHECK-NEXT:   10: 23324
41; CHECK-NEXT:   11: 23327 _Z3fibi:25228
42; CHECK-NEXT:   15: 11
43; CHECK-NEXT:   !Attributes: 2
44; CHECK-NEXT:  !Attributes: 2
45; CHECK-NEXT:_Z5funcBi:240:13
46; CHECK-NEXT: 0: 13
47; CHECK-NEXT: 1: 13
48
49
50; RECOUNT:main:1968621:12
51; RECOUNT-NEXT: 2: 24
52; RECOUNT-NEXT: 3: 17 _Z5funcAi:7
53; RECOUNT-NEXT: 3.1: 10 _Z5funcBi:11
54; RECOUNT-NEXT: 3: _Z5funcAi:1467388
55; RECOUNT-NEXT:  0: 10
56; RECOUNT-NEXT:  3: 24
57; RECOUNT-NEXT:  1: _Z8funcLeafi:1467299
58; RECOUNT-NEXT:   0: 6
59; RECOUNT-NEXT:   1: 6
60; RECOUNT-NEXT:   3: 287884
61; RECOUNT-NEXT:   4: 287864 _Z3fibi:315608
62; RECOUNT-NEXT:   15: 23
63; RECOUNT-NEXT:   !Attributes: 6
64; RECOUNT-NEXT:  !Attributes: 6
65; RECOUNT-NEXT: 3.1: _Z5funcBi:500954
66; RECOUNT-NEXT:  0: 19
67; RECOUNT-NEXT:  3: 12
68; RECOUNT-NEXT:  1: _Z8funcLeafi:500853
69; RECOUNT-NEXT:   0: 15
70; RECOUNT-NEXT:   1: 15
71; RECOUNT-NEXT:   3: 74946
72; RECOUNT-NEXT:   4: 74941 _Z3fibi:82359
73; RECOUNT-NEXT:   10: 23324
74; RECOUNT-NEXT:   11: 23327 _Z3fibi:25228
75; RECOUNT-NEXT:   15: 11
76; RECOUNT-NEXT:   !Attributes: 6
77; RECOUNT-NEXT:  !Attributes: 6
78; RECOUNT-NEXT:_Z8funcLeafi:1968152:31
79; RECOUNT-NEXT: 0: 21
80; RECOUNT-NEXT: 1: 21
81; RECOUNT-NEXT: 3: 362830
82; RECOUNT-NEXT: 4: 362805 _Z3fibi:397967
83; RECOUNT-NEXT: 10: 23324
84; RECOUNT-NEXT: 11: 23327 _Z3fibi:25228
85; RECOUNT-NEXT: 15: 34
86; RECOUNT-NEXT: !Attributes: 2
87; RECOUNT-NEXT:_Z5funcAi:1467388:11
88; RECOUNT-NEXT: 0: 10
89; RECOUNT-NEXT: 3: 24
90; RECOUNT-NEXT: 1: _Z8funcLeafi:1467299
91; RECOUNT-NEXT:  0: 6
92; RECOUNT-NEXT:  1: 6
93; RECOUNT-NEXT:  3: 287884
94; RECOUNT-NEXT:  4: 287864 _Z3fibi:315608
95; RECOUNT-NEXT:  15: 23
96; RECOUNT-NEXT:  !Attributes: 6
97; RECOUNT-NEXT: !Attributes: 2
98; RECOUNT-NEXT:_Z5funcBi:501194:32
99; RECOUNT-NEXT: 0: 32
100; RECOUNT-NEXT: 1: 13
101; RECOUNT-NEXT: 3: 12
102; RECOUNT-NEXT: 1: _Z8funcLeafi:500853
103; RECOUNT-NEXT:  0: 15
104; RECOUNT-NEXT:  1: 15
105; RECOUNT-NEXT:  3: 74946
106; RECOUNT-NEXT:  4: 74941 _Z3fibi:82359
107; RECOUNT-NEXT:  10: 23324
108; RECOUNT-NEXT:  11: 23327 _Z3fibi:25228
109; RECOUNT-NEXT:  15: 11
110; RECOUNT-NEXT:  !Attributes: 6
111
112; PROBE:main:1968621:12
113; PROBE-NEXT: 2: 24
114; PROBE-NEXT: 3: 17 _Z5funcAi:7
115; PROBE-NEXT: 3.1: 10 _Z5funcBi:11
116; PROBE-NEXT: 3: _Z5funcAi:1467388
117; PROBE-NEXT:  0: 10
118; PROBE-NEXT:  3: 24
119; PROBE-NEXT:  1: _Z8funcLeafi:1467299
120; PROBE-NEXT:   0: 6
121; PROBE-NEXT:   1: 6
122; PROBE-NEXT:   3: 287884
123; PROBE-NEXT:   4: 287864 _Z3fibi:315608
124; PROBE-NEXT:   15: 23
125; PROBE-NEXT:   !CFGChecksum: 281479271677951
126; PROBE-NEXT:   !Attributes: 2
127; PROBE-NEXT:  !CFGChecksum: 844530426352218
128; PROBE-NEXT:  !Attributes: 2
129; PROBE-NEXT: 3.1: _Z5funcBi:500954
130; PROBE-NEXT:  0: 19
131; PROBE-NEXT:  3: 12
132; PROBE-NEXT:  1: _Z8funcLeafi:500853
133; PROBE-NEXT:   0: 15
134; PROBE-NEXT:   1: 15
135; PROBE-NEXT:   3: 74946
136; PROBE-NEXT:   4: 74941 _Z3fibi:82359
137; PROBE-NEXT:   10: 23324
138; PROBE-NEXT:   11: 23327 _Z3fibi:25228
139; PROBE-NEXT:   15: 11
140; PROBE-NEXT:   !CFGChecksum: 281479271677951
141; PROBE-NEXT:   !Attributes: 2
142; PROBE-NEXT:  !CFGChecksum: 563022570642068
143; PROBE-NEXT:  !Attributes: 2
144; PROBE-NEXT: !CFGChecksum: 563125815542069
145; PROBE-NEXT:_Z5funcBi:240:13
146; PROBE-NEXT: 0: 13
147; PROBE-NEXT: 1: 13
148; PROBE-NEXT: !CFGChecksum: 563022570642068
149
150
151; PREINLINE: ProfileSummarySection {{.*}} Flags: {preInlined}
152
153
154; SUMMARY:      Total functions: 4
155; SUMMARY-NEXT: Maximum function count: 32
156; SUMMARY-NEXT: Maximum block count: 362830
157; SUMMARY-NEXT: Total number of blocks: 16
158; SUMMARY-NEXT: Total count: 772562
159; SUMMARY-NEXT: Detailed summary:
160; SUMMARY-NEXT: 1 blocks with count >= 362830 account for 1 percentage of the total counts.
161; SUMMARY-NEXT: 1 blocks with count >= 362830 account for 10 percentage of the total counts.
162; SUMMARY-NEXT: 1 blocks with count >= 362830 account for 20 percentage of the total counts.
163; SUMMARY-NEXT: 1 blocks with count >= 362830 account for 30 percentage of the total counts.
164; SUMMARY-NEXT: 1 blocks with count >= 362830 account for 40 percentage of the total counts.
165; SUMMARY-NEXT: 2 blocks with count >= 362805 account for 50 percentage of the total counts.
166; SUMMARY-NEXT: 2 blocks with count >= 362805 account for 60 percentage of the total counts.
167; SUMMARY-NEXT: 2 blocks with count >= 362805 account for 70 percentage of the total counts.
168; SUMMARY-NEXT: 2 blocks with count >= 362805 account for 80 percentage of the total counts.
169; SUMMARY-NEXT: 2 blocks with count >= 362805 account for 90 percentage of the total counts.
170; SUMMARY-NEXT: 3 blocks with count >= 23327 account for 95 percentage of the total counts.
171; SUMMARY-NEXT: 4 blocks with count >= 23324 account for 99 percentage of the total counts.
172; SUMMARY-NEXT: 4 blocks with count >= 23324 account for 99.9 percentage of the total counts.
173; SUMMARY-NEXT: 11 blocks with count >= 24 account for 99.99 percentage of the total counts.
174; SUMMARY-NEXT: 16 blocks with count >= 10 account for 99.999 percentage of the total counts.
175; SUMMARY-NEXT: 16 blocks with count >= 10 account for 99.9999 percentage of the total counts.
176
177
178; SUMMARY-NEST:      Total functions: 4
179; SUMMARY-NEST-NEXT: Maximum function count: 32
180; SUMMARY-NEST-NEXT: Maximum block count: 362830
181; SUMMARY-NEST-NEXT: Total number of blocks: 15
182; SUMMARY-NEST-NEXT: Total count: 772504
183; SUMMARY-NEST-NEXT: Detailed summary:
184; SUMMARY-NEST-NEXT: 1 blocks with count >= 362830 account for 1 percentage of the total counts.
185; SUMMARY-NEST-NEXT: 1 blocks with count >= 362830 account for 10 percentage of the total counts.
186; SUMMARY-NEST-NEXT: 1 blocks with count >= 362830 account for 20 percentage of the total counts.
187; SUMMARY-NEST-NEXT: 1 blocks with count >= 362830 account for 30 percentage of the total counts.
188; SUMMARY-NEST-NEXT: 1 blocks with count >= 362830 account for 40 percentage of the total counts.
189; SUMMARY-NEST-NEXT: 2 blocks with count >= 362805 account for 50 percentage of the total counts.
190; SUMMARY-NEST-NEXT: 2 blocks with count >= 362805 account for 60 percentage of the total counts.
191; SUMMARY-NEST-NEXT: 2 blocks with count >= 362805 account for 70 percentage of the total counts.
192; SUMMARY-NEST-NEXT: 2 blocks with count >= 362805 account for 80 percentage of the total counts.
193; SUMMARY-NEST-NEXT: 2 blocks with count >= 362805 account for 90 percentage of the total counts.
194; SUMMARY-NEST-NEXT: 3 blocks with count >= 23327 account for 95 percentage of the total counts.
195; SUMMARY-NEST-NEXT: 4 blocks with count >= 23324 account for 99 percentage of the total counts.
196; SUMMARY-NEST-NEXT: 4 blocks with count >= 23324 account for 99.9 percentage of the total counts.
197; SUMMARY-NEST-NEXT: 10 blocks with count >= 21 account for 99.99 percentage of the total counts.
198; SUMMARY-NEST-NEXT: 15 blocks with count >= 10 account for 99.999 percentage of the total counts.
199; SUMMARY-NEST-NEXT: 15 blocks with count >= 10 account for 99.9999 percentage of the total counts.
200