]> Cypherpunks repositories - gostls13.git/commitdiff
net/http/pprof: mention mutex profile in doc
authorHana (Hyang-Ah) Kim <hyangah@gmail.com>
Fri, 28 Apr 2017 13:11:50 +0000 (09:11 -0400)
committerHyang-Ah Hana Kim <hyangah@gmail.com>
Mon, 26 Jun 2017 21:50:12 +0000 (21:50 +0000)
mutex profile requires explicit calls to
runtime.SetMutexProfileFraction to enable/disable
profiling (like block profile). It is worth
mentioning in the doc.

Change-Id: I2b8d654be9f5c6bc49fc802b7708c4c552fea9b2
Reviewed-on: https://go-review.googlesource.com/42070
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/http/pprof/pprof.go

index da153447df7788c6319b2be985216d3e44e753de..12c7599ab0fac8b598e2b6823ee331f1e0082fcc 100644 (file)
 //
 //     wget http://localhost:6060/debug/pprof/trace?seconds=5
 //
+// Or to look at the holders of contended mutexes, after calling
+// runtime.SetMutexProfileFraction in your program:
+//
+//     go tool pprof http://localhost:6060/debug/pprof/mutex
+//
 // To view all available profiles, open http://localhost:6060/debug/pprof/
 // in your browser.
 //