profiling

Stephen Weeks MLton@sourcelight.com
Tue, 22 Jan 2002 15:28:03 -0800


> I implemented a version based on Steve's code.  I'm not entirely happy
> with it; in particular, it would probably be desirable that when not
> compiling with -p, there are no vestiges of profiling in the code.  But,
> the various isFreed ref cells can't be compiled away.

I checked in a bunch of changes to profiling that incorporates this
code and fixes the above problem.  I made some changes to the SML side
of the code (e.g. checking for accidental freeing of the current
profile array), and moved even more code from the C side to the SML
side (e.g. the itimer stuff).

It passed a simple test but is mostly untested.  Please check it out
(and feel free to fix bugs :-).