[MLton] Profiling...

Stephen Weeks sweeks@sweeks.com
Tue Aug 8 00:19:19 PDT 2006


> 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

By way of explanation, the "mlton-compile" executable runs in two
phases.  In the first phase, done at build time, it runs very quickly
and produces a saved world, world.mlton.  The bin/mlton script, which
is what people usually run, is the second phase, and starts with that
saved world.  See the use of @MLton load-world in that script.

So, when you try to directly run mlton-compile.alloc, you are doing
the first phase, which gives the error message above because the usual
MLton command-line arguments are intended for the second phase.

> If I don't give it the -prof-pass option it terminates too quickly
> to have done anything.

Right, here what is happening is it is actually running and creating
the world file (with the name of whatever file you supplied on the
command line).




More information about the MLton mailing list