diff options
author | Michael Anthony Knyszek <mknyszek@google.com> | 2020-07-24 19:58:31 +0000 |
---|---|---|
committer | Michael Knyszek <mknyszek@google.com> | 2020-10-26 17:26:48 +0000 |
commit | c8638498008f9874dc5a48734418e0fbea08cee9 (patch) | |
tree | d1d4cc55b139dcc01affc9b8889d386abef09bae /src/runtime/mgcsweep.go | |
parent | d677899e903c4741920846f1af2c14c56f6e710e (diff) | |
download | go-c8638498008f9874dc5a48734418e0fbea08cee9.tar.gz go-c8638498008f9874dc5a48734418e0fbea08cee9.zip |
runtime: rename mcache fields to match Go style
This change renames a bunch of malloc statistics stored in the mcache
that are all named with the "local_" prefix. It also renames largeAlloc
to allocLarge to prevent a naming conflict, and next_sample because it
would be the last mcache field with the old C naming style.
Change-Id: I29695cb83b397a435ede7e9ad5c3c9be72767ea3
Reviewed-on: https://go-review.googlesource.com/c/go/+/246969
Trust: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/runtime/mgcsweep.go')
-rw-r--r-- | src/runtime/mgcsweep.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/mgcsweep.go b/src/runtime/mgcsweep.go index 6b8c56ce35..7103b08455 100644 --- a/src/runtime/mgcsweep.go +++ b/src/runtime/mgcsweep.go @@ -503,7 +503,7 @@ func (s *mspan) sweep(preserve bool) bool { // wasn't totally filled, but then swept, still has all of its // free slots zeroed. s.needzero = 1 - c.local_nsmallfree[spc.sizeclass()] += uintptr(nfreed) + c.smallFreeCount[spc.sizeclass()] += uintptr(nfreed) } if !preserve { // The caller may not have removed this span from whatever @@ -548,8 +548,8 @@ func (s *mspan) sweep(preserve bool) bool { } else { mheap_.freeSpan(s) } - c.local_nlargefree++ - c.local_largefree += size + c.largeFreeCount++ + c.largeFree += size return true } |