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