views:

537

answers:

7

I'm trying to pick a perforamnce analyzer to use. I'm a beginner developer and not sure what to look for in a performance analyzer. What are the most important features?

+1  A: 

The two classical answers (assuming you are in *nix world) are valgrind and gprof. You want something that will let you (at least) check how much time you are spending inside each procedure or function.

bgoncalves
+3  A: 

If you use valgrind, I can highly recommend KCacheGrind to visualize performance bottlenecks.

Konrad Rudolph
The proportional call graph in KCacheGrind is great! See http://kcachegrind.sourceforge.net/html/pics/KcgShot2Large.png
divideandconquer.se
+1  A: 
  • Stability - be able to profile your process for long durations without crashing or running out of memory. its surprising how many commercial profilers fail that.
shoosh
+2  A: 

I would like to have following features/output information shown in a profiler. 1.) Should be able to show Total Clock cycles consumed and also for each function.

2.) If not one, should tell the total time consumed and time spent in each function.

3.) All it should be able to tell how many times a function is called.

4.) It would be nice to know memory reads, memory writes, cache misses, cache hits.

5.) Code memory for each function

6.) Data memory used: Global constants, Stack, Heap usage.

=AD

goldenmean
A: 

goldenmean has it right, I would add that line execution counts are sometimes handy as well.

EvilTeach
A: 

All you need is a debugger or IDE that has a "pause" button. It is not only the simplest and cheapest tool, but in my experience, the best. This is a complete explanation why. Note the 2nd-to-last comment.

Mike Dunlavey
A: 

My preference is for sampling profilers rather than instrumented profilers. The profiler should be able to map sample data back to the source code, ideally in a GUI. The two best examples of this that I am aware of are:

Paul R