[MLton] commit r4241: First cut at fixing -codegen c -profile time

Stephen Weeks MLton@mlton.org
Sun, 20 Nov 2005 20:52:59 -0800


> A different approach to time profiling: maintain the current source
> position via program operations.  This has the advantage that it
> significantly more portable than trying to inject just the right
> information into C code in a manner that isn't corrupted by gcc
> optimizations.

Excellent.  Another benefit that Matthew mentioned earlier, and I
think bears repeating, is that with the old way, even in cases where
gcc didn't duplicate labels, we were never really sure that the labels
covered the code correctly.  The perturbation from that was possibly
much worse than that introduced by the program operations of our new
approach.