[MLton] cvs commit: -profile count
Matthew Fluet
fluet@cs.cornell.edu
Tue, 18 May 2004 17:10:12 -0400 (EDT)
> > Does -profile-branch apply to all the profile kinds?
>
> No, but I guess it could, although I would want the default for
> -profile time and -profile alloc to be -profile-branch false, since
> that's the current behavior.
>
> The relevant code is in elaborate-core.fun if you want to play around
> with it.
I played around with allowing -profile-branch to apply to all the profile
kinds, and it seems perfectly reasonable. The only remaining issue is how
to export the functionality at the command line. It makes sense to have
-profile-branch false for -profile {alloc,time}. A simple, albeit
unprincipled solution, would be to default -profile-branch to false, but
have -profile count also set Control.profileBranch to true. This means
that to turn off profileBranch, one needs to pass -profile-branch false on
the command line _after_ -profile count. Maybe that isn't that bad, as it
is an expert option. I could also put a test for profileSet in the
argument handling case of -profile-branch, so you'd get an error if you
gave -profile-branch before -profile.