[Haskell-cafe] Re: Resending: MissingH: profiler support?

Gregory Wright gwright at comcast.net
Fri Jan 12 14:16:19 EST 2007


Hi John,

On Jan 12, 2007, at 10:25 AM, John Goerzen wrote:

> On Fri, Jan 12, 2007 at 08:10:47AM -0500, Gregory Wright wrote:
>>> -- John
>>
>> Does MissingH's cabal file have a line
>>
>> 	Ghc-Prof-Options:       -prof -auto-all
>
> No, it doesn't.  None of my Cabal files do.  Could anyone confirm if
> this fixes it?
>
>> The rhs of the option is added to compiler command line when the
>> --enable-library-profiling option is included to configure.  Without
>> this,
>> the --enable-library-profiling switch doesn't do anything.   
>> (Arguably a
>> bug that cabal silently does nothing instead of reporting an error.)
>
> I'd argue that Cabal should make this a default.  It seems silly to  
> have
> to add this boilerplate code to every cabal file out there just to  
> have
> a sensible default.


Actually, for some reason my brain missed that your were talking about
a library, not an application.  As lemmih said, --enable-executable- 
profiling
will make you a profiling library.  If you are building an app  
however, unless
you include a "Ghc-Prof-Options" something like the above, or add  
cost center
annotations yourself, you just get a profile that tells you that Main  
took 100% of
the time.

Best,
Greg

> Thanks for the info.
>
> -- John
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe



More information about the Haskell-Cafe mailing list