]> Cypherpunks repositories - gostls13.git/commit
runtime: remove memstats.heap_idle
authorMichael Anthony Knyszek <mknyszek@google.com>
Mon, 3 Aug 2020 19:27:59 +0000 (19:27 +0000)
committerMichael Knyszek <mknyszek@google.com>
Mon, 26 Oct 2020 18:10:12 +0000 (18:10 +0000)
commitc5dea8f38726572ddc161e5d169a453639edb7b1
tree68fc5289cf9e1288306d37691ccacb2cac60ef15
parentad863ba32a2ede207d708fa15897e9de1d14dd87
runtime: remove memstats.heap_idle

This statistic is updated in many places but for MemStats may be
computed from existing statistics. Specifically by definition
heap_idle = heap_sys - heap_inuse since heap_sys is all memory allocated
from the OS for use in the heap minus memory used for non-heap purposes.
heap_idle is almost the same (since it explicitly includes memory that
*could* be used for non-heap purposes) but also doesn't include memory
that's actually used to hold heap objects.

Although it has some utility as a sanity check, it complicates
accounting and we want fewer, orthogonal statistics for upcoming metrics
changes, so just drop it.

Change-Id: I40af54a38e335f43249f6e218f35088bfd4380d1
Reviewed-on: https://go-review.googlesource.com/c/go/+/246974
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
src/runtime/heapdump.go
src/runtime/mheap.go
src/runtime/mstats.go