From: Hana (Hyang-Ah) Kim Date: Tue, 28 Apr 2020 16:11:14 +0000 (-0400) Subject: net/http/pprof: document the trace endpoint is for execution trace X-Git-Tag: go1.15beta1~166 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=0242d461c9293d50f429fc9bdc41a02510b86995;p=gostls13.git net/http/pprof: document the trace endpoint is for execution trace Update google/pprof#529 Change-Id: Iec3b343a487b399ada3a6f73c120b5f7ed8938be Reviewed-on: https://go-review.googlesource.com/c/go/+/230538 Reviewed-by: Emmanuel Odeke --- diff --git a/src/net/http/pprof/pprof.go b/src/net/http/pprof/pprof.go index 4fd19eb539..81df0448e9 100644 --- a/src/net/http/pprof/pprof.go +++ b/src/net/http/pprof/pprof.go @@ -36,15 +36,17 @@ // // go tool pprof http://localhost:6060/debug/pprof/block // -// Or to collect a 5-second execution trace: -// -// 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 // +// The package also exports a handler that serves execution trace data +// for the "go tool trace" command. To collect a 5-second execution trace: +// +// wget -O trace.out http://localhost:6060/debug/pprof/trace?seconds=5 +// go tool trace trace.out +// // To view all available profiles, open http://localhost:6060/debug/pprof/ // in your browser. //