How to reset profile counters / data during program execution

Jason Evans jasone at canonware.com
Fri Mar 28 11:10:52 PDT 2014


On Mar 28, 2014, at 4:28 AM, Evgeniy Ivanov <i at eivanov.com> wrote:
> I enable / disable profiling on the fly via prof_active. Each time I dump results (prof_accum is true). Is there any way to reset statistics / stack traces between?

It isn't possible to reset the heap profiling state within jemalloc, but there is an easy solution to what you're trying to do: dump a profile at the point where you would like to reset, and pass it to pprof using the --base option.  This will cause pprof to subtract out everything that shows up in the base profile.

Jason

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jemalloc.net/mailman/jemalloc-discuss/attachments/20140328/35d172e8/attachment.html>


More information about the jemalloc-discuss mailing list