GHC library profiling

Simon Marlow simonmarhaskell at
Wed Apr 25 03:57:21 EDT 2007

Pasqualino 'Titto' Assini wrote:

> I have a little library that depends on the 'ghc' api library.
> I would like to build my library in profiling mode but this is not possible as 
> the 'ghc' library itself seems to be distributed only in non-profiling mode.
> Is there any way out?
> How can I get or build a profiling version of  'ghc'?

It's certainly easy enough to get a profiling version of GHC - you just add 
-prof to GhcStage2HcOpts (for example) in mk/

To get a profiled version of the GHC library that you can link against, I'm not 
sure - I don't think I've ever done this.  You might try setting 
'GhcCompilerWays=p' in mk/  Almost certainly some tweaks will be 
necessarily in compiler/Makefile, but I'm not sure how much.


More information about the Glasgow-haskell-users mailing list