[MLton-devel] New release of MLton: call-graphs

Stephen Weeks MLton@mlton.org
Wed, 2 Apr 2003 10:16:39 -0800


> Hmm. Having thought about this for a while, I think I was too hasty in
> declaring solid edges to be more important than dotted edges. If
> condition (3) above is eliminated, then I think the resulting graph
> would be quite intuitive. Obviously there may be both a dotted and
> solid edge between two nodes, but (as you say) this might even improve
> readability.

Good.  I'm glad we agree.

> Again, agreed. But in my proposed scheme, the user would simply
> arrange for General.o to not satisfy the graph predicate, because all
> nodes not in S would be automatically split to produce a "better"
> indirect-call graph. I imagine -profile-split would then be used
> rarely, to split multiple instances of functions that satisfy the
> graph predicate.

Aha.  Now I understand.  This sounds great.

So, the plan is to split everything in mlton and keep the precise call
graph.  While the program runs, keep counts for both the split and
unsplit versions of each function.  Then, in mlprof, run -graph on the
split call graph to compute the set of nodes and solid and dotted
edges.  Then, merge together nodes for each function that isn't
-profile-split, using the count for the unsplit version of the
function.

The only problem I see with this is that with -graph computed on the
split call graph, some versions of a function may be ignored while
others are kept.  If the function isn't split, then we need to combine
all of the kept ones together, and the same -profile-stack combining
problem arises.  Since it's not possible to keep counts while
profiling for every possible set of split nodes that might be merged
together, I see two possible things that mlprof could do when it is
unable to determine the stack % of a function.

1. Display a ?.
2. Display the stack % for the merge of all of the versions of the function.

I think (2) could be misleading, and lean towards (1).  I don't think
it will happen that often, since most of the time either all of the
splits of a function will be ignored or none of them will.



-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel