ANN: prof2dot, a graphical profiling tool

I am pleased to announce the first release of prof2dot, a graphical profiling tool for use with GHC. While GHC has in the past worked with graphical profiling tools, they have been heavyweight and/or proprietary. Prof2dot is a simple tool for converting profiling information into a graphical format, released under a BSD3 license. It is simple because it offloads all of the work of rendering the graph onto Graphviz. So you need to install the Graphviz tools in order to use it. The program is a filter that takes the profiling output generated by running a GHC-compiled program with the "+RTS -px -RTS" option and turns it into a dot file. (The "dot" format is a textual representation of a directed or undirected graph.) The dot file can rendered in any format supported by Graphviz's dot program, and the file itself can be post-processed or edited to adjust the layout. Features of prof2dot: * display either the call graph (default) or the call tree, * colorize by cost center count, time or allocations, * group cost centers in the same module. Prof2dot installs as a typical caballized application. Running "prof2dot -?" from the command line will give a short summary of how to use the program and its options. Rendering very large graphs can exceed the internal resource limits of dot. You may have to compile your own version of the Graphviz tools with higher limits to handle these cases. A example of a colorized profile of a medium sized project is shown on our company's web site: http://antiope.com/downloads.html. Click on the small image to download a pdf of the complete profile graph. Prof2dot is available from hackage or the link given above. -Greg

I was wondering if it handles per-thread information when you have more than
one thread involved. (Actually the question is not related to the graphical
tool, but the announcement triggered it).
Best.
Cristian
2008/3/8 Gregory Wright
I am pleased to announce the first release of prof2dot, a graphical profiling tool for use with GHC.
While GHC has in the past worked with graphical profiling tools, they have been heavyweight and/or proprietary. Prof2dot is a simple tool for converting profiling information into a graphical format, released under a BSD3 license. It is simple because it offloads all of the work of rendering the graph onto Graphviz. So you need to install the Graphviz tools in order to use it.
The program is a filter that takes the profiling output generated by running a GHC-compiled program with the "+RTS -px -RTS" option and turns it into a dot file. (The "dot" format is a textual representation of a directed or undirected graph.) The dot file can rendered in any format supported by Graphviz's dot program, and the file itself can be post-processed or edited to adjust the layout.
Features of prof2dot:
* display either the call graph (default) or the call tree,
* colorize by cost center count, time or allocations,
* group cost centers in the same module.
Prof2dot installs as a typical caballized application. Running "prof2dot -?" from the command line will give a short summary of how to use the program and its options.
Rendering very large graphs can exceed the internal resource limits of dot. You may have to compile your own version of the Graphviz tools with higher limits to handle these cases.
A example of a colorized profile of a medium sized project is shown on our company's web site: http://antiope.com/downloads.htmlhttp://antiope.com/downloads.html. Click on the small image to download a pdf of the complete profile graph.
Prof2dot is available from hackage or the link given above.
-Greg
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Hi Cristian, On Apr 1, 2008, at 11:03 AM, Cristian Perfumo wrote:
I was wondering if it handles per-thread information when you have more than one thread involved. (Actually the question is not related to the graphical tool, but the announcement triggered it).
The prof2dot tool only knows about the information that is in the profiling dump file. IIRC, cost centers are not associated with threads in this file. (The format isn't documented, but it is not hard to figure out, given a look at the code that generates it.) Is recording the thread in which a cost was incurred really helpful? If it is, I could look into adding it. But are you more interested in a graphical representation of thread execution --- which threads are executing and when? You should check if any of the old Glasgow Parallel Haskell tools are close to what you want. If so, it might be less work to resurrect one of those. Best Wishes, Greg
Best. Cristian
2008/3/8 Gregory Wright
: I am pleased to announce the first release of prof2dot, a graphical profiling tool for use with GHC.
participants (2)
-
Cristian Perfumo
-
Gregory Wright