Commit 90cfa849 authored by Simon Marlow's avatar Simon Marlow Committed by Ben Gamari

Run some tests with -fexternal-interpreter -prof

We don't have any other tests for this, except one Template Haskell
test.  This would have caught the bug I just fixed in D2868, at least
when validating with profiling on.

Test Plan: Ran tests

Reviewers: niteria, austin, erikd, bgamari

Reviewed By: bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2869

GHC Trac Issues: #5654
parent 2a02040b
......@@ -30,7 +30,7 @@ config.other_ways = ['prof', 'normal_h',
'llvm', 'debugllvm',
'profllvm', 'profoptllvm', 'profthreadedllvm',
'debug',
'ghci-ext',
'ghci-ext', 'ghci-ext-prof',
'ext-interp']
if (ghc_with_native_codegen == 1):
......@@ -100,6 +100,7 @@ config.way_flags = {
'profoptllvm' : ['-O', '-prof', '-static', '-fprof-auto', '-fllvm'],
'profthreadedllvm' : ['-O', '-prof', '-static', '-fprof-auto', '-threaded', '-fllvm'],
'ghci-ext' : ['--interactive', '-v0', '-ignore-dot-ghci', '-fno-ghci-history', '-fexternal-interpreter', '+RTS', '-I0.1', '-RTS'],
'ghci-ext-prof' : ['--interactive', '-v0', '-ignore-dot-ghci', '-fno-ghci-history', '-fexternal-interpreter', '-prof', '+RTS', '-I0.1', '-RTS'],
'ext-interp' : ['-fexternal-interpreter'],
}
......@@ -137,6 +138,7 @@ config.way_rts_flags = {
'profoptllvm' : ['-hc', '-p'],
'profthreadedllvm' : ['-p'],
'ghci-ext' : [],
'ghci-ext-prof' : [],
'ext-interp' : [],
}
......
......@@ -13,7 +13,7 @@ test('T11489', [req_profiling, extra_clean(['T11489.prof', 'T11489.hp'])],
# Below this line, run tests only with profiling ways.
setTestOpts(req_profiling)
setTestOpts(extra_ways(['prof']))
setTestOpts(extra_ways(['prof', 'ghci-ext-prof']))
setTestOpts(only_ways(prof_ways))
setTestOpts(keep_prof_callstacks)
......@@ -21,7 +21,8 @@ extra_prof_ways = ['prof', 'prof_hc_hb', 'prof_hb', 'prof_hd', 'prof_hy', 'prof_
expect_broken_for_10037 = expect_broken_for(
10037,
[w for w in prof_ways if w not in opt_ways]) # e.g. prof and profllvm
[w for w in prof_ways if w not in opt_ways and w != 'ghci-ext-prof'])
# e.g. prof and profllvm
test('heapprof001',
[when(have_profiling(), extra_ways(extra_prof_ways)), extra_run_opts('7')],
......@@ -69,7 +70,12 @@ test('T949', [extra_ways(extra_prof_ways)], compile_and_run, [''])
# The results for 'prof' are fine, but the ordering changes.
# We care more about getting the optimised results right, so ignoring
# this for now.
test('ioprof', [expect_broken_for_10037, exit_code(1)], compile_and_run,
test('ioprof',
[expect_broken_for_10037,
exit_code(1),
omit_ways(['ghci-ext-prof']) # doesn't work with exit_code(1)
],
compile_and_run,
['-fno-full-laziness -fno-state-hack']) # Note [consistent stacks]
# These two examples are from the User's Guide:
......@@ -89,11 +95,17 @@ test('T5559', [], compile_and_run, [''])
# -fno-state-hack
# -fno-full-laziness
test('callstack001', [expect_broken_for_10037],
test('callstack001',
# unoptimised results are different w.r.t. CAF attribution
compile_and_run, ['-fprof-auto-calls -fno-full-laziness -fno-state-hack'])
[ expect_broken_for_10037,
omit_ways(['ghci-ext-prof']), # produces a different stack
], compile_and_run,
['-fprof-auto-calls -fno-full-laziness -fno-state-hack'])
test('callstack002', [], compile_and_run,
test('callstack002',
[ omit_ways(['ghci-ext-prof']), # produces a different stack
],
compile_and_run,
['-fprof-auto-calls -fno-full-laziness -fno-state-hack'])
# Should not stack overflow with -prof -fprof-auto
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment