aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/pprof/pprof.go
diff options
context:
space:
mode:
authorJeremy Faller <jeremy@golang.org>2019-06-25 15:43:33 -0400
committerJeremy Faller <jeremy@golang.org>2020-03-17 15:29:08 +0000
commitfb1cd942225f66a6a8506d28bf317063efe50979 (patch)
tree2e34d9c6c756bb261dcb2e14a21a82add2ea9540 /src/runtime/pprof/pprof.go
parent2e918c3aab6cc944380da672b93fb92c67b35de1 (diff)
downloadgo-fb1cd942225f66a6a8506d28bf317063efe50979.tar.xz
runtime/pprof: export max rss when saving memory profiles.
NB: Adds syscall to deps on runtime/pprof. Change-Id: I5dd14c2b25eb9c3c446832f5818de45fafd48a27 Reviewed-on: https://go-review.googlesource.com/c/go/+/183844 Run-TryBot: Jeremy Faller <jeremy@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com>
Diffstat (limited to 'src/runtime/pprof/pprof.go')
-rw-r--r--src/runtime/pprof/pprof.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/runtime/pprof/pprof.go b/src/runtime/pprof/pprof.go
index bbdc432eec..b4f9ab8f7a 100644
--- a/src/runtime/pprof/pprof.go
+++ b/src/runtime/pprof/pprof.go
@@ -630,6 +630,9 @@ func writeHeapInternal(w io.Writer, debug int, defaultSampleType string) error {
fmt.Fprintf(w, "# GCCPUFraction = %v\n", s.GCCPUFraction)
fmt.Fprintf(w, "# DebugGC = %v\n", s.DebugGC)
+ // Also flush out MaxRSS on supported platforms.
+ addMaxRSS(w)
+
tw.Flush()
return b.Flush()
}