]> Cypherpunks repositories - gostls13.git/commit
net/http/pprof: run GC for /debug/pprof/heap?gc=1
authorRuss Cox <rsc@golang.org>
Fri, 24 Oct 2014 14:58:13 +0000 (10:58 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 24 Oct 2014 14:58:13 +0000 (10:58 -0400)
commitc5943c668b919b98fd107c2327678ee32a868246
treedcf2bcebd728a8e16083f13828851d70985df109
parent5225854b74b11cb374b7398132ec9f1d7abf9820
net/http/pprof: run GC for /debug/pprof/heap?gc=1

We force runtime.GC before WriteHeapProfile with -test.heapprofile.
Make it possible to do the same with the HTTP interface.

Some servers only run a GC every few minutes.
On such servers, the heap profile will be a few minutes stale,
which may be too old to be useful.

Requested by private mail.

LGTM=dvyukov
R=dvyukov
CC=golang-codereviews
https://golang.org/cl/161990043
src/net/http/pprof/pprof.go