Re: profiling for stack usage

2003-08-18 Thread Ketil Z. Malde
Simon Marlow [EMAIL PROTECTED] writes: 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-heap.html#RTS-OPTIONS-HEAP-PROF+RTS in particular, the -xt flag. Hmm,

RE: profiling for stack usage

2003-08-18 Thread Simon Marlow
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,

profiling for stack usage

2003-08-15 Thread Ketil Z. Malde
Hi again, I'm currently in a situation where my program runs easily out of stack. Depending on the input, stack usage often exceeds 10Mb. 1. Is there a way to profile stack usage, so that I can identify the culprit and deal with the problem at the root? Normal (time) profiling tells me how

Re: profiling for stack usage

2003-08-15 Thread Alastair Reid
I'm currently in a situation where my program runs easily out of stack. Depending on the input, stack usage often exceeds 10Mb. I have better than 75% success locating the source of these bugs with the following command: grep '+1' *.hs *.lhs Reason: Lazy arithmetic can easily cause you