[Haskell] Haskell profiler

Tim Chevalier catamorphism at gmail.com
Thu Jan 1 17:33:40 EST 2009


On 12/29/08, Srinivas Nedunuri <nedunuri at cs.utexas.edu> wrote:
> Could someone tell me what the expected accuracy of the Haskell profiler is?
>  I get quite widely varying results for the amount of time spent on a given
>  function across different runs (eg one random example, from 1.5% to 10%). I
>  even upped the size of the dataset in an attempt to increase the accuracy.

[redirecting to ghc-users]

I assume you mean the GHC profiler. It's normal when profiling any
programs, Haskell or not, for timing numbers to vary. Memory
allocation counts, however, should be stable across different runs.

>  Also a related q: why doesnt't the time spent in putStr show up?
>

You would have to rebuild your GHC libraries with the -auto-all flag
in order to get cost centres attached to library functions (but this
may defeat some optimizations).

Cheers,
Tim

-- 
Tim Chevalier * http://cs.pdx.edu/~tjc * Often in error, never in doubt
"It's okay to be mean to the evil people who make life unbelievable,
but try to be nice to me." -- Nerissa Nields


More information about the Glasgow-haskell-users mailing list