debugging memory allocations

Duncan Coutts duncan.coutts at
Wed Feb 2 19:40:35 EST 2005

On Wed, 2005-02-02 at 13:30 -0700, Seth Kurtzberg wrote:
> Duncan Coutts wrote:
> >In these cases we cannot turn on traditional profiling since that would
> >interfere with the optimisations we are relying on to eliminate most of
> >the other memory allocations.
> >  
> I don't understand why you can't use profiling as a debugging tool.  How 
> would profileing, ifor test purposes, cause other things to break?

The problem is that profiling add in extra parameters and extra code to
each function (each SCC). This can interfere with optimisations like
inlining and unboxing I believe. Simon could explain it better.

Generally profiling is great, but for some of these low level
optimisation problems you can end up profiling a different program
program to the one you are interested in (the unoptimised one rather
than the optimised one).


More information about the Glasgow-haskell-users mailing list