mirror of
https://github.com/golang/go
synced 2024-11-18 05:44:47 -07:00
runtime: add GODEBUG=asyncpreemptoff=1
This doesn't do anything yet, but it will provide a way to disable non-cooperative preemption. For #10958, #24543. Change-Id: Ifdef303f103eabd0922ced8d9bebbd5f0aa2cda4 Reviewed-on: https://go-review.googlesource.com/c/go/+/201757 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
bdb5e9d170
commit
40b7455877
@ -127,6 +127,13 @@ It is a comma-separated list of name=val pairs setting these named variables:
|
|||||||
IDs will refer to the ID of the goroutine at the time of creation; it's possible for this
|
IDs will refer to the ID of the goroutine at the time of creation; it's possible for this
|
||||||
ID to be reused for another goroutine. Setting N to 0 will report no ancestry information.
|
ID to be reused for another goroutine. Setting N to 0 will report no ancestry information.
|
||||||
|
|
||||||
|
asyncpreemptoff: asyncpreemptoff=1 disables signal-based
|
||||||
|
asynchronous goroutine preemption. This makes some loops
|
||||||
|
non-preemptible for long periods, which may delay GC and
|
||||||
|
goroutine scheduling. This is useful for debugging GC issues
|
||||||
|
because it also disables the conservative stack scanning used
|
||||||
|
for asynchronously preempted goroutines.
|
||||||
|
|
||||||
The net, net/http, and crypto/tls packages also refer to debugging variables in GODEBUG.
|
The net, net/http, and crypto/tls packages also refer to debugging variables in GODEBUG.
|
||||||
See the documentation for those packages for details.
|
See the documentation for those packages for details.
|
||||||
|
|
||||||
|
@ -315,6 +315,7 @@ var debug struct {
|
|||||||
scheddetail int32
|
scheddetail int32
|
||||||
schedtrace int32
|
schedtrace int32
|
||||||
tracebackancestors int32
|
tracebackancestors int32
|
||||||
|
asyncpreemptoff int32
|
||||||
}
|
}
|
||||||
|
|
||||||
var dbgvars = []dbgVar{
|
var dbgvars = []dbgVar{
|
||||||
@ -334,6 +335,7 @@ var dbgvars = []dbgVar{
|
|||||||
{"scheddetail", &debug.scheddetail},
|
{"scheddetail", &debug.scheddetail},
|
||||||
{"schedtrace", &debug.schedtrace},
|
{"schedtrace", &debug.schedtrace},
|
||||||
{"tracebackancestors", &debug.tracebackancestors},
|
{"tracebackancestors", &debug.tracebackancestors},
|
||||||
|
{"asyncpreemptoff", &debug.asyncpreemptoff},
|
||||||
}
|
}
|
||||||
|
|
||||||
func parsedebugvars() {
|
func parsedebugvars() {
|
||||||
|
Loading…
Reference in New Issue
Block a user