Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
howtos:profiling:gperftools [2015/06/19 12:23] – Minor formation update techeehowtos:profiling:gperftools [2015/06/19 12:50] – Add a note about OS X techee
Line 49: Line 49:
 google-pprof --web /usr/local/bin/geany /tmp/geany.prof.0 google-pprof --web /usr/local/bin/geany /tmp/geany.prof.0
 </code> Notice the extension 0 in the profiler file - you can record multiple profiles during a single run by sending the signal several times and the individual profiles are numbered by the extension starting from 0. </code> Notice the extension 0 in the profiler file - you can record multiple profiles during a single run by sending the signal several times and the individual profiles are numbered by the extension starting from 0.
 +
 +==== OS X ====
 +There's a bug in OS X which prevents getting good results from the profiler. There's a (scary) way to fix this by [[https://godoc.org/rsc.io/pprof_mac_fix| binary patching the OS X kernel]] (I've used it, it worked, but no guarantees at all).
  
 ==== Other options ==== ==== Other options ====
 There are many additional options in gperftools and while I found the above sufficient for profiling Geany, there may be cases where some extra parameter may be necessary (such as filtering the graph to some subset, more frequent sampling, etc.). See the CPU profiler [[http://gperftools.googlecode.com/git/doc/cpuprofile.html| documentation]] for more info. There are many additional options in gperftools and while I found the above sufficient for profiling Geany, there may be cases where some extra parameter may be necessary (such as filtering the graph to some subset, more frequent sampling, etc.). See the CPU profiler [[http://gperftools.googlecode.com/git/doc/cpuprofile.html| documentation]] for more info.
Print/export