]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.17] runtime: store consistent total allocation stats as uint64
authorMichael Anthony Knyszek <mknyszek@google.com>
Thu, 9 Jun 2022 18:25:01 +0000 (18:25 +0000)
committerHeschi Kreinick <heschi@google.com>
Wed, 6 Jul 2022 18:37:56 +0000 (18:37 +0000)
commitb1be664d64750bccd5081d51b585036c931b5cf0
tree7b498af84a47647c6c750b13cad1c17b3ead0521
parent77cc1c0defaf4cd6c38221504b29ad125aae9ac7
[release-branch.go1.17] runtime: store consistent total allocation stats as uint64

Currently the consistent total allocation stats are managed as uintptrs,
which means they can easily overflow on 32-bit systems. Fix this by
storing these stats as uint64s. This will cause some minor performance
degradation on 32-bit systems, but there really isn't a way around this,
and it affects the correctness of the metrics we export.

For #52680.
Fixes #52688.

Change-Id: I8b1926116e899ae9f03d58e0320bcb9264945b3e
Reviewed-on: https://go-review.googlesource.com/c/go/+/411496
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
src/runtime/mcache.go
src/runtime/metrics.go
src/runtime/mgcsweep.go
src/runtime/mstats.go