RE: How do I profile Prelude functions?

Alistair,
I can't find advice in the GHC manual on determining how much time your program spends in Prelude functions. I've discovered that I can alias a Prelude function e.g.
import Data.Set
....
myMkSet = mkSet
... which will give me a cost-centre for mkMySet. Isn't there an easier way to do this?
Sorry for the delay in answering your question. We should really turn on -auto-all when compiling the libraries for profiling, but we don't for several reasons: (a) it affects optimisations (b) it makes profiles harder to read (c) it makes the libraries a lot larger these are all things we should fix (well, at least (a) and (b)). For (b), we really need a better tool for viewing the profiles: I have a prototype for such a tool which uses Gtk+HS, which I'll try to incorporate at some point. You can of course compile up your own libraries with -auto-all turned on. Or alternatively, just use the workaround you discovered. Cheers, Simon
participants (1)
-
Simon Marlow