I'm using GHC 7.4.1 and trying to profile a piece of code. Unfortunately, the output of the profiler assigns one big cost centre to the main
function, instead of breaking it up into multiple cost centres for each function.
This is the procedure I'm following to profile the code. I'd appreciate a pointer to what I'm doing wrong.
First, reinstall the library, enabling optimizations and profiling:
cabal install -p -O2
Next, I recompile the code I want to profile:
ghc -rtsopts -prof -fprof-auto -fforce-recomp --make -O2 "Main.hs"
Finally, I run it with a few profiling options:
./Main +RTS -K100M -s -p -hy
and this is the result:
COST CENTRE MODULE %time %alloc
main Main 100.0 100.0
Anything obvious that I'm doing wrong?