[MLton] Profiling...
Ben Chambers
gtg983q@mail.gatech.edu
Mon Aug 7 21:49:35 PDT 2006
Quoting Matthew Fluet <fluet@cs.cornell.edu>:
>
> > 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.
>
>
Something doesn't seem to be working. If I run the mlton-compile.alloc that I
find in the /mlton directory, I get the following:
> ../mlton/mlton-compile.alloc -prof-pass ssaSimplify test.sml
unhandled exception: Fail: usage: exportMLton worldFile
If I don't give it the -prof-pass option it terminates too quickly to have done
anything. If I instead use the build/bin/mlton.alloc, nothing happens. It
turns out that build/bin/mlton.alloc is 0 bytes.
What am I doing wrong?
-- Ben Chambers
--
More information about the MLton
mailing list