]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: report GCSys and OtherSys in heap profile
authorAustin Clements <austin@google.com>
Thu, 25 Aug 2016 15:52:24 +0000 (11:52 -0400)
committerAustin Clements <austin@google.com>
Tue, 20 Sep 2016 18:37:29 +0000 (18:37 +0000)
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>
src/runtime/pprof/pprof.go

index 25f7ed6eb17e2c8bd92b005fa027fd459e354cc3..1fc9568b2f8b0a0f9aee0a123dda885121fce6ce 100644 (file)
@@ -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)