Changes between Version 5 and Version 6 of Debugging/ProfilingGhc


Ignore:
Timestamp:
May 9, 2011 9:25:52 PM (3 years ago)
Author:
dterei
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Debugging/ProfilingGhc

    v5 v6  
    99to 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. 
    1010 
    11 You can also use the prof BuildFlavor: 
     11You can also use the prof !BuildFlavor: 
    1212 
    1313{{{ 
     
    2323Note 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. 
    2424 
    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. 
     25If 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.