aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/export_test.go
diff options
context:
space:
mode:
authorMichael Anthony Knyszek <mknyszek@google.com>2020-07-24 19:58:31 +0000
committerMichael Knyszek <mknyszek@google.com>2020-10-26 17:26:48 +0000
commitc8638498008f9874dc5a48734418e0fbea08cee9 (patch)
treed1d4cc55b139dcc01affc9b8889d386abef09bae /src/runtime/export_test.go
parentd677899e903c4741920846f1af2c14c56f6e710e (diff)
downloadgo-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/export_test.go')
-rw-r--r--src/runtime/export_test.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/runtime/export_test.go b/src/runtime/export_test.go
index d71b180f76..47cbc286f6 100644
--- a/src/runtime/export_test.go
+++ b/src/runtime/export_test.go
@@ -346,18 +346,18 @@ func ReadMemStatsSlow() (base, slow MemStats) {
continue
}
// Collect large allocation stats.
- largeFree += uint64(c.local_largefree)
- slow.Frees += uint64(c.local_nlargefree)
+ largeFree += uint64(c.largeFree)
+ slow.Frees += uint64(c.largeFreeCount)
// Collect tiny allocation stats.
- tinyAllocs += uint64(c.local_tinyallocs)
+ tinyAllocs += uint64(c.tinyAllocCount)
// Collect per-sizeclass stats.
for i := 0; i < _NumSizeClasses; i++ {
- slow.Frees += uint64(c.local_nsmallfree[i])
- bySize[i].Frees += uint64(c.local_nsmallfree[i])
- bySize[i].Mallocs += uint64(c.local_nsmallfree[i])
- smallFree += uint64(c.local_nsmallfree[i]) * uint64(class_to_size[i])
+ slow.Frees += uint64(c.smallFreeCount[i])
+ bySize[i].Frees += uint64(c.smallFreeCount[i])
+ bySize[i].Mallocs += uint64(c.smallFreeCount[i])
+ smallFree += uint64(c.smallFreeCount[i]) * uint64(class_to_size[i])
}
}
slow.Frees += tinyAllocs