From 251f3e5b9cf204b80f78eb383f84e3672603d57d Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Mon, 9 Mar 2020 16:32:49 -0400 Subject: [PATCH] runtime/pprof: document that debug=0 emits proto Updates #16093. Change-Id: I629b3d44d6b2083f5e62701cc0c23fe2362502d4 Reviewed-on: https://go-review.googlesource.com/c/go/+/222676 Reviewed-by: Michael Matloob --- src/runtime/pprof/pprof.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/runtime/pprof/pprof.go b/src/runtime/pprof/pprof.go index a7916bf6fb..bbdc432eec 100644 --- a/src/runtime/pprof/pprof.go +++ b/src/runtime/pprof/pprof.go @@ -313,9 +313,11 @@ func (p *Profile) Remove(value interface{}) { // Otherwise, WriteTo returns nil. // // The debug parameter enables additional output. -// Passing debug=0 prints only the hexadecimal addresses that pprof needs. -// Passing debug=1 adds comments translating addresses to function names -// and line numbers, so that a programmer can read the profile without tools. +// Passing debug=0 writes the gzip-compressed protocol buffer described +// in https://github.com/google/pprof/tree/master/proto#overview. +// Passing debug=1 writes the legacy text format with comments +// translating addresses to function names and line numbers, so that a +// programmer can read the profile without tools. // // The predefined profiles may assign meaning to other debug values; // for example, when printing the "goroutine" profile, debug=2 means to -- 2.50.0