diff options
| author | Russ Cox <rsc@golang.org> | 2016-01-08 15:31:09 +0000 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2016-01-08 15:31:15 +0000 |
| commit | 6da608206c222c280078264f02135ffaa4e1aa26 (patch) | |
| tree | 99bd0b58d508681fbe19c30e0de9427cb725a98b /src/runtime/proc.go | |
| parent | c5bafc828126c8fa057e1accaa448583c7ec145f (diff) | |
| download | go-6da608206c222c280078264f02135ffaa4e1aa26.tar.xz | |
Revert "runtime: make NumGoroutine and Stack agree not to include system goroutines"
This reverts commit c5bafc828126c8fa057e1accaa448583c7ec145f.
Change-Id: Ie7030c978c6263b9e996d5aa0e490086796df26d
Reviewed-on: https://go-review.googlesource.com/18431
Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/runtime/proc.go')
| -rw-r--r-- | src/runtime/proc.go | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/runtime/proc.go b/src/runtime/proc.go index d80b33e9c4..23429fd774 100644 --- a/src/runtime/proc.go +++ b/src/runtime/proc.go @@ -2162,9 +2162,6 @@ func goexit0(gp *g) { _g_ := getg() casgstatus(gp, _Grunning, _Gdead) - if isSystemGoroutine(gp) { - atomic.Xadd(&sched.ngsys, -1) - } gp.m = nil gp.lockedm = nil _g_.m.lockedg = nil @@ -2696,9 +2693,6 @@ func newproc1(fn *funcval, argp *uint8, narg int32, nret int32, callerpc uintptr gostartcallfn(&newg.sched, fn) newg.gopc = callerpc newg.startpc = fn.fn - if isSystemGoroutine(newg) { - atomic.Xadd(&sched.ngsys, +1) - } casgstatus(newg, _Gdead, _Grunnable) if _p_.goidcache == _p_.goidcacheend { @@ -2891,7 +2885,7 @@ func badunlockosthread() { } func gcount() int32 { - n := int32(allglen) - sched.ngfree - int32(atomic.Load(&sched.ngsys)) + n := int32(allglen) - sched.ngfree for i := 0; ; i++ { _p_ := allp[i] if _p_ == nil { |
