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
Showing
- compiler/cmm/CmmInfo.hs 4 additions, 0 deletionscompiler/cmm/CmmInfo.hs
- compiler/codeGen/StgCmmProf.hs 7 additions, 6 deletionscompiler/codeGen/StgCmmProf.hs
- compiler/ghci/ByteCodeItbls.hs 13 additions, 5 deletionscompiler/ghci/ByteCodeItbls.hs
- compiler/ghci/Linker.hs 42 additions, 32 deletionscompiler/ghci/Linker.hs
- compiler/ghci/RtClosureInspect.hs 8 additions, 7 deletionscompiler/ghci/RtClosureInspect.hs
- compiler/main/DynFlags.hs 14 additions, 7 deletionscompiler/main/DynFlags.hs
- compiler/main/HscMain.hs 0 additions, 5 deletionscompiler/main/HscMain.hs
- ghc/InteractiveUI.hs 0 additions, 10 deletionsghc/InteractiveUI.hs
- includes/rts/prof/CCS.h 2 additions, 0 deletionsincludes/rts/prof/CCS.h
- includes/rts/storage/InfoTables.h 0 additions, 28 deletionsincludes/rts/storage/InfoTables.h
- rts/Interpreter.c 8 additions, 6 deletionsrts/Interpreter.c
- rts/Linker.c 16 additions, 3 deletionsrts/Linker.c
- rts/PrimOps.cmm 0 additions, 2 deletionsrts/PrimOps.cmm
- rts/ProfHeap.c 1 addition, 1 deletionrts/ProfHeap.c
- rts/Profiling.c 25 additions, 22 deletionsrts/Profiling.c
- rts/Profiling.h 1 addition, 1 deletionrts/Profiling.h
- rts/RtsStartup.c 1 addition, 5 deletionsrts/RtsStartup.c
- rts/RtsSymbols.c 15 additions, 0 deletionsrts/RtsSymbols.c
- testsuite/config/ghc 5 additions, 1 deletiontestsuite/config/ghc
- testsuite/mk/boilerplate.mk 4 additions, 0 deletionstestsuite/mk/boilerplate.mk
Loading
Please register or sign in to comment