From c5ebcd2c8ac6c5bdf85ec0a346974efd4b0cbe49 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Thu, 9 Feb 2017 11:50:26 -0500 Subject: runtime: remove rescan list With the hybrid barrier, rescanning stacks is no longer necessary so the rescan list is no longer necessary. Remove it. This leaves the gcrescanstacks GODEBUG variable, since it's useful for debugging, but changes it to simply walk all of the Gs to rescan stacks rather than using the rescan list. We could also remove g.gcscanvalid, which is effectively a distributed rescan list. However, it's still useful for gcrescanstacks mode and it adds little complexity, so we'll leave it in. Fixes #17099. Updates #17503. Change-Id: I776d43f0729567335ef1bfd145b75c74de2cc7a9 Reviewed-on: https://go-review.googlesource.com/36619 Run-TryBot: Austin Clements TryBot-Result: Gobot Gobot Reviewed-by: Rick Hudson --- src/runtime/runtime2.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/runtime/runtime2.go') diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go index 8cf13e96d8..80395193da 100644 --- a/src/runtime/runtime2.go +++ b/src/runtime/runtime2.go @@ -365,7 +365,7 @@ type g struct { paniconfault bool // panic (instead of crash) on unexpected fault address preemptscan bool // preempted g does scan for gc gcscandone bool // g has scanned stack; protected by _Gscan bit in status - gcscanvalid bool // false at start of gc cycle, true if G has not run since last scan; transition from true to false by calling queueRescan and false to true by calling dequeueRescan + gcscanvalid bool // false at start of gc cycle, true if G has not run since last scan; TODO: remove? throwsplit bool // must not split stack raceignore int8 // ignore race detection events sysblocktraced bool // StartTrace has emitted EvGoInSyscall about this goroutine @@ -388,13 +388,6 @@ type g struct { // Per-G GC state - // gcRescan is this G's index in work.rescan.list. If this is - // -1, this G is not on the rescan list. - // - // If gcphase != _GCoff and this G is visible to the garbage - // collector, writes to this are protected by work.rescan.lock. - gcRescan int32 - // gcAssistBytes is this G's GC assist credit in terms of // bytes allocated. If this is positive, then the G has credit // to allocate gcAssistBytes bytes without assisting. If this -- cgit v1.3