[MLton] Profiling...
Matthew Fluet
fluet@cs.cornell.edu
Mon Aug 7 20:02:40 PDT 2006
> I'm trying to get some profile results out of MLton because I need to track down
> what in my code is using up all the memory. I tried "make profiled" and using
> the mlton.alloc that it produces, but it terminates really quickly, and the
> profiling results don't seem to be complete. What is happening and how can I
> get the profiling results for the passes that I added to MLton?
>From the SVN log of the top-level Makefile:
Added expert option -prof-pass to control profiling individual passes.
If a pass is in the -prof-pass list, it gets its own
MLton.Profile.Data.t that is written out to an appropriately named
file at the end of the pass.
Added Makefile target profiled, which will generate mlton.time,
mlton.alloc, and mlton.count -- profile enabled instances of the
compiler, useful for -prof-pass.
So, you'll want to run the mlton.alloc with -prof-pass yourPassName; the
argument to -prof-pass is a regexp. I don't think that we've used the
"make profiled" target that extensively, but this is exactly the sort of
situation where I was hoping it would be useful.
More information about the MLton
mailing list