Test for Debug.Trace.traceStack and GHC.Stack.whoCreated
[ghc.git] / testsuite / tests / profiling / should_run / all.T
1 # Test for #1227, #1418
2
3 extra_prof_ways = ['prof', 'prof_hc_hb', 'prof_hb', 'prof_hd', 'prof_hy', 'prof_hr']
4
5 test('heapprof001',
6      composes([only_ways(prof_ways),
7                extra_ways(extra_prof_ways),
8                req_profiling,
9                extra_run_opts('7')]),
10      compile_and_run, [''])
11
12 test('2592',
13      [only_ways(['profasm']), req_profiling,
14       extra_run_opts('+RTS -M1m -RTS'), exit_code(251)],
15      compile_and_run, [''])
16
17 test('T3001',
18      [only_ways(['prof_hb']), extra_ways(['prof_hb']), req_profiling],
19      compile_and_run, [''])
20
21 test('T3001-2',
22      [only_ways(['prof_hb']), extra_ways(['prof_hb']), req_profiling],
23      compile_and_run, ['-package bytestring'])
24
25 test('scc001', [req_profiling,
26                 extra_ways(['prof']), only_ways(prof_ways)],
27      compile_and_run,
28      ['-fno-state-hack']) # Note [consistent stacks]
29
30 test('scc002', [req_profiling,
31                 extra_ways(['prof']), only_ways(prof_ways)],
32      compile_and_run,
33      [''])
34
35 test('scc003', [req_profiling,
36                 extra_ways(['prof']), only_ways(prof_ways)],
37      compile_and_run,
38      ['-fno-state-hack']) # Note [consistent stacks]
39
40 test('scc004', [req_profiling,
41                 extra_ways(['prof']), only_ways(prof_ways),
42                 expect_broken(5654)],
43      compile_and_run,
44      [''])
45
46 test('5314',
47      [ only_ways(prof_ways),
48        extra_ways(extra_prof_ways),
49        req_profiling ],
50      compile_and_run,
51      [''])
52
53 test('T680',
54      [ req_profiling, extra_ways(['prof']), only_ways(prof_ways) ],
55      compile_and_run,
56      ['-fno-full-laziness']) # Note [consistent stacks]
57
58 test('T2552',
59      [ req_profiling, extra_ways(['prof']), only_ways(prof_ways) ],
60      compile_and_run,
61      [''])
62
63 test('T949',
64      [ req_profiling, extra_ways(extra_prof_ways), only_ways(prof_ways) ],
65      compile_and_run,
66      [''])
67
68 test('ioprof',
69      [ req_profiling, extra_ways(['prof']), only_ways(prof_ways),
70        expect_fail_for(['prof']),
71         # The results for 'prof' are fine, but the ordering changes.
72         # We care more about getting the optimised results right, so ignoring
73         # this for now.
74        exit_code(1) ],
75      compile_and_run,
76      ['-fno-full-laziness -fno-state-hack']) # Note [consistent stacks]
77
78 # These two examples are from the User's Guide:
79
80 test('prof-doc-fib',
81      [ req_profiling, extra_ways(['prof']), only_ways(prof_ways) ],
82      compile_and_run,
83      [''])
84
85 test('prof-doc-last',
86      [ req_profiling, extra_ways(['prof']), only_ways(prof_ways) ],
87      compile_and_run,
88      ['-fno-full-laziness'])
89
90 test('T5559', # unicode in cost centre names
91      [ req_profiling, extra_ways(['prof']), only_ways(prof_ways) ],
92      compile_and_run,
93      [''])
94
95 # Note [consistent stacks]
96 #  Certain optimisations can change the stacks we get out of the
97 #  profiler.  These flags are necessary (but perhaps not sufficient)
98 #  to get consistent stacks:
99 #
100 #       -fno-state-hack
101 #       -fno-full-laziness
102
103 test('callstack001',
104      [ req_profiling, extra_ways(['prof']), only_ways(prof_ways) ],
105      compile_and_run, [''])
106
107 test('callstack002',
108      [ req_profiling, extra_ways(['prof']), only_ways(prof_ways) ],
109      compile_and_run, ['-fno-full-laziness -fno-state-hack'])