Question about profiling in GHC...

Heron heron_carvalho at bol.com.br
Mon Oct 27 03:18:00 EST 2003


Dear GHC users,
 
        I am using GHC profilling tool and I think you can help me to answer a (apparently) simple question:

       When I compile my program without "-prof -auto-all" option (no profiling support), its execution time is about 140s (compiled with -O2). When compiled with profiling support, the time spent by the program is about 180s (I used my own timer to measure this).  Of course, the additional 40s is caused by the profiling annotation code. However, the profiler says (in the ".prof" file produced at the end of execution) that the time spent is about 85s. I suppose that the time measured by the profiler is only for evaluation of the main function of my program (I have compiled all modules with "-prof-all"). But what kind of computation is performed in the rest 95s (180s - 85s) ????? Garbage collection ??? 

       The use of -O2 option have some effect in the profiling ? I am asking this because when I use -O2 when compiling some concurrent Haskell programs that I have implemented in my work, the code assumes strange and not expected behaviour.

Best Regards,
Heron de Carvalho



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://haskell.org/pipermail/glasgow-haskell-users/attachments/20031027/0cd434e9/attachment.htm


More information about the Glasgow-haskell-users mailing list