[Haskell-cafe] Execution call graph pruning

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Tue Jun 8 19:10:32 EDT 2010

C K Kashyap <ckkashyap at gmail.com> writes:

> Hi,
> I have a call grah which contains information of the edges in the following
> format
> caller  callee  count   (time spent by the
> caller)
> ===================================
> foo      bar      10        100
> xxx      yyy      20        10
> zzz      yyy      10        10
> (I used pintool pintool.org to generate this call graph)
> Now, the problem is that the graph is huge and it take a long to render
> using 'dot' or use any visualizing tool.
> Even if they render, it's too cluttered to be useful.
> I wanted to prune the graph in such a way that I'd have only the edges
> corresponding to the top 10% of the
> time consumers. What would be a good way to do such a thing? Has anyone
> written some utility that I could use?

Well, graphviz [1] lets you parse Dot code, so you could then do a
filter on it (I'm currently working on ways of letting you interact with
the Dot code better).

[1]: http://hackage.haskell.org/package/graphviz

Also, to let you skip a step prof2dot [2] will create the Dot code for you.

[2]: http://hackage.haskell.org/package/prof2dot

Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com

More information about the Haskell-Cafe mailing list