mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: eliminate gchelper mechanism
Now that we do no mark work during mark termination, we no longer need the gchelper mechanism. Updates #26903. Updates #17503. Change-Id: Ie94e5c0f918cfa047e88cae1028fece106955c1b Reviewed-on: https://go-review.googlesource.com/c/134785 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rick Hudson <rlh@golang.org>
This commit is contained in:
parent
550dfc8ae1
commit
0906d648aa
5 changed files with 9 additions and 157 deletions
|
|
@ -350,7 +350,7 @@ func stackalloc(n uint32) stack {
|
|||
}
|
||||
var x gclinkptr
|
||||
c := thisg.m.mcache
|
||||
if stackNoCache != 0 || c == nil || thisg.m.preemptoff != "" || thisg.m.helpgc != 0 {
|
||||
if stackNoCache != 0 || c == nil || thisg.m.preemptoff != "" {
|
||||
// c == nil can happen in the guts of exitsyscall or
|
||||
// procresize. Just get a stack from the global pool.
|
||||
// Also don't touch stackcache during gc
|
||||
|
|
@ -445,7 +445,7 @@ func stackfree(stk stack) {
|
|||
}
|
||||
x := gclinkptr(v)
|
||||
c := gp.m.mcache
|
||||
if stackNoCache != 0 || c == nil || gp.m.preemptoff != "" || gp.m.helpgc != 0 {
|
||||
if stackNoCache != 0 || c == nil || gp.m.preemptoff != "" {
|
||||
lock(&stackpoolmu)
|
||||
stackpoolfree(x, order)
|
||||
unlock(&stackpoolmu)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue