[commit: ghc] master: Make 'error' include the CCS call stack when profiled (8988be8)

git at git.haskell.org git at git.haskell.org
Fri Nov 13 16:06:36 UTC 2015


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/8988be8561ce0857f3befd6ab3b6c29060685c0a/ghc

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

commit 8988be8561ce0857f3befd6ab3b6c29060685c0a
Author: Simon Marlow <marlowsd at gmail.com>
Date:   Tue Nov 3 14:06:09 2015 +0000

    Make 'error' include the CCS call stack when profiled
    
    Summary:
    The idea here is that this gives a more detailed stack trace in two
    cases:
    
    1. With `-prof` and `-fprof-auto`
    2. In GHCi (see #11047)
    
    Example, with an error inserted in nofib/shootout/binary-trees:
    
    ```
    $ ./Main 3
    Main: z
    CallStack (from ImplicitParams):
      error, called at Main.hs:67:29 in main:Main
    CallStack (from -prof):
      Main.check' (Main.hs:(67,1)-(68,82))
      Main.check (Main.hs:63:1-21)
      Main.stretch (Main.hs:32:35-57)
      Main.main.c (Main.hs:32:9-57)
      Main.main (Main.hs:(27,1)-(43,42))
      Main.CAF (<entire-module>)
    ```
    
    This doesn't quite obsolete +RTS -xc, which also attempts to display
    more information in the case when the error is in a CAF, but I'm
    exploring other solutions to that.
    
    Includes submodule updates.
    
    Test Plan: validate
    
    Reviewers: simonpj, ezyang, gridaphobe, bgamari, hvr, austin
    
    Reviewed By: bgamari
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D1426


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

8988be8561ce0857f3befd6ab3b6c29060685c0a
 libraries/array                                    |   2 +-
 libraries/base/GHC/Exception.hs                    |  33 ++--
 libraries/base/GHC/IO.hs                           | 155 +-----------------
 libraries/base/GHC/IO/Unsafe.hs                    | 180 +++++++++++++++++++++
 libraries/base/GHC/Stack.hs                        |  59 +++++++
 libraries/base/GHC/Stack.hsc                       |   1 -
 libraries/base/GHC/Stack/CCS.hs-boot               |  16 ++
 libraries/base/GHC/{Stack.hsc => Stack/CCS.hsc}    |  23 +--
 libraries/base/base.cabal                          |   2 +
 libraries/base/tests/assert.stderr                 |   3 +-
 libraries/base/tests/readFloat.stderr              |   2 +-
 libraries/hpc                                      |   2 +-
 libraries/stm                                      |   2 +-
 .../tests/annotations/should_fail/annfail12.stderr |   2 +-
 testsuite/tests/array/should_run/arr003.stderr     |   2 +-
 testsuite/tests/array/should_run/arr004.stderr     |   2 +-
 testsuite/tests/array/should_run/arr007.stderr     |   2 +-
 testsuite/tests/array/should_run/arr008.stderr     |   2 +-
 testsuite/tests/codeGen/should_run/T5626.stderr    |   4 +-
 testsuite/tests/codeGen/should_run/cgrun016.stderr |   2 +-
 testsuite/tests/codeGen/should_run/cgrun045.stderr |   2 +-
 testsuite/tests/codeGen/should_run/cgrun051.stderr |   2 +-
 testsuite/tests/codeGen/should_run/cgrun059.stderr |   2 +-
 .../tests/concurrent/should_run/conc021.stderr     |   2 +-
 testsuite/tests/deriving/should_run/T5628.stderr   |   2 +-
 testsuite/tests/driver/sigof02/sigof02.stderr      |   4 +-
 testsuite/tests/driver/sigof02/sigof02m.stderr     |   4 +-
 testsuite/tests/ffi/should_run/ffi008.stderr       |   2 +-
 testsuite/tests/ffi/should_run/fptrfail01.stderr   |   4 +-
 testsuite/tests/ghc-e/should_run/ghc-e005.stderr   |   2 +-
 .../tests/ghci.debugger/scripts/break009.stdout    |   2 +-
 .../tests/ghci.debugger/scripts/break011.stdout    |  10 +-
 .../tests/ghci.debugger/scripts/break017.stdout    |   2 +-
 testsuite/tests/ghci/scripts/T10501.stderr         |   8 +-
 testsuite/tests/ghci/scripts/T5557.stdout          |   4 +-
 testsuite/tests/ghci/scripts/ghci055.stdout        |   2 +-
 testsuite/tests/profiling/should_run/ioprof.stderr |  13 +-
 .../safeHaskell/safeLanguage/SafeLang09.stderr     |   2 +-
 testsuite/tests/simplCore/should_fail/T7411.stderr |   4 +-
 testsuite/tests/simplCore/should_run/T457.stderr   |   2 +-
 testsuite/tests/simplCore/should_run/T5587.stderr  |   2 +-
 testsuite/tests/simplCore/should_run/T5625.stderr  |   4 +-
 testsuite/tests/stranal/should_run/strun002.stderr |   2 +-
 testsuite/tests/th/T5358.stderr                    |   2 +-
 testsuite/tests/th/T5976.stderr                    |   2 +-
 testsuite/tests/th/T8987.stderr                    |   4 +-
 testsuite/tests/th/TH_exn2.stderr                  |   4 +-
 .../tests/typecheck/should_run/IPLocation.stdout   |  16 +-
 48 files changed, 355 insertions(+), 252 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 8988be8561ce0857f3befd6ab3b6c29060685c0a


More information about the ghc-commits mailing list