From 39ce6eb9ec53e53e361824feb96cbbc6d236df5a Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Thu, 25 Aug 2016 11:52:24 -0400 Subject: [PATCH] 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 --- src/runtime/pprof/pprof.go | 2 ++ 1 file changed, 2 insertions(+) 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) -- 2.48.1