[MLton] Question on profile.fun

Matthew Fluet fluet@cs.cornell.edu
Fri, 27 May 2005 21:17:06 -0400 (EDT)


> I'm still wondering why you need -profile-exclude and -profile-lib.
> Why not go for two flags with opposite meanings, like
> 
> 	-profile-include <regexp>
> 	-profile-exclude <regexp>
> 
> and refer to the special shortened names in the regexp.  So, for
> example, the default would be "-profile-exclude '<basis>'".

I suppose.  We need to keep a unified list of profile include/exclude 
regexps to handle conflicting flags (or, a flag that overrides the 
default).  The one thing about the lib/user distinction is that that is 
made on the absolute file _before_ shortening the name.  While unlikely, 
"<basis>" is a string that could appear in the file-name of user code.

> I was thinking of something with a little more fine grained control,
> so that one could specify for different (batches of) files whether or
> not C calls should be split out.
> 
>   -profile-c <regexp>	separately profile calls to C functions in files
> 			matching <regexp>.

That is reasonable as well.  I'll give it some thought.