diff options
author | Austin Clements <austin@google.com> | 2015-05-04 16:10:49 -0400 |
---|---|---|
committer | Austin Clements <austin@google.com> | 2015-05-06 19:40:33 +0000 |
commit | 3be3cbd5480187d279118b71633ee99a1996c5a2 (patch) | |
tree | 571f266fbfca8d79a02234d9ac360b9576c466bd /src/runtime/mcache.go | |
parent | 53c53984e7ae789c3a1dda0ef4d8f6e760753faa (diff) | |
download | go-git-3be3cbd5480187d279118b71633ee99a1996c5a2.tar.gz |
runtime: track "scannable" bytes of heap
This tracks the number of scannable bytes in the allocated heap. That
is, bytes that the garbage collector must scan before reaching the
last pointer field in each object.
This will be used to compute a more robust estimate of the GC scan
work.
Change-Id: I1eecd45ef9cdd65b69d2afb5db5da885c80086bb
Reviewed-on: https://go-review.googlesource.com/9695
Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/runtime/mcache.go')
-rw-r--r-- | src/runtime/mcache.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/runtime/mcache.go b/src/runtime/mcache.go index f01215379a..8c2a6b00ce 100644 --- a/src/runtime/mcache.go +++ b/src/runtime/mcache.go @@ -13,6 +13,7 @@ type mcache struct { // so they are grouped here for better caching. next_sample int32 // trigger heap sample after allocating this many bytes local_cachealloc uintptr // bytes allocated from cache since last lock of heap + local_scan uintptr // bytes of scannable heap allocated // Allocator cache for tiny objects w/o pointers. // See "Tiny allocator" comment in malloc.go. tiny unsafe.Pointer |