From 0242d461c9293d50f429fc9bdc41a02510b86995 Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Tue, 28 Apr 2020 12:11:14 -0400 Subject: [PATCH] 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 --- src/net/http/pprof/pprof.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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. // -- 2.50.0