Profiling tools?

Started by
6 comments, last by all_names_taken 15 years, 12 months ago
I'm new to using profilers to check which parts of my code is used more often and thus most important to focus optimizations on. Which (free) profiling tools would you recommend me to start with, and where can I download them?
Advertisement
AMD Code Analyst is a powerful and free tool for CPU profiling.
nVidia offers several tools for GPU related debugging and profiling here.
My Blog
What language(s) are you programming in? What platform(s) are you developing on and targeting?
If you happen to be on a Mac, Shark is pretty nifty and comes with the standard developer tools. There's also a small process profiler built in to Leopard's activity monitor.
As for the linux part:
--

I use gcc -pg for enabling profiling in the compiler/linker.
And after one run of your program, there should be a new weird file in the directory. And the you do $ gmon yourprogram > profile.textfile

(if I remember correctly)

You can use KCachegrind as a visual frontend.
I've used the DevPartner Profiler quite successfully for C++ code. It's great for really fine-grained performance analysis. If you want to be able to see execution times line by line, this is the kind of tool you're looking for.

One of the problems with profiling is that the very act of measuring and recording execution times increases execution times, and changes timing patterns. The DevPartner Profiler seems to be pretty good at balancing the footprint to prevent the profiler skewing the results, but there is a significant overhead added by the instrumentation, meaning your program will run much slower when you're profiling. For most purposes this isn't much of an issue, but I've found the results are mixed whenever you have multiple threads involved. Still, if you just need to do a thorough analysis of a single-threaded app, or an individual function or module, it should get the job done nicely.
We use Intel's VTune system. It is amazing, and has a free trial period... It works for Windows and Linux.
Quote:Original post by SiCrane
What language(s) are you programming in? What platform(s) are you developing on and targeting?

C++, Windows and GNU/Linux. AMD at the moment, but also targetting Intel.

Thanks for the many replies! CodeAnalyst worked very well on my AMD system!

This topic is closed to new replies.

Advertisement