Make failing perf test output easier to read
[ghc.git] / testsuite / tests / perf / compiler / all.T
1 def no_lint(opts):
2    opts.compiler_always_flags = \
3        filter(lambda opt: opt != '-dcore-lint' and opt != '-dcmm-lint', opts.compiler_always_flags)
4
5 setTestOpts(no_lint)
6
7
8 test('T1969',
9      [if_wordsize(32,
10           compiler_stats_range_field('peak_megabytes_allocated', 18, 1)),
11                              # expected value: 14 (x86/Windows 17/05/10)
12                              #                 15 (x86/OS X)
13                              #                 19 (x86/OS X)
14       if_wordsize(64,
15           compiler_stats_range_field('peak_megabytes_allocated', 25, 1)),
16                                              # expected value: 28 (amd64/Linux)
17                                              # expected value: 34 (amd64/Linux)
18                                              # 2012-09-20      23 (amd64/Linux)
19                                              # 2012-10-03      25 (amd64/Linux if .hi exists)
20       if_wordsize(32,
21           compiler_stats_range_field('max_bytes_used', 6149572, 5)),
22                              # expected value: 6707308 (x86/OS X)
23                              #                 5717704 (x86/Windows 17/05/10)
24                              #                 6149572 (x86/Linux, 31/12/09)
25       if_wordsize(64,
26           compiler_stats_range_field('max_bytes_used', 9000000, 20)),
27                                   # looks like the peak is around 10M, but we're
28                                   # unlikely to GC exactly on the peak.
29                                   # varies quite a lot with CLEANUP and BINDIST,
30                                   # hence 10% range.
31       if_wordsize(32,
32           compiler_stats_range_field('bytes allocated', 303930948, 5)),
33                         # expected value: 215582916 (x86/Windows)
34                         #                 221667908 (x86/OS X)
35                         #                 274932264 (x86/Linux)
36                         # 2012-10-08:     303930948 (x86/Linux, new codegen)
37                         # 2012-10-29:     298921816 (x86/Windows; increased range to 5%
38       if_wordsize(64,
39           compiler_stats_range_field('bytes allocated', 658786936, 5)),
40                         # 17/11/2009:     434,845,560 (amd64/Linux)
41                         # 08/12/2009:     459,776,680 (amd64/Linux)
42                         # 17/05/2010:     519,377,728 (amd64/Linux)
43                         # 05/08/2011:     561,382,568 (amd64/OS X)
44                         # 16/07/2012:     589,168,872 (amd64/Linux)
45                         # 20/07/2012:     595,936,240 (amd64/Linux)
46                         # 23/08/2012:     606,230,880 (amd64/Linux)
47                         # 29/08/2012:     633,334,184 (amd64/Linux)
48                         #                 (^ new codegen)
49                         # 18/09/2012:     641,959,976 (amd64/Linux)
50                         # 19/10/2012:     661,832,592 (amd64/Linux)
51                         #                 (^ -fPIC turned on)
52                         # 23/10/2012:     642,594,312 (amd64/Linux)
53                         #                 (^ -fPIC turned off again)
54                         # 12/11/2012:     658,786,936 (amd64/Linux)
55                         #                 ( UNKNOWN REASON )
56                         # 17/1/13:        667,160,192 (x86_64/Linux)
57                         #                 (new demand analyser)
58       only_ways(['normal']),
59
60       extra_hc_opts('-dcore-lint -static')
61           # Leave -dcore-lint on for this one test, so that we have something
62           # that will catch a regression in -dcore-lint performance.
63       ],
64      compile,
65      [''])
66
67 # This one tests for the space leak in the native code generator,
68 # where it holds onto the entire asm output until the end.  The space
69 # leak reappears from time to time, so it's a good idea to have a test
70 # for it.  The residency of this test will jump by 10MB to 40MB or so
71 # on x86-64 if the space leak appears.
72
73 # Only run this one if we have an NCG:
74 if 'optasm' in config.compile_ways:
75    conf_3294 = only_ways(['normal'])
76 else:
77    conf_3294 = skip
78
79 test('T3294',
80      [if_wordsize(32,
81           compiler_stats_range_field('max_bytes_used', 17725476, 5)),
82                                    # expected value: 17725476 (x86/OS X)
83                                    #                 14593500 (Windows)
84       if_wordsize(64,
85           compiler_stats_range_field('max_bytes_used', 44894544, 15)),
86                                    # prev:           25753192 (amd64/Linux)
87                                    # 29/08/2012:     37724352 (amd64/Linux)
88                                    #  (increase due to new codegen, see #7198)
89                                    # 13/13/2012:     44894544 (amd64/Linux)
90                                    #  (reason for increase unknown)
91       if_wordsize(32,
92           compiler_stats_range_field('bytes allocated', 1373514844, 5)),
93                                    # previous:     815479800  (x86/Linux)
94                                    # (^ increase due to new codegen, see #7198)
95                                    # 2012-10-08:   1373514844 (x86/Linux)
96       if_wordsize(64,
97           compiler_stats_range_field('bytes allocated', 2717327208, 5)),
98                                    # old:        1,357,587,088 (amd64/Linux)
99                                    # 29/08/2012: 2,961,778,696 (amd64/Linux)
100                                    # (^ increase due to new codegen, see #7198)
101                                    # 18/09/2012: 2,717,327,208 (amd64/Linux)
102       conf_3294
103       ],
104      compile,
105      [''])
106
107 test('T4801',
108      [ # expect_broken(5224),
109        # temporarily unbroken (#5227)
110       if_wordsize(32,
111           compiler_stats_range_field('peak_megabytes_allocated', 30, 20)),
112
113       if_wordsize(64,
114           compiler_stats_range_field('peak_megabytes_allocated', 49, 20)),
115                    # prev:       50 (amd64/Linux)
116                    # 19/10/2012: 64 (amd64/Linux) (REASON UNKNOWN!)
117                    # 12/11/2012: 49 (amd64/Linux) (REASON UNKNOWN!)
118
119       # expected value: 58 (amd64/OS X):
120       if_platform('x86_64-apple-darwin',
121           compiler_stats_range_field('peak_megabytes_allocated', 58, 1)),
122       # expected value: 228286660 (x86/OS X)
123       if_wordsize(32,
124           compiler_stats_range_field('bytes allocated', 185669232, 10)),
125
126       if_wordsize(64,
127           compiler_stats_range_field('bytes allocated', 392409984, 10)),
128                    # prev:       360243576 (amd64/Linux)
129                    # 19/10/2012: 447190832 (amd64/Linux) (-fPIC turned on)
130                    # 19/10/2012: 392409984 (amd64/Linux) (-fPIC turned off)
131
132       # expected value: 510938976 (amd64/OS X):
133       if_platform('x86_64-apple-darwin',
134           compiler_stats_range_field('bytes allocated', 510938976, 5)),
135
136       if_wordsize(32,
137           compiler_stats_range_field('max_bytes_used', 9651948, 5)),
138       #                    expected value: x86/OS X:  9651948
139       #                    expected value:           10290952 (windows)
140       if_wordsize(64,
141           compiler_stats_range_field('max_bytes_used', 21657520, 15)),
142                 # prev:       20486256 (amd64/OS X)
143                 # 30/08/2012: 17305600--20391920 (varies a lot)
144                 # 19/10/2012: 26882576 (-fPIC turned on)
145                 # 19/10/2012: 18619912 (-fPIC turned off)
146                 # 24/12/2012: 21657520 (perhaps gc sampling time wibbles?)
147       if_platform('x86_64-apple-darwin',
148           compiler_stats_range_field('max_bytes_used', 21657520, 5)),
149        only_ways(['normal']),
150        extra_hc_opts('-static')
151       ],
152      compile,
153      [''])
154
155 test('T3064',
156      [# expect_broken( 3064 ),
157       # expected value: 14 (x86/Linux 28-06-2012):
158       if_wordsize(32,
159           compiler_stats_range_field('peak_megabytes_allocated', 14, 1)),
160
161       if_wordsize(64,
162           compiler_stats_range_field('peak_megabytes_allocated', 24, 1)),
163                                     # expected value: 18 (amd64/Linux):
164
165       # expected value: 56380288 (x86/Linux) (28/6/2011)
166       #                 111189536 (x86/Windows) (30/10/12)
167       if_wordsize(32,
168           compiler_stats_range_field('bytes allocated', 111189536, 10)),
169
170
171       # expected value: 73259544 (amd64/Linux) (28/6/2011):
172       if_wordsize(64,
173           compiler_stats_range_field('bytes allocated', 240000000, 5)),
174
175       # expected value: 2247016 (x86/Linux) (28/6/2011):
176       if_wordsize(32,
177           compiler_stats_range_field('max_bytes_used', 5511604, 20)),
178
179       # expected value: 4032024 (amd64/Linux, intree) (28/6/2011):
180       if_wordsize(64,
181           compiler_stats_range_field('max_bytes_used', 11000000, 5)),
182        only_ways(['normal'])
183       ],
184      compile,
185      [''])
186
187 test('T4007',
188      normal,
189      run_command,
190      ['$MAKE -s --no-print-directory T4007'])
191
192 test('T5030',
193      [
194       if_wordsize(32,
195           compiler_stats_range_field('bytes allocated', 259547660, 10)),
196                      # previous:    196457520
197                      # 2012-10-08:  259547660 (x86/Linux, new codegen)
198
199       if_wordsize(64,
200           compiler_stats_range_field('bytes allocated', 602993184, 10)),
201             # Previously 530000000 (+/- 10%)
202             # 17/1/13:       602,993,184  (x86_64/Linux)
203             #                (new demand analyser)
204    
205        only_ways(['normal'])
206       ],
207      compile,
208      ['-fcontext-stack=300'])
209
210 test('T5631',
211      [if_wordsize(32, # sample from x86/Linux
212           compiler_stats_range_field('bytes allocated', 392904228, 10)),
213       # expected value: 774,595,008 (amd64/Linux):
214       if_wordsize(64,
215           compiler_stats_range_field('bytes allocated', 774595008, 5)),
216        only_ways(['normal'])
217       ],
218      compile,
219      [''])
220
221 test('parsing001',
222      [# expected value: ?
223       if_wordsize(32,
224           compiler_stats_range_field('bytes allocated', 274000576, 10)),
225       # expected value: 587079016 (amd64/Linux):
226       if_wordsize(64,
227           compiler_stats_range_field('bytes allocated', 587079016, 5)),
228        only_ways(['normal']),
229       ],
230      compile_fail, [''])
231
232
233 test('T783',
234      [ only_ways(['normal']),  # no optimisation for this one
235       # expected value: 175,569,928 (x86/Linux)
236       if_wordsize(32,
237           compiler_stats_range_field('bytes allocated', 226907420, 10)),
238                            # 2012-10-08: 226907420 (x86/Linux)
239       if_wordsize(64,
240           compiler_stats_range_field('bytes allocated', 640324528, 10)),
241                            # prev:       349,263,216 (amd64/Linux)
242                            # 07/08/2012: 384,479,856 (amd64/Linux)
243                            # 29/08/2012: 436,927,840 (amd64/Linux)
244                            # 12/11/2012: 640,324,528 (amd64/Linux)
245                            #   (OldCmm removed: not sure why this got worse, the
246                            #    other perf tests remained about the same)
247       extra_hc_opts('-static')
248       ],
249       compile,[''])
250
251 test('T5321Fun',
252      [ only_ways(['normal']),  # no optimisation for this one
253       # sample from x86/Linux
254       if_wordsize(32,
255           compiler_stats_range_field('bytes allocated', 344416344, 10)),
256                                          # prev:       300000000
257                                          # 2012-10-08: 344416344
258                                          #  (increase due to new codegen)
259       if_wordsize(64,
260           compiler_stats_range_field('bytes allocated', 713385808, 10))
261                                          # prev:       585,521,080
262                                          # 29/08/2012: 713,385,808
263                                          #  (increase due to new codegen)
264       ],
265       compile,[''])
266
267 test('T5321FD',
268      [ only_ways(['normal']),  # no optimisation for this one
269       if_wordsize(32,
270           compiler_stats_range_field('bytes allocated', 240302920, 10)),
271                                          # prev:       213380256
272                                          # 2012-10-08: 240302920 (x86/Linux)
273                                          #  (increase due to new codegen)
274       if_wordsize(64,
275           compiler_stats_range_field('bytes allocated', 492905640, 10))
276                                          # prev:       418,306,336
277                                          # 29/08/2012: 492,905,640
278                                          #  (increase due to new codegen)
279       ],
280       compile,[''])
281
282 test('T5642',
283      [ only_ways(['normal']),
284       if_wordsize(32, # sample from x86/Linux
285           compiler_stats_range_field('bytes allocated',  650000000, 10)),
286       if_wordsize(64,
287           compiler_stats_range_field('bytes allocated', 1300000000, 10))
288       ],
289       compile,['-O'])
290
291 test('T5837',
292      [ only_ways(['normal']),
293       if_wordsize(32, # sample from x86/Linux
294           compiler_stats_range_field('bytes allocated', 40000000, 10)),
295
296       # sample: 3926235424 (amd64/Linux, 15/2/2012)
297       if_wordsize(64,
298           compiler_stats_range_field('bytes allocated', 81879216, 10))
299                                            # 2012-10-02 81879216
300                                            # 2012-09-20 87254264 amd64/Linux
301       ],
302       compile_fail,['-fcontext-stack=50'])
303
304 test('T6048',
305      [ only_ways(['optasm']),
306       if_wordsize(32, # sample from x86/Linux
307           compiler_stats_range_field('bytes allocated', 48887164, 10)),
308                                            # prev:       38000000
309                                            # 2012-10-08: 48887164 (x86/Linux)
310       if_wordsize(64,
311           compiler_stats_range_field('bytes allocated', 97247032, 10))
312                                            # 18/09/2012 97247032 amd64/Linux
313       ],
314       compile,[''])