profiling

Stephen Weeks MLton@sourcelight.com
Tue, 10 Apr 2001 11:43:24 -0700 (PDT)


Looks good.  I integrated the stuff into src/runtime and made a few changes to
src/mlton/main/main.sml to get all the flags.  Here's what a -p call looks like
now. 

% $HOME/mlton/bin/mlton -v -p profiling.sml
MLton starting
   Compile SML starting
      pre codegen starting
	 gcc -DNODEBUG -DMLton_safe=TRUE -DMLton_detectOverflow=TRUE \
	     -I/home/sweeks/mlton/include -o /tmp/fileK4KSLp \
	     /tmp/fileSLiXTh.c -L/home/sweeks/mlton/lib -lmlton -lm -lgmp
	 /tmp/fileK4KSLp /tmp/filelmbXTG
      pre codegen finished in 4.31 + 0.00 (0% GC)
      x86 code gen starting
      x86 code gen finished in 0.44 + 0.00 (0% GC)
   Compile SML finished in 4.75 + 0.00 (0% GC)
   Compile C starting
      gcc -S -DNODEBUG -DMLton_safe=TRUE -DMLton_detectOverflow=TRUE \
          -I/home/sweeks/mlton/include -o /tmp/filekTJEWa.s /tmp/fileYa3QRY.c
   Compile C finished in 0.19 + 0.00 (0% GC)
   Assemble starting
      gcc -c -o /tmp/fileVgsMod.o /tmp/filekTJEWa.s
      gcc -c -o /tmp/fileq5xcyg.o /tmp/fileXu770m.0.S
   Assemble finished in 0.05 + 0.00 (0% GC)
   Link starting
      gcc -o profiling /tmp/fileVgsMod.o /tmp/fileq5xcyg.o \
          /home/sweeks/mlton/lib/prof.o -L/home/sweeks/mlton/lib -lmlton -lm \
          -lgmp
   Link finished in 0.11 + 0.00 (0% GC)
MLton finished in 5.10 + 0.00 (0% GC)

> Note, at the moment there still doesn't seem to be any way to, for  instance,
> keep the .c file that gets generated.  I often want to keep this, but NOT the
> .s or .o that gets generated from that.

Doesn't -keep g do what you want?  It saves the .c and .S files, but not any .s
or .o.

I put up a snapshot at http://www.star-lab.com/sweeks/src.tgz.  I don't think
this snapshot is very stable, and in particular I don't think G1 works, due to
some bugs introduced with the recent Time changes.  Hopefully I'll be able to
sort through all that stuff in a couple of weeks.