views:

943

answers:

7

I need to display profiling information pulled from a deeply embedded CPU, presenting it in a way which other developers on my team will be able to act upon. The profiling data is a snapshot of a cycle counter at the entry and exit of every function, so we have a call graph annotated with sub-microsecond timing accuracy. I'd prefer not to just dump out function names and timing like gprof, I'm looking for something easier to understand and act upon.

Has anyone worked with a particularly good profiling tool (on any platform), which made it easy to identify areas of the code to drill into? I'm looking for an inspirational example to follow for how to display the call graph, but if there is good tool with an input format I can massage my data to I'll use it. I could use Windows, Linux, or MacOS X to run the visualization tool.

A profiling article on IBM DeveloperWorks led me to GraphViz, with a profiling example on their site. Barring another suggestion here, I'll use GraphViz and mimic their profiling example.

+1  A: 

I suggest you drop gprof+graphviz for OProfileUI, unless you don't have a choice.

elmarco
A: 

IE 8b2 offers a simple display of the call tree for javascript that I believe is much more useful than the GraphViz chart.

The GraphViz chart is wonderful for visualizing the call tree but makes it very difficult to visualize timing issues (IMHO the more important data).

*Edit: I thought it is worth pointing out that all of the tools suggested use a grid based tree to visualize the call tree. This allows you to see the calling structure without downplaying the timing data as I believe you do with the GraphViz chart.

Prestaul
+1  A: 

JetBrains dotTrace (has a trial demo you can play with). It organizes the call stacks and can easily find the trouble spots. Has a lot of filtering capabilities as well. Very easy to navigate and find what you're looking for.

Garo Yeriazarian
+1  A: 

How about "GTKWave"? But you have to insert the probe in your code.

XC
+2  A: 

Another neat tool to visualize profiling data is the gprof2dot.py python script. It can be used to visualize several different formats: "This is a Python script to convert the output from prof, gprof, oprofile, Shark, AQtime, and python profilers into a dot graph." This is what the output look like:

none
+2  A: 

Valgrind does profiling (and more), and there are GUIs for visualization.

Kcachegrind is one of the most popular.
Matt J
+1  A: 

I use Kprof http://kprof.sourceforge.net/

it is old, but I never found a better tool to inspect the results from gprof.

rodrigob