aboutsummaryrefslogtreecommitdiff
path: root/src/net/http/pprof
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2014-10-27 17:17:06 -0400
committerAustin Clements <austin@google.com>2014-10-27 17:17:06 -0400
commit5a653089ef756ecda170e4ee030480d547496362 (patch)
treefe2c3550eb05fe487b5870dfef3d06972582c1a9 /src/net/http/pprof
parent32c75a2d3d121f31ace325d48d9fcbdde58cc042 (diff)
parent3e62d2184ab2d2ac6053e3f4af5e3f99902c1e32 (diff)
downloadgo-5a653089ef756ecda170e4ee030480d547496362.tar.xz
[dev.power64] all: merge default into dev.power64
LGTM=rsc R=rsc CC=golang-codereviews https://golang.org/cl/164110043
Diffstat (limited to 'src/net/http/pprof')
-rw-r--r--src/net/http/pprof/pprof.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/net/http/pprof/pprof.go b/src/net/http/pprof/pprof.go
index 0c7548e3ef..a23f1bc4bc 100644
--- a/src/net/http/pprof/pprof.go
+++ b/src/net/http/pprof/pprof.go
@@ -162,6 +162,10 @@ func (name handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Unknown profile: %s\n", name)
return
}
+ gc, _ := strconv.Atoi(r.FormValue("gc"))
+ if name == "heap" && gc > 0 {
+ runtime.GC()
+ }
p.WriteTo(w, debug)
return
}