[Haskell-cafe] profiling cabal libraries

2010-10-19 Thread Tom Hawkins
How do I profile cabal libraries?

I cabal install -p a local package I am testing, and I compile a
test of the library using -prof -auto-all.  But the profiling report
only lists a CAF entry for the library, but does not detail any of the
library's top level functions.

What am I doing wrong?

-Tom
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] profiling cabal libraries

2010-10-19 Thread Vo Minh Thu
2010/10/19 Tom Hawkins tomahawk...@gmail.com:
 How do I profile cabal libraries?

 I cabal install -p a local package I am testing, and I compile a
 test of the library using -prof -auto-all.  But the profiling report
 only lists a CAF entry for the library, but does not detail any of the
 library's top level functions.

 What am I doing wrong?

Maybe use -auto-all for compiling the library itself too?

Cheers,
Thu
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] profiling cabal libraries

2010-10-19 Thread Bryan O'Sullivan
On Tue, Oct 19, 2010 at 8:42 AM, Tom Hawkins tomahawk...@gmail.com wrote:


 I cabal install -p a local package I am testing, and I compile a
 test of the library using -prof -auto-all.  But the profiling report
 only lists a CAF entry for the library, but does not detail any of the
 library's top level functions.


That's expected and normal. You either have to manually add SCC annotations
to code, or if you want the usual automated ones, add the following to your
.cabal file:

ghc-prof-options: -auto-all
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe