aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/pprof
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2016-08-25 11:52:24 -0400
committerAustin Clements <austin@google.com>2016-09-20 18:37:29 +0000
commit39ce6eb9ec53e53e361824feb96cbbc6d236df5a (patch)
treef8e1416b50d7ce5484f382b0ed40ff480296a192 /src/runtime/pprof
parent38cd79889ece342643b56ad6d496ef8931ca9272 (diff)
downloadgo-39ce6eb9ec53e53e361824feb96cbbc6d236df5a.tar.xz
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 <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rick Hudson <rlh@golang.org>
Diffstat (limited to 'src/runtime/pprof')
-rw-r--r--src/runtime/pprof/pprof.go2
1 files changed, 2 insertions, 0 deletions
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)