RE: profiling for stack usage

1. Is there a way to profile stack usage, so that I can identify the culprit and deal with the problem at the root?
http://www.haskell.org/ghc/docs/latest/html/users_guide/prof-h eap.html#RTS-OPTIONS-HEAP-PROF+RTS
in particular, the -xt flag.
Hmm, sorry for being so dense, but I'm having a tough time with this. It seems profiling by itself tends to blow the stack -- is that correct/normal behavior? (I'm also using -O2, if that matters)
It is possible for profiling to change the stack behaviour, unfortunately. This is because certain optimisations are disabled when profiling is on, so that we can retain useful profiling information (oh the irony :-).
Is there any way to know what kind of data resides on the stack, or what function generated it? The TSO tells med its size, but isn't really helpful beyond that (or am I missing something?)
I'm afraid not, no. We don't have a way to profile the contents of the stack, only its size. Cheers, Simon
participants (1)
-
Simon Marlow