3 questions regarding profiling in ghc

Daniil Elovkov daniil.elovkov at googlemail.com
Thu Nov 12 03:01:22 EST 2009


Hello

Sorry for the uninformative subject, but I've got no less than 3 
questions about profiling in ghc. Here we go

1) Can I profile my program if I don't have all the libraries it depends 
on compiled with profiling?

ghc says it can't find profiling variants of this and that module in 
other packages, when I try ghc -prof.

I managed to build all the dependencies with profiling, but that being a 
necessity doesn't look good to me. Maybe there's a way to avoid that?

Moreover, as far as I could tell functions from those packages didn't 
appear in the call graph after +RTS -p profiling.

2) Can I exclude a function from profiling? That probably means not 
assigning a cost centre to it.

Typical case, I think. Database connect function is rather heavyweight 
(regarding time) compared to the rest of the code, and it takes up to 
98% of time. So the rest of the picture is less informative than it 
could be.

3) Isn't it possible to have -p profiling data of the interrupted 
(ctrl-c) program?

Thanks a lot!

--
Daniil Elovkov


More information about the Glasgow-haskell-users mailing list