Profiling tool for SML/NJ

Stephen Weeks MLton@sourcelight.com
Thu, 5 Oct 2000 11:19:22 -0700 (PDT)


> I am looking for any profiling tool for the SML/NJ
> compiler. I need to measure
> the memory use of a program execution, the time spent
> in specfic function and so
> forth.

In case you missed my earlier post to comp.lang.ml
(http://x55.deja.com/threadmsg_md.xp?thitnum=13&mhitnum=0&CONTEXT=970769595.1089601584&new=0), 
I pointed out that MLton has a function that returns the space usage of an
object.  It also has a time profiling tool, mlprof.  Here was the post.

> If you are willing to change your constraint from SML/NJ
> to SML, there is a function available in the SML compiler
> MLton (http://www.sourcelight.com/MLton) that will
> return the number of bytes used by an object.  See the
> MLton.size function at
> http://www.sourcelight.com/MLton/HTML/node25.html. 
> The function does a depth first search of the object to
> compute the size, and so takes time proportional to the
> size of the object.  Although it is slow, I've still found it
> useful sometimes.