views:

750

answers:

2

I just downloaded and built the libraries/executables of Google Performance Tools. Before I run the CPU profiler on the application that I want to investigate, I want to learn how to use the tools properly perhaps on a sample application. What would be a good example to run the Google CPU profiler on? Thanks in advance.

+2  A: 

The following paragraph appears in the README.windows file distributed with perftools 1.3:

The heap-profiler has had a preliminary port to Windows. It has not been well tested, and probably does not work at all when Frame Pointer Optimization (FPO) is enabled -- that is, in release mode. The other features of perftools, such as the cpu-profiler and leak-checker, have not yet been ported to Windows at all.

Tim Sylvester
Thanks. I guess I would have to use this for Linux applications or wait for it to have more Windows functionalities then.
stanigator
A: 

In my experience, for performance tuning, stack-sampling is the method of choice.

Google perftools contains a stack-sampler, and I believe its visual analyzer can be made to show the cost of individual statements, not just functions.

What you need to know is the percent of time the stack contains that statement, because that is how much time would be saved if the statement were removed.

Mike Dunlavey