<p>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.</p>

<p>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.</p>

<p>A profiling article on <A HREF="http://www.ibm.com/developerworks/library/l-graphvis/" rel="noreferrer">IBM DeveloperWorks</A> led me to <A HREF="http://www.graphviz.org/" rel="noreferrer">GraphViz</A>, with a <A HREF="http://www.graphviz.org/Gallery/directed/profile.html" rel="noreferrer">profiling</A> example on their site. Barring another suggestion here, I'll use GraphViz and mimic their profiling example.</p>

[{'answer_id': 55105, 'author': 'elmarco', 'author_id': 1277510, 'author_profile': 'https://Stackoverflow.com/users/1277510', 'pm_score': 2, 'selected': False, 'text': '<p>I suggest you drop gprof+graphviz for <a href="http://labs.o-hand.com/oprofileui/" rel="nofollow noreferrer">OProfileUI</a>, unless you don\'t have a choice.</p>\n'}, {'answer_id': 55106, 'author': 'Prestaul', 'author_id': 5628, 'author_profile': 'https://Stackoverflow.com/users/5628', 'pm_score': 2, 'selected': False, 'text': '<p>IE 8b2 offers a <a href="http://blogs.msdn.com/ronang/archive/2008/08/28/javascript-profiling-in-ie-8-beta-2.aspx" rel="nofollow noreferrer">simple display</a> of the call tree for javascript that I believe is much more useful than the GraphViz chart.</p>\n\n<p>The GraphViz chart is wonderful for visualizing the call tree but makes it very difficult to visualize timing issues (IMHO the more important data).</p>\n\n<p>**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.*</p>\n'}, {'answer_id': 55817, 'author': 'Garo Yeriazarian', 'author_id': 2655, 'author_profile': 'https://Stackoverflow.com/users/2655', 'pm_score': 2, 'selected': False, 'text': '<p><a href="http://www.jetbrains.com/profiler/index.html" rel="nofollow noreferrer">JetBrains dotTrace</a> (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.</p>\n'}, {'answer_id': 318389, 'author': 'hxc', 'author_id': 206630, 'author_profile': 'https://Stackoverflow.com/users/206630', 'pm_score': 2, 'selected': False, 'text': '<p>How about "GTKWave"?\nBut you have to insert the probe in your code.</p>\n'}, {'answer_id': 643064, 'author': 'none', 'author_id': 78244, 'author_profile': 'https://Stackoverflow.com/users/78244', 'pm_score': 4, 'selected': False, 'text': '<p>Another neat tool to visualize profiling data is the <a href="http://code.google.com/p/jrfonseca/wiki/Gprof2Dot" rel="nofollow noreferrer">gprof2dot.py python script</a>.\nIt 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:</p>\n\n<p><a href="https://i.stack.imgur.com/KGYNv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KGYNv.png" alt=""></a><br>\n<sub>(source: <a href="http://jrfonseca.googlecode.com/svn/wiki/gprof2dot_small.png" rel="nofollow noreferrer">googlecode.com</a>)</sub>  </p>\n'}, {'answer_id': 645895, 'author': 'Frank', 'author_id': 60628, 'author_profile': 'https://Stackoverflow.com/users/60628', 'pm_score': 2, 'selected': False, 'text': '<p><a href="http://valgrind.org/" rel="nofollow noreferrer">Valgrind</a> does profiling (and more), and there are <a href="http://valgrind.org/downloads/guis.html" rel="nofollow noreferrer">GUIs</a> for visualization.</p>\n'}, {'answer_id': 1567693, 'author': 'rodrigob', 'author_id': 190022, 'author_profile': 'https://Stackoverflow.com/users/190022', 'pm_score': 2, 'selected': False, 'text': '<p>I use Kprof\n<a href="http://kprof.sourceforge.net/" rel="nofollow noreferrer">http://kprof.sourceforge.net/</a></p>\n\n<p>it is old, but I never found a better tool to inspect the results from gprof.</p>\n'}, {'answer_id': 15531044, 'author': 'Amani AlAli', 'author_id': 2192084, 'author_profile': 'https://Stackoverflow.com/users/2192084', 'pm_score': 2, 'selected': False, 'text': '<p>You can use <a href="http://scg.unibe.ch/research/senseo" rel="nofollow">Senseo</a>, a plugin for Eclipse. It shows you the performance, memory allocation, objects created, time spent, actual methods invoked, hover over method signatures or calls, call context tree, package explorer and more.</p>\n'}, {'answer_id': 30283887, 'author': 'Ami Tavory', 'author_id': 3510736, 'author_profile': 'https://Stackoverflow.com/users/3510736', 'pm_score': 0, 'selected': False, 'text': '<p>I\'ve written a browser-based visualization tool, <a href="https://pypi.python.org/pypi/ProfileEye/" rel="nofollow">profile_eye</a>, which operates on the output of <a href="https://github.com/jrfonseca/gprof2dot" rel="nofollow">gprof2dot</a>.</p>\n\n<p>gprof2dot is great at grokking many profiling-tool outputs, and does a great job at graph-element placement. The final rendering is a static graphic, which is often very cluttered. </p>\n\n<p>Using <a href="http://d3js.org/" rel="nofollow">d3.js</a> it\'s possible to remove much of that clutter, through relative fading of unfocused elements, tooltips, and a <a href="http://bost.ocks.org/mike/fisheye/" rel="nofollow">fisheye distortion</a>. </p>\n\n<p>For comparison, see <a href="http://pythonhosted.org//ProfileEye/gprof.html" rel="nofollow">profile_eye\'s visualization</a> of the <a href="https://github.com/jrfonseca/gprof2dot" rel="nofollow">canonical example used by gprof2dot</a>. </p>\n'}]
['https://Stackoverflow.com/questions/54971', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4761/']