[commit: ghc] master: Make GHCi & TH work when the compiler is built with -prof (ce1f160)

git at git.haskell.org git at git.haskell.org
Sat Nov 7 09:39:06 UTC 2015


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

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

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

commit ce1f1607ed7f8fedd2f63c8610cafefd59baaf32
Author: Simon Marlow <marlowsd at gmail.com>
Date:   Sat Nov 7 09:39:05 2015 +0000

    Make GHCi & TH work when the compiler is built with -prof
    
    Summary:
    Amazingly, there were zero changes to the byte code generator and very
    few changes to the interpreter - mainly because we've used good
    abstractions that hide the differences between profiling and
    non-profiling.  So that bit was pleasantly straightforward, but there
    were a pile of other wibbles to get the whole test suite through.
    
    Note that a compiler built with -prof is now like one built with
    -dynamic, in that to use TH you have to build the code the same way.
    For dynamic, we automatically enable -dynamic-too when TH is required,
    but we don't have anything equivalent for profiling, so you have to
    explicitly use -prof when building code that uses TH with a profiled
    compiler.  For this reason Cabal won't work with TH.  We don't expect
    to ship a profiled compiler, so I think that's OK.
    
    Test Plan: validate with GhcProfiled=YES in validate.mk
    
    Reviewers: goldfire, bgamari, rwbarton, austin, hvr, erikd, ezyang
    
    Reviewed By: ezyang
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D1407
    
    GHC Trac Issues: #4837, #545


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

ce1f1607ed7f8fedd2f63c8610cafefd59baaf32
 compiler/cmm/CmmInfo.hs                            |  4 ++
 compiler/codeGen/StgCmmProf.hs                     | 13 ++--
 compiler/ghci/ByteCodeItbls.hs                     | 18 ++++--
 compiler/ghci/Linker.hs                            | 74 ++++++++++++----------
 compiler/ghci/RtClosureInspect.hs                  | 15 +++--
 compiler/main/DynFlags.hs                          | 21 ++++--
 compiler/main/HscMain.hs                           |  5 --
 ghc/InteractiveUI.hs                               | 10 ---
 includes/rts/prof/CCS.h                            |  2 +
 includes/rts/storage/InfoTables.h                  | 28 --------
 rts/Interpreter.c                                  | 14 ++--
 rts/Linker.c                                       | 19 +++++-
 rts/PrimOps.cmm                                    |  2 -
 rts/ProfHeap.c                                     |  2 +-
 rts/Profiling.c                                    | 47 +++++++-------
 rts/Profiling.h                                    |  2 +-
 rts/RtsStartup.c                                   |  6 +-
 rts/RtsSymbols.c                                   | 15 +++++
 testsuite/config/ghc                               |  6 +-
 testsuite/mk/boilerplate.mk                        |  4 ++
 testsuite/mk/ghc-config.hs                         |  1 +
 testsuite/tests/annotations/should_compile/all.T   |  3 -
 .../tests/annotations/should_compile/th/Makefile   | 10 +--
 .../tests/annotations/should_compile/th/all.T      |  2 -
 .../tests/annotations/should_compile/th/annth.hs   |  2 +
 testsuite/tests/annotations/should_run/all.T       |  1 -
 testsuite/tests/cabal/cabal04/Makefile             |  2 +-
 testsuite/tests/cabal/cabal04/all.T                |  2 +-
 testsuite/tests/ghc-e/should_fail/all.T            |  2 -
 testsuite/tests/ghc-e/should_run/all.T             |  2 -
 testsuite/tests/ghci.debugger/scripts/all.T        |  1 -
 .../tests/ghci.debugger/scripts/break022/all.T     |  1 -
 .../tests/ghci.debugger/scripts/break023/all.T     |  1 -
 testsuite/tests/ghci/scripts/all.T                 |  2 -
 testsuite/tests/ghci/should_fail/all.T             |  2 -
 testsuite/tests/ghci/should_run/all.T              |  2 -
 testsuite/tests/layout/all.T                       |  3 +-
 testsuite/tests/overloadedrecflds/ghci/all.T       |  2 -
 testsuite/tests/partial-sigs/should_compile/all.T  |  4 +-
 testsuite/tests/partial-sigs/should_fail/all.T     |  6 +-
 testsuite/tests/plugins/annotation-plugin/Makefile |  2 +-
 .../tests/plugins/rule-defining-plugin/Makefile    |  2 +-
 testsuite/tests/plugins/simple-plugin/Makefile     |  2 +-
 .../tests/profiling/should_run/ioprof.prof.sample  | 62 ++++++++++--------
 testsuite/tests/profiling/should_run/ioprof.stderr |  2 +
 testsuite/tests/quasiquotation/qq007/Makefile      |  2 +-
 testsuite/tests/quasiquotation/qq007/test.T        |  2 +-
 testsuite/tests/quasiquotation/qq008/Makefile      |  2 +-
 testsuite/tests/quasiquotation/qq008/test.T        |  2 +-
 testsuite/tests/quasiquotation/qq009/Makefile      |  2 +-
 testsuite/tests/quasiquotation/qq009/test.T        |  2 +-
 testsuite/tests/runghc/all.T                       |  3 -
 testsuite/tests/th/Makefile                        |  2 +-
 testsuite/tests/th/T2014/all.T                     |  2 -
 testsuite/tests/th/T4255.hs                        |  5 --
 testsuite/tests/th/T4255.stderr                    |  2 -
 testsuite/tests/th/TH_import_loop/TH_import_loop.T |  2 -
 testsuite/tests/th/all.T                           | 14 ++--
 58 files changed, 235 insertions(+), 235 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 ce1f1607ed7f8fedd2f63c8610cafefd59baaf32


More information about the ghc-commits mailing list