[commit: ghc] master: Run some tests with -fexternal-interpreter -prof (90cfa84)

git at git.haskell.org git at git.haskell.org
Sun Dec 18 01:02:06 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/90cfa84981ee1f9fb756a3af1bd707674c18c034/ghc

>---------------------------------------------------------------

commit 90cfa84981ee1f9fb756a3af1bd707674c18c034
Author: Simon Marlow <marlowsd at gmail.com>
Date:   Sat Dec 17 18:08:59 2016 -0500

    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


>---------------------------------------------------------------

90cfa84981ee1f9fb756a3af1bd707674c18c034
 testsuite/config/ghc                       |  4 +++-
 testsuite/tests/profiling/should_run/all.T | 24 ++++++++++++++++++------
 2 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/testsuite/config/ghc b/testsuite/config/ghc
index b7d9cbc..b9991d7 100644
--- a/testsuite/config/ghc
+++ b/testsuite/config/ghc
@@ -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'       : [],
    }
 
diff --git a/testsuite/tests/profiling/should_run/all.T b/testsuite/tests/profiling/should_run/all.T
index 5faca29..875a98e 100644
--- a/testsuite/tests/profiling/should_run/all.T
+++ b/testsuite/tests/profiling/should_run/all.T
@@ -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



More information about the ghc-commits mailing list