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