is00hcw / gperftools

Automatically exported from code.google.com/p/gperftools
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

profiler pause/resume support #594

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I've been using a hacked-up version of gperftools where I added ProfilerPause() 
and ProfilerResume(): https://gist.github.com/tmm1/8031600

My goal was to profile one specific section of code over a number of 
iterations, and produce one profile at the end. With the existing API, each 
invocation of Start/Stop would overwrite the previous profile. With 
Pause/Resume, most of my program can run unimpaired since the profiler is only 
resumed in the codepath I'm profiling. The API can also be used to exclude 
known hotspots (i.e. garbage collection) by pausing the profiler around them.

The implementation is half baked, but it does work. If this sounds like a good 
idea I can clean up the patch for inclusion.

Original issue reported on code.google.com by themaste...@gmail.com on 18 Dec 2013 at 11:36

GoogleCodeExporter commented 9 years ago
It definitely sounds like a good idea.

Original comment by alkondratenko on 19 Dec 2013 at 12:35