aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/mgcmark.go
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2016-10-05 21:22:33 -0400
committerAustin Clements <austin@google.com>2016-10-25 22:33:02 +0000
commit575b1dda4ec845aea6b5c475e9d748dc76d1bc06 (patch)
tree423152afc5ab82338ece64659c3deb20c0e20add /src/runtime/mgcmark.go
parentc95a8e458fdf9f3cb0c176ac92a513e5dc9b32c1 (diff)
downloadgo-575b1dda4ec845aea6b5c475e9d748dc76d1bc06.tar.xz
runtime: eliminate allspans snapshot
Now that sweeping and span marking use the sweep list, there's no need for the work.spans snapshot of the allspans list. This change eliminates the few remaining uses of it, which are either dead code or can use allspans directly, and removes work.spans and its support functions. Change-Id: Id5388b42b1e68e8baee853d8eafb8bb4ff95bb43 Reviewed-on: https://go-review.googlesource.com/30537 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rick Hudson <rlh@golang.org>
Diffstat (limited to 'src/runtime/mgcmark.go')
-rw-r--r--src/runtime/mgcmark.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/mgcmark.go b/src/runtime/mgcmark.go
index e0f82d496b..e47072d88c 100644
--- a/src/runtime/mgcmark.go
+++ b/src/runtime/mgcmark.go
@@ -1421,7 +1421,7 @@ var useCheckmark = false
//go:nowritebarrier
func initCheckmarks() {
useCheckmark = true
- for _, s := range work.spans {
+ for _, s := range mheap_.allspans {
if s.state == _MSpanInUse {
heapBitsForSpan(s.base()).initCheckmarkSpan(s.layout())
}
@@ -1430,7 +1430,7 @@ func initCheckmarks() {
func clearCheckmarks() {
useCheckmark = false
- for _, s := range work.spans {
+ for _, s := range mheap_.allspans {
if s.state == _MSpanInUse {
heapBitsForSpan(s.base()).clearCheckmarkSpan(s.layout())
}