Make failing perf test output easier to read
[ghc.git] / testsuite / tests / perf / should_run / all.T
1 # Tests that newArray/newArray_ is being optimised correctly
2
3 # fortunately the values here are mostly independent of the wordsize,
4 # because the test allocates an unboxed array of doubles.
5
6 test('T3586',
7      [stats_range_field('peak_megabytes_allocated', 17, 1),
8                                      # expected value: 17 (amd64/Linux)
9       stats_range_field('bytes allocated', 16835544, 5),
10                                      # expected value: 16835544 (amd64/Linux)
11       only_ways(['normal'])
12       ],
13      compile_and_run,
14      ['-O'])
15
16 test('T4830',
17      [stats_range_field('bytes allocated', 127000, 5),
18                                      # expected value: 127,000 (amd64/Linux)
19       only_ways(['normal'])
20       ],
21      compile_and_run,
22      ['-O2'])
23
24 test('T3245', normal, compile_and_run, ['-O'])
25
26 # Test that bytestring reading/writing isn't over-allocating.  We had
27 # a bug in hGetBufNonBlocking in 6.13 that triggered this.
28 #
29 test('lazy-bs-alloc',
30      [stats_range_field('peak_megabytes_allocated', 2, 1),
31                                      # expected value: 2 (amd64/Linux)
32       stats_range_field('bytes allocated', 489776, 5),
33                                      # expected value: 489776 (amd64/Linux)
34       only_ways(['normal']),
35       extra_run_opts('../../numeric/should_run/arith011.stdout'),
36       ignore_output
37       ],
38       # use a suitably big file, without bloating the repo with a new one:
39      compile_and_run,
40      ['-O'])
41
42 # Get reproducible floating-point results on x86
43 if config.arch == 'i386':
44    sse2_opts = '-msse2'
45 else:
46    sse2_opts = ''
47
48 test('T4321',
49      omit_ways(['ghci']),
50      compile_and_run, ['-O ' + sse2_opts])
51
52 test('T3736',
53      extra_clean(['T3736.speed.f32']),
54      run_command,
55      ['$MAKE -s --no-print-directory T3736'])
56 test('T3738',
57      [extra_clean(['T3738a.hi', 'T3738a.o']),
58       stats_range_field('peak_megabytes_allocated', 1, 0),
59                                      # expected value: 1 (amd64/Linux)
60       if_wordsize(32,
61           stats_range_field('bytes allocated', 45648, 5)),
62                                      # expected value: 45648 (x86/Linux):
63       if_wordsize(64,
64           stats_range_field('bytes allocated', 49400, 5)),
65                                      # expected value: 49400 (amd64/Linux)
66       only_ways(['normal'])
67       ],
68      compile_and_run,
69      ['-O'])
70
71 test('MethSharing',
72      [stats_range_field('peak_megabytes_allocated', 1, 0),
73                                      # expected value: 1 (amd64/Linux)
74       # expected value: 2685858140 (x86/OS X):
75       if_wordsize(32,
76           stats_range_field('bytes allocated', 360940756, 5)),
77                                   # expected: 360940756 (x86/Linux)
78       if_wordsize(64,
79           stats_range_field('bytes allocated', 640067672, 5)),
80                                   # expected: 640067672 (amd64/Linux)
81       only_ways(['normal'])
82       ],
83      compile_and_run,
84      ['-O'])
85 test('T2902',
86      extra_clean(['T2902_A',    'T2902_B',
87                   'T2902_A.hi', 'T2902_B.hi',
88                   'T2902_A.o',  'T2902_B.o',
89                   'T2902_A_PairingSum.hi', 'T2902_B_PairingSum.hi',
90                   'T2902_A_PairingSum.o',  'T2902_B_PairingSum.o',
91                   'T2902_Sum.hi',
92                   'T2902_Sum.o']),
93      run_command,
94      ['$MAKE -s --no-print-directory T2902'])
95 test('T149',
96      [expect_broken(149),
97       extra_clean(['T149_A',    'T149_B',
98                    'T149_A.hi', 'T149_B.hi',
99                    'T149_A.o',  'T149_B.o'])],
100      run_command,
101      ['$MAKE -s --no-print-directory T149'])
102
103 test('T5113',
104      [
105       if_wordsize(32,
106           stats_range_field('bytes allocated', 4000000, 5)),
107       if_wordsize(64,
108           stats_range_field('bytes allocated', 8000000, 5)),
109       only_ways(['normal']),
110       expect_broken(7046)
111       ],
112      compile_and_run,
113      ['-O'])
114
115
116 test('T4978',
117      [if_wordsize(32,
118           stats_range_field('bytes allocated', 10000000, 5)),
119       if_wordsize(64,
120           stats_range_field('bytes allocated', 10137680, 5)),
121                                      # expected value: 10137680 (amd64/Linux)
122       only_ways(['normal'])
123       ],
124      compile_and_run,
125      ['-O2'])
126
127 test('T5205',
128      [if_wordsize(32,
129           stats_range_field('bytes allocated', 47088, 5)),
130                            # expected value: 47088 (x86/Darwin)
131       if_wordsize(64,
132           stats_range_field('bytes allocated', 51320, 5)),
133                            # expected value: 51320 (amd64/Linux)
134       only_ways(['normal', 'optasm'])
135       ],
136      compile_and_run,
137      [''])
138
139 test('T5549',
140      [if_wordsize(32,
141           stats_range_field('bytes allocated', 3362958676, 5)),
142                            # expected value: 3362958676 (Windows)
143       if_wordsize(64,
144           stats_range_field('bytes allocated', 6725846120, 5)),
145                            # expected value: 6,725,846,120 (amd64/Linux)
146       only_ways(['normal'])
147       ],
148      compile_and_run,
149      ['-O'])
150
151 test('T4474a',
152      [if_wordsize(32,
153           stats_range_field('bytes allocated', 1879095912, 5)),
154                            # expected value: 1879095912 (i386/OSX)
155       if_wordsize(64,
156           stats_range_field('bytes allocated', 3766493912, 5)),
157                            # expected value: 3766493912 (amd64/Linux)
158       only_ways(['normal'])
159       ],
160      compile_and_run,
161      ['-O'])
162 test('T4474b',
163      [if_wordsize(32,
164           stats_range_field('bytes allocated', 1879095912, 5)),
165                            # expected value: 1879095912 (i386/OSX)
166       if_wordsize(64,
167           stats_range_field('bytes allocated', 3766493912, 5)),
168                            # expected value: 3766493912 (amd64/Linux)
169       only_ways(['normal'])
170       ],
171      compile_and_run,
172      ['-O'])
173 test('T4474c',
174      [if_wordsize(32,
175           stats_range_field('bytes allocated', 1879095912, 5)),
176                            # expected value: 1879095912 (i386/OSX)
177       if_wordsize(64,
178           stats_range_field('bytes allocated', 3766493912, 5)),
179                            # expected value: 3766493912 (amd64/Linux)
180       only_ways(['normal'])
181       ],
182      compile_and_run,
183      ['-O'])
184
185 test('T5237',
186      [if_wordsize(32,
187           stats_range_field('bytes allocated',  78328, 5)),
188                            # expected value: 78328 (i386/Linux)
189       if_wordsize(64,
190           stats_range_field('bytes allocated',  110888, 5)),
191                            # expected value: 110888 (amd64/Linux)
192      only_ways(['normal'])
193      ],
194     compile_and_run,
195     ['-O ' + sse2_opts])
196
197 test('T5536',
198      [if_wordsize(32,
199           stats_range_field('bytes allocated', 1246287228, 5)),
200                            # expected value: 1246287228 (i386/Linux)
201       if_wordsize(64,
202           stats_range_field('bytes allocated', 892399040, 5)),
203                            # expected value: 2,492,589,480 (amd64/Linux)
204                            # 17/1/13:          892,399,040 (x86_64/Linux)
205                            #                   (new demand analyser)
206      extra_clean(['T5536.data']),
207      ignore_output,
208      only_ways(['normal'])
209      ],
210     compile_and_run,
211     ['-O'])
212
213 test('T7257',
214      [if_wordsize(32,
215           stats_range_field('bytes allocated', 1150000000, 10)),
216                            # expected value: 1246287228 (i386/Linux)
217       if_wordsize(32,
218           stats_range_field('peak_megabytes_allocated', 217, 5)),
219                            # 2012-10-08: 217 (x86/Linux)
220       if_wordsize(64,
221           stats_range_field('bytes allocated', 1774893760, 5)),
222                            # 2012-09-21: 1774893760 (amd64/Linux)
223       if_wordsize(64,
224           stats_range_field('peak_megabytes_allocated', 227, 5)),
225                            # 2012-09-21: 227 (amd64/Linux)
226
227       only_ways(['normal'])
228      ],
229     compile_and_run, ['-O'])
230
231 test('Conversions',
232      [if_wordsize(32,
233           stats_range_field('bytes allocated', 55316, 5)),
234                            # 2012-12-18: Guessed 64-bit value / 2
235       if_wordsize(64,
236           stats_range_field('bytes allocated', 110632, 5)),
237                            # 2012-12-18: 109608 (amd64/OS X)
238
239       only_ways(['normal'])
240      ],
241     compile_and_run, ['-O'])
242
243 test('T7507', omit_ways(['ghci']), compile_and_run, ['-O'])
244 # For 7507, stack overflow is the bad case
245
246 test('T7436',
247      [stats_range_field('max_bytes_used', 70000, 5),
248                                      # expected value: 127,000 (amd64/Linux)
249       only_ways(['normal'])
250       ],
251      compile_and_run,
252      ['-O'])