From: Austin Clements Date: Thu, 25 Aug 2016 15:52:24 +0000 (-0400) Subject: runtime: report GCSys and OtherSys in heap profile X-Git-Tag: go1.8beta1~1221 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=39ce6eb9ec53e53e361824feb96cbbc6d236df5a;p=gostls13.git runtime: report GCSys and OtherSys in heap profile The comment block at the end of the heap profile includes *almost* everything from MemStats. Add the missing fields. These are useful for debugging RSS that has gone to GC-internal data structures. Change-Id: I0ee8a918d49629e28fd8fd2bf6861c4529461c24 Reviewed-on: https://go-review.googlesource.com/29276 Run-TryBot: Austin Clements TryBot-Result: Gobot Gobot Reviewed-by: Rick Hudson --- diff --git a/src/runtime/pprof/pprof.go b/src/runtime/pprof/pprof.go index 25f7ed6eb1..1fc9568b2f 100644 --- a/src/runtime/pprof/pprof.go +++ b/src/runtime/pprof/pprof.go @@ -540,6 +540,8 @@ func writeHeap(w io.Writer, debug int) error { fmt.Fprintf(w, "# MSpan = %d / %d\n", s.MSpanInuse, s.MSpanSys) fmt.Fprintf(w, "# MCache = %d / %d\n", s.MCacheInuse, s.MCacheSys) fmt.Fprintf(w, "# BuckHashSys = %d\n", s.BuckHashSys) + fmt.Fprintf(w, "# GCSys = %d\n", s.GCSys) + fmt.Fprintf(w, "# OtherSys = %d\n", s.OtherSys) fmt.Fprintf(w, "# NextGC = %d\n", s.NextGC) fmt.Fprintf(w, "# PauseNs = %d\n", s.PauseNs)