]> Cypherpunks repositories - gostls13.git/commit
runtime/pprof: read memstats earlier in profile handler
authorRuss Cox <rsc@golang.org>
Wed, 29 Nov 2017 20:38:52 +0000 (15:38 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 1 Dec 2017 00:23:05 +0000 (00:23 +0000)
commit301b127a058c9bf3859e2a8c49e1ffc3c3398077
treeb40a2c2efee13bb393acc07aef159356a1779be5
parent9cc9f1085561400425cc9705d041d37398666156
runtime/pprof: read memstats earlier in profile handler

Reading the mem stats before our own allocations
avoids cluttering memory stats with our recent garbage.

Fixes #20565.

Change-Id: I3b0046c8300dca83cea24013ffebc32b2ae7f742
Reviewed-on: https://go-review.googlesource.com/80739
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/runtime/pprof/pprof.go