Merge branch 'master' of http://darcs.haskell.org/testsuite
[ghc.git] / testsuite / tests / perf / compiler / all.T
1 def no_lint(name, 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      [compiler_stats_num_field('peak_megabytes_allocated',
10           [(wordsize(32), 14, 1),
11              # 2010-05-17 14 (x86/Windows)
12              #            15 (x86/OS X)
13              #            19 (x86/OS X)
14              # 2013-02-10 13 (x86/Windows)
15              # 2013-02-10 14 (x86/OSX)
16            (wordsize(64), 25, 1)]),
17              #            28 (amd64/Linux)
18              #            34 (amd64/Linux)
19              # 2012-09-20 23 (amd64/Linux)
20              # 2012-10-03 25 (amd64/Linux if .hi exists)
21       compiler_stats_num_field('max_bytes_used',
22           [(platform('i386-unknown-mingw32'), 5094914, 2),
23                                  # 2010-05-17 5717704 (x86/Windows)
24                                  # 2013-02-10 5159748 (x86/Windows)
25                                  # 2013-02-10 5030080 (x86/Windows)
26            (wordsize(32), 6149572, 1),
27              #            6707308 (x86/OS X)
28              # 2009-12-31 6149572 (x86/Linux)
29            (wordsize(64), 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       compiler_stats_num_field('bytes allocated',
35           [(platform('i386-unknown-mingw32'), 310633884, 1),
36                                  #            215582916 (x86/Windows)
37                                  # 2012-10-29 298921816 (x86/Windows)
38                                  # 2013-02-10 310633884 (x86/Windows)
39            (wordsize(32), 322937684, 1),
40              #            221667908 (x86/OS X)
41              #            274932264 (x86/Linux)
42              # 2012-10-08 303930948 (x86/Linux, new codegen)
43              # 2013-02-10 322937684 (x86/OSX)
44            (wordsize(64), 658786936, 5)]),
45              # 17/11/2009 434845560 (amd64/Linux)
46              # 08/12/2009 459776680 (amd64/Linux)
47              # 17/05/2010 519377728 (amd64/Linux)
48              # 05/08/2011 561382568 (amd64/OS X)
49              # 16/07/2012 589168872 (amd64/Linux)
50              # 20/07/2012 595936240 (amd64/Linux)
51              # 23/08/2012 606230880 (amd64/Linux)
52              # 29/08/2012 633334184 (amd64/Linux)
53              #            (^ new codegen)
54              # 18/09/2012 641959976 (amd64/Linux)
55              # 19/10/2012 661832592 (amd64/Linux)
56              #            (^ -fPIC turned on)
57              # 23/10/2012 642594312 (amd64/Linux)
58              #            (^ -fPIC turned off again)
59              # 12/11/2012 658786936 (amd64/Linux)
60              #            (^ UNKNOWN REASON )
61              # 17/1/13:   667160192 (x86_64/Linux)
62              #            (^ new demand analyser)
63       only_ways(['normal']),
64
65       extra_hc_opts('-dcore-lint -static')
66           # Leave -dcore-lint on for this one test, so that we have something
67           # that will catch a regression in -dcore-lint performance.
68       ],
69      compile,
70      [''])
71
72 # This one tests for the space leak in the native code generator,
73 # where it holds onto the entire asm output until the end.  The space
74 # leak reappears from time to time, so it's a good idea to have a test
75 # for it.  The residency of this test will jump by 10MB to 40MB or so
76 # on x86-64 if the space leak appears.
77
78 # Only run this one if we have an NCG:
79 if 'optasm' in config.compile_ways:
80    conf_3294 = only_ways(['normal'])
81 else:
82    conf_3294 = skip
83
84 test('T3294',
85      [
86       compiler_stats_num_field('max_bytes_used',
87           [(wordsize(32), 20712280, 1),
88              #            17725476 (x86/OS X)
89              #            14593500 (Windows)
90              # 2013-02-10 20651576 (x86/Windows)
91              # 2013-02-10 20772984 (x86/OSX)
92            (wordsize(64), 44894544, 15)]),
93         # prev:           25753192 (amd64/Linux)
94         # 29/08/2012:     37724352 (amd64/Linux)
95         #  (increase due to new codegen, see #7198)
96         # 13/13/2012:     44894544 (amd64/Linux)
97         #  (reason for increase unknown)
98       compiler_stats_num_field('bytes allocated',
99           [(wordsize(32), 1373514844, 5),
100            # previous:     815479800  (x86/Linux)
101            # (^ increase due to new codegen, see #7198)
102            # 2012-10-08:  1373514844 (x86/Linux)
103            (wordsize(64), 2717327208, 5)]),
104             # old:        1357587088 (amd64/Linux)
105             # 29/08/2012: 2961778696 (amd64/Linux)
106             # (^ increase due to new codegen, see #7198)
107             # 18/09/2012: 2717327208 (amd64/Linux)
108       conf_3294
109       ],
110      compile,
111      [''])
112
113 test('T4801',
114      [ # expect_broken(5224),
115        # temporarily unbroken (#5227)
116       compiler_stats_num_field('peak_megabytes_allocated',
117           [(platform('x86_64-apple-darwin'), 58, 1),
118                            # expected value: 58 (amd64/OS X)
119            (wordsize(32), 30, 20),
120            (wordsize(64), 49, 20)]),
121             # prev:       50 (amd64/Linux)
122             # 19/10/2012: 64 (amd64/Linux)
123             #                (^ REASON UNKNOWN!)
124             # 12/11/2012: 49 (amd64/Linux)
125             #                (^ REASON UNKNOWN!)
126
127       compiler_stats_num_field('bytes allocated',
128           [(platform('x86_64-apple-darwin'), 510938976, 5),
129                            # expected value: 510938976 (amd64/OS X):
130
131            (wordsize(32), 185669232, 10),
132         # expected value: 228286660 (x86/OS X)
133
134            (wordsize(64), 392409984, 10)]),
135             # prev:       360243576 (amd64/Linux)
136             # 19/10/2012: 447190832 (amd64/Linux) (-fPIC turned on)
137             # 19/10/2012: 392409984 (amd64/Linux) (-fPIC turned off)
138
139       compiler_stats_num_field('max_bytes_used',
140           [(platform('x86_64-apple-darwin'), 21657520, 5),
141            (wordsize(32), 11139444, 1),
142              #             9651948 (x86/OSX)
143              #            10290952 (windows)
144              # 2013-02-10 11071060 (x86/Windows)
145              # 2013-02-10 11207828 (x86/OSX)
146            (wordsize(64), 21657520, 15)]),
147                 # prev:       20486256 (amd64/OS X)
148                 # 30/08/2012: 17305600--20391920 (varies a lot)
149                 # 19/10/2012: 26882576 (-fPIC turned on)
150                 # 19/10/2012: 18619912 (-fPIC turned off)
151                 # 24/12/2012: 21657520 (perhaps gc sampling time wibbles?)
152        only_ways(['normal']),
153        extra_hc_opts('-static')
154       ],
155      compile,
156      [''])
157
158 test('T3064',
159      [# expect_broken( 3064 ),
160       compiler_stats_num_field('peak_megabytes_allocated',
161           [(wordsize(32), 14, 1),
162         # expected value: 14 (x86/Linux 28-06-2012):
163            (wordsize(64), 26, 1)]),
164             # (amd64/Linux):            18
165             # (amd64/Linux) 2012-02-07: 26
166
167       compiler_stats_num_field('bytes allocated',
168           [(wordsize(32), 111189536, 10),
169          # expected value: 56380288 (x86/Linux) (28/6/2011)
170          #                111189536 (x86/Windows) (30/10/12)
171            (wordsize(64), 224798696, 5)]),
172             # (amd64/Linux) (28/06/2011):  73259544
173             # (amd64/Linux) (07/02/2013): 224798696
174
175       compiler_stats_num_field('max_bytes_used',
176           [(wordsize(32), 5511604, 20),
177         # expected value: 2247016 (x86/Linux) (28/6/2011):
178            (wordsize(64), 8945328, 5)]),
179             # (amd64/Linux, intree) (28/06/2011):  4032024
180             # (amd64/Linux, intree) (07/02/2013):  9819288
181             # (amd64/Linux, intree) (10/02/2013):  8945328 
182             #   apparently courtesy of the b5c18c (Trac #5113)
183        only_ways(['normal'])
184       ],
185      compile,
186      [''])
187
188 test('T4007',
189      normal,
190      run_command,
191      ['$MAKE -s --no-print-directory T4007'])
192
193 test('T5030',
194      [compiler_stats_num_field('bytes allocated',
195           [(wordsize(32), 259547660, 10),
196            # previous:    196457520
197            # 2012-10-08:  259547660 (x86/Linux, new codegen)
198            (wordsize(64), 602993184, 10)]),
199              # Previously 530000000 (+/- 10%)
200              # 17/1/13:   602993184  (x86_64/Linux)
201              #            (new demand analyser)
202    
203        only_ways(['normal'])
204       ],
205      compile,
206      ['-fcontext-stack=300'])
207
208 test('T5631',
209      [compiler_stats_num_field('bytes allocated',
210           [(wordsize(32), 392904228, 10),
211         # expected value: 392904228 (x86/Linux)
212            (wordsize(64), 774595008, 5)]),
213         # expected value: 774595008 (amd64/Linux):
214        only_ways(['normal'])
215       ],
216      compile,
217      [''])
218
219 test('parsing001',
220      [compiler_stats_num_field('bytes allocated',
221           [(wordsize(32), 274000576, 10),
222            (wordsize(64), 587079016, 5)]),
223         # expected value: 587079016 (amd64/Linux)
224        only_ways(['normal']),
225       ],
226      compile_fail, [''])
227
228
229 test('T783',
230      [ only_ways(['normal']),  # no optimisation for this one
231       # expected value: 175,569,928 (x86/Linux)
232       compiler_stats_num_field('bytes allocated',
233           [(wordsize(32), 333833658, 2),
234             # 2012-10-08: 226907420 (x86/Linux)
235             # 2013-02-10: 329202116 (x86/Windows)
236             # 2013-02-10: 338465200 (x86/OSX)
237            (wordsize(64), 640324528, 10)]),
238             # prev:       349263216 (amd64/Linux)
239             # 07/08/2012: 384479856 (amd64/Linux)
240             # 29/08/2012: 436927840 (amd64/Linux)
241             # 12/11/2012: 640324528 (amd64/Linux)
242             #   (OldCmm removed: not sure why this got worse, the
243             #    other perf tests remained about the same)
244       extra_hc_opts('-static')
245       ],
246       compile,[''])
247
248 test('T5321Fun',
249      [ only_ways(['normal']),  # no optimisation for this one
250        compiler_stats_num_field('bytes allocated',
251            [(wordsize(32), 344416344, 10),
252              # prev:       300000000
253              # 2012-10-08: 344416344 x86/Linux
254              #  (increase due to new codegen)
255             (wordsize(64), 713385808, 10)])
256              # prev:       585521080
257              # 29/08/2012: 713385808
258              #  (increase due to new codegen)
259       ],
260       compile,[''])
261
262 test('T5321FD',
263      [ only_ways(['normal']),  # no optimisation for this one
264       compiler_stats_num_field('bytes allocated',
265           [(wordsize(32), 240302920, 10),
266             # prev:       213380256
267             # 2012-10-08: 240302920 (x86/Linux)
268             #  (increase due to new codegen)
269            (wordsize(64), 492905640, 10)])
270             # prev:       418306336
271             # 29/08/2012: 492905640
272             #  (increase due to new codegen)
273       ],
274       compile,[''])
275
276 test('T5642',
277      [ only_ways(['normal']),
278        compiler_stats_num_field('bytes allocated',
279            [(wordsize(32), 650000000, 10),
280                      # sample from x86/Linux
281             (wordsize(64), 1300000000, 10)])
282       ],
283       compile,['-O'])
284
285 test('T5837',
286      [ only_ways(['normal']),
287       compiler_stats_num_field('bytes allocated',
288           [(wordsize(32), 40000000, 10),
289           # sample from x86/Linux
290            (wordsize(64), 81879216, 10)])
291               # sample: 3926235424 (amd64/Linux, 15/2/2012)
292              # 2012-10-02 81879216
293              # 2012-09-20 87254264 amd64/Linux
294       ],
295       compile_fail,['-fcontext-stack=50'])
296
297 test('T6048',
298      [ only_ways(['optasm']),
299       compiler_stats_num_field('bytes allocated',
300           [(wordsize(32), 48887164, 10),
301             # prev:       38000000 (x86/Linux)
302             # 2012-10-08: 48887164 (x86/Linux)
303            (wordsize(64), 97247032, 10)])
304              # 18/09/2012 97247032 amd64/Linux
305       ],
306       compile,[''])