... | ... | @@ -26,4 +26,7 @@ $(TOP)/inplace/bin/ghc-stage2 +RTS -p -RTS |
|
|
```
|
|
|
|
|
|
|
|
|
Note that this builds a profiled *stage-2* compiler. In principle it's possible to build a profiled *stage-1* compiler, but the build system isn't set up to do that right now. Notably, various libraries (eg Cabal) are built and installed by the bootstrap compiler before building GHC; these would need to be built and installed in a profiled way too. |
|
|
Note that this builds a profiled *stage-2* compiler. In principle it's possible to build a profiled *stage-1* compiler, but the build system isn't set up to do that right now. Notably, various libraries (eg Cabal) are built and installed by the bootstrap compiler before building GHC; these would need to be built and installed in a profiled way too. Additionally, the built compiler will manifest any profiling bugs that were in your bootstrapping compiler.
|
|
|
|
|
|
|
|
|
If you want to profile GHC while compiling GHC, the easiest way to do this is to build a *stage-3* compiler with your profiled *stage-2* compiler. You’ll need to run `make stage=3` the first time you do this in order to build the dependencies for the stage3 compiler; see [Building/Using](building/using#rebuilding-the-ghc-binary-after-making-changes) and below for more details. |