Sign in to follow this  
all_names_taken

Profiling tools?

Recommended Posts

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?

Share this post


Link to post
Share on other sites
the_edd    2109
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.

Share this post


Link to post
Share on other sites
hydroo    295
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.

Share this post


Link to post
Share on other sites
Nemesis2k2    1045
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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this