]> Cypherpunks repositories - gostls13.git/commit
runtime: track scan work performed during concurrent mark
authorAustin Clements <austin@google.com>
Thu, 12 Mar 2015 16:08:47 +0000 (12:08 -0400)
committerAustin Clements <austin@google.com>
Tue, 21 Apr 2015 15:35:00 +0000 (15:35 +0000)
commit571ebae6ef0f9edb09e516b75a757cfeeb51da35
tree1689199138b86bc5771566dd737d7a915ab352b7
parentfb9fd2bdd7024e8d92e7c2a1436843cbca6e1ed1
runtime: track scan work performed during concurrent mark

This tracks the amount of scan work in terms of scanned pointers
during the concurrent mark phase. We'll use this information to
estimate scan work for the next cycle.

Currently this aggregates the work counter in gcWork and dispose
atomically aggregates this into a global work counter. dispose happens
relatively infrequently, so the contention on the global counter
should be low. If this turns out to be an issue, we can reduce the
number of disposes, and if it's still a problem, we can switch to
per-P counters.

Change-Id: Iac0364c466ee35fab781dbbbe7970a5f3c4e1fc1
Reviewed-on: https://go-review.googlesource.com/8832
Reviewed-by: Rick Hudson <rlh@golang.org>
src/runtime/mgc.go
src/runtime/mgcmark.go
src/runtime/mgcwork.go