1
0
mirror of https://github.com/golang/go synced 2024-11-24 06:00:11 -07:00
The Go programming language
Go to file
Michael Anthony Knyszek 4a56ba1c45 runtime: remove intermediate fields in memstats for ReadMemStats
Currently, the ReadMemStats (really this is all happening in
readmemstats_m, but that's just a direct call from ReadMemStats) call
chain first populates some fields in memstats, then copies those into
the final MemStats location. This used to make a lot of sense when
memstats' structure aligned with MemStats, and the values were just
copied from one to other. Sometime in the last few releases, we switched
to populating the MemStats manually because a lot of fields had diverged
from their internal representation. Now, we're left with a lot of fields
in memstats that pollute the structure: they only exist to be updated
for the sake of ReadMemStats. Since we're going to be adding more fields
to memstats in further CLs, this is a good opportunity to clean up.

As a result of this change, updatememstats, which used to just update
the aforementioned intermediate fields in memstats, is no longer
necessary, so it is removed.

Change-Id: Ifabfb3ac3002641105af62e9509a6351165dcd87
Reviewed-on: https://go-review.googlesource.com/c/go/+/393397
Trust: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
2022-03-31 20:02:31 +00:00
.github .github: remove duplicate security link 2022-01-07 17:55:09 +00:00
api debug/pe: add APIs for reading section def aux info 2022-03-31 14:57:35 +00:00
doc spec: clarify type term restriction for type parameters 2022-03-31 01:01:43 +00:00
lib/time
misc cmd/compile: set conversions to unsafe.Pointer as an escaping operation when -asan is enabled 2022-03-17 08:43:51 +00:00
src runtime: remove intermediate fields in memstats for ReadMemStats 2022-03-31 20:02:31 +00:00
test test: update comments in run.go (cleanup) 2022-03-31 18:30:44 +00:00
.gitattributes
.gitignore
AUTHORS A+C: change email of Ben Shi (individual CLA) 2022-03-22 16:02:31 +00:00
codereview.cfg
CONTRIBUTING.md
CONTRIBUTORS A+C: change email of Ben Shi (individual CLA) 2022-03-22 16:02:31 +00:00
LICENSE
PATENTS
README.md README.md: update links to go.dev 2022-03-20 16:05:03 +00:00
SECURITY.md

The Go Programming Language

Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.

Gopher image Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.

Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.

Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.

Download and Install

Binary Distributions

Official binary distributions are available at https://go.dev/dl/.

After downloading a binary release, visit https://go.dev/doc/install for installation instructions.

Install From Source

If a binary distribution is not available for your combination of operating system and architecture, visit https://go.dev/doc/install/source for source installation instructions.

Contributing

Go is the work of thousands of contributors. We appreciate your help!

To contribute, please read the contribution guidelines at https://go.dev/doc/contribute.

Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.