1 RUN: llvm-profdata merge --sample --text -output=%t.proftext %S/Inputs/cs-sample-preinline.proftext --convert-sample-profile-layout=nest -generate-merged-base-profiles=0
2 RUN: FileCheck %s < %t.proftext --match-full-lines --strict-whitespace
3 RUN: llvm-profdata merge --sample --text -output=%t.probe.proftext %S/Inputs/cs-sample-preinline-probe.proftext --convert-sample-profile-layout=nest -generate-merged-base-profiles=0
4 RUN: FileCheck %s < %t.probe.proftext --match-full-lines --strict-whitespace -check-prefix=PROBE
5 RUN: llvm-profdata merge --sample --extbinary -output=%t.profbin %S/Inputs/cs-sample-preinline.proftext --convert-sample-profile-layout=nest -generate-merged-base-profiles=0
6 RUN: llvm-profdata merge --sample --text -output=%t2.proftext %t.profbin
7 RUN: FileCheck %s < %t2.proftext --match-full-lines --strict-whitespace
8 RUN: llvm-profdata show --sample -show-sec-info-only %t.profbin | FileCheck %s -check-prefix=PREINLINE
9 RUN: llvm-profdata merge --sample --text -output=%t3.proftext %S/Inputs/cs-sample-preinline.proftext --convert-sample-profile-layout=nest -generate-merged-base-profiles=1
10 RUN: FileCheck %s < %t3.proftext --match-full-lines --strict-whitespace -check-prefix=RECOUNT
11 RUN: llvm-profdata merge --sample --extbinary -output=%t2.profbin %S/Inputs/cs-sample-preinline.proftext --convert-sample-profile-layout=nest -generate-merged-base-profiles=1
12 RUN: llvm-profdata show -sample -detailed-summary %S/Inputs/cs-sample-preinline.proftext | FileCheck %s -check-prefix=SUMMARY
13 RUN: llvm-profdata show -sample -detailed-summary %t2.profbin | FileCheck %s -check-prefix=SUMMARY-NEST
14 RUN: llvm-profdata show -sample -detailed-summary %t3.proftext | FileCheck %s -check-prefix=SUMMARY-NEST
17 ; CHECK:main:1968621:12
19 ; CHECK-NEXT: 3: 17 _Z5funcAi:7
20 ; CHECK-NEXT: 3.1: 10 _Z5funcBi:11
21 ; CHECK-NEXT: 3: _Z5funcAi:1467388
24 ; CHECK-NEXT: 1: _Z8funcLeafi:1467299
27 ; CHECK-NEXT: 3: 287884
28 ; CHECK-NEXT: 4: 287864 _Z3fibi:315608
30 ; CHECK-NEXT: !Attributes: 2
31 ; CHECK-NEXT: !Attributes: 2
32 ; CHECK-NEXT: 3.1: _Z5funcBi:500954
35 ; CHECK-NEXT: 1: _Z8funcLeafi:500853
38 ; CHECK-NEXT: 3: 74946
39 ; CHECK-NEXT: 4: 74941 _Z3fibi:82359
40 ; CHECK-NEXT: 10: 23324
41 ; CHECK-NEXT: 11: 23327 _Z3fibi:25228
43 ; CHECK-NEXT: !Attributes: 2
44 ; CHECK-NEXT: !Attributes: 2
45 ; CHECK-NEXT:_Z5funcBi:240:13
50 ; RECOUNT:main:1968621:12
52 ; RECOUNT-NEXT: 3: 17 _Z5funcAi:7
53 ; RECOUNT-NEXT: 3.1: 10 _Z5funcBi:11
54 ; RECOUNT-NEXT: 3: _Z5funcAi:1467388
57 ; RECOUNT-NEXT: 1: _Z8funcLeafi:1467299
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
68 ; RECOUNT-NEXT: 1: _Z8funcLeafi:500853
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
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
90 ; RECOUNT-NEXT: 1: _Z8funcLeafi:1467299
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
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
112 ; PROBE:main:1968621:12
114 ; PROBE-NEXT: 3: 17 _Z5funcAi:7
115 ; PROBE-NEXT: 3.1: 10 _Z5funcBi:11
116 ; PROBE-NEXT: 3: _Z5funcAi:1467388
119 ; PROBE-NEXT: 1: _Z8funcLeafi:1467299
122 ; PROBE-NEXT: 3: 287884
123 ; PROBE-NEXT: 4: 287864 _Z3fibi:315608
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
132 ; PROBE-NEXT: 1: _Z8funcLeafi:500853
135 ; PROBE-NEXT: 3: 74946
136 ; PROBE-NEXT: 4: 74941 _Z3fibi:82359
137 ; PROBE-NEXT: 10: 23324
138 ; PROBE-NEXT: 11: 23327 _Z3fibi:25228
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
148 ; PROBE-NEXT: !CFGChecksum: 563022570642068
151 ; PREINLINE: ProfileSummarySection {{.*}} Flags: {preInlined}
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.
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.