diff options
author | Rick Hudson <rlh@golang.org> | 2014-11-21 16:46:27 -0500 |
---|---|---|
committer | Rick Hudson <rlh@golang.org> | 2014-11-21 16:46:27 -0500 |
commit | df7d4576f312e1b646af4f5f1a32412a4221b785 (patch) | |
tree | 95ea9ad1639878495461086150d8bfd8830ad0c9 /src/runtime/proc1.go | |
parent | a1d2955f5ee5d3e170b9b784baf46c79e0740320 (diff) | |
download | go-df7d4576f312e1b646af4f5f1a32412a4221b785.tar.gz |
[dev.garbage] runtime: Stop running gs during the GCscan phase.
Ensure that all gs are in a scan state when their stacks are being scanned.
LGTM=rsc
R=rsc
CC=golang-codereviews
https://codereview.appspot.com/179160044
Diffstat (limited to 'src/runtime/proc1.go')
-rw-r--r-- | src/runtime/proc1.go | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/runtime/proc1.go b/src/runtime/proc1.go index 8c941dd35..be01f2671 100644 --- a/src/runtime/proc1.go +++ b/src/runtime/proc1.go @@ -316,6 +316,10 @@ func casfrom_Gscanstatus(gp *g, oldval, newval uint32) { // Check that transition is valid. switch oldval { + default: + print("runtime: casfrom_Gscanstatus bad oldval gp=", gp, ", oldval=", hex(oldval), ", newval=", hex(newval), "\n") + dumpgstatus(gp) + gothrow("casfrom_Gscanstatus:top gp->status is not in scan state") case _Gscanrunnable, _Gscanwaiting, _Gscanrunning, @@ -417,13 +421,6 @@ func stopg(gp *g) bool { return false case _Grunning: - if gcphase == _GCscan { - // Running routines not scanned during - // GCscan phase, we only scan non-running routines. - gp.gcworkdone = true - return false - } - // Claim goroutine, so we aren't racing with a status // transition away from Grunning. if !castogscanstatus(gp, _Grunning, _Gscanrunning) { |