Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Performance Tools (profiler) tutorial

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.

like image 664
stanigator Avatar asked Jul 07 '09 18:07

stanigator


2 Answers

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.

like image 79
Tim Sylvester Avatar answered Nov 07 '22 04:11

Tim Sylvester


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.

like image 33
Mike Dunlavey Avatar answered Nov 07 '22 03:11

Mike Dunlavey