Changes between Version 5 and Version 6 of Debugging/ProfilingGhc
- Timestamp:
- 05/09/11 14:25:52 (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Debugging/ProfilingGhc
v5 v6 9 9 to your `build.mk` file. This is more robust than trying things like `GhcStage2HcOpts += -prof` because there are several things to do: first we build the ghc library, then we build the ghc program, linked against the library. 10 10 11 You can also use the prof BuildFlavor:11 You can also use the prof !BuildFlavor: 12 12 13 13 {{{ … … 23 23 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. 24 24 25 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 [wiki:Building/Using#RebuildingtheGHCbinaryaftermakingchanges ] and below for more details.25 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 [wiki:Building/Using#RebuildingtheGHCbinaryaftermakingchanges Rebuilding GHC] and below for more details.
