mlprof

Stephen Weeks MLton@sourcelight.com
Thu, 21 Sep 2000 16:48:45 -0700 (PDT)


> Oh,  I  tried  to  profile the code, but the profiler is broken.  The problem
> isn't the mlprof program (although that is  wrong  to)  but  in  the  PROFILE
> comments inserted in the code by the MLton compiler.  They are supposed to be
> only on CPS function boundaries, but refer to things which don't exist in the
> CPS file and whic look too frequent to be functions.

Yeah.  The 20000906 version had a vestige of some testing I was doing where I
put in finer grained profile labels.  I fixed it.  I also added a -b switch to
mlprof that makes it print information at the "basic block" level, where basic
blocks are defined by C labels in the C source.  This is very useful when CPS
function granularity is too coarse.  I found it quite helpful in profiling the
TextIO stuff.

> As  to the output of mlprof, my old mlprof and the new one don't quite agree.
> They don't differ by too much, so it could be just random things.

If you have the files (.c, a.out, gmon.out) I'm willing to look at it.  But I
bet it's just the bucket granularity.