[MLton] Question on profile.fun

Matthew Fluet fluet@cs.cornell.edu
Fri, 3 Jun 2005 08:11:03 -0400 (EDT)


> If you are using the move of a constant value into a gc variable, why do you
> still need to keep the profiling mark data? It seems to me this is an unfair
> comparison. Right now, those extra labels prevent some optimization, right?

Correct.  There is another experiment to be done where labels are not 
inserted into the Machine IL code.

> If you put in a 'mov' at the profiling entry point _instead_ of a label,
> that may incur entirely different penalties than a label and a mov...?

Different, but I doubt entirely different.  If you compare
  -profile alloc -profile-dummy false
with
  -profile alloc -profile-dummy true
you see the same overheads.  And alloc profiling doesn't need extra labels 
(though, it does add other code, which may interfere, but probably not 
much).