From: Martin Möhrmann Date: Fri, 12 Aug 2022 17:08:35 +0000 (+0200) Subject: runtime: document GODEBUG=cpu.* in runtime package X-Git-Tag: go1.20rc1~1628 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=69a8954282dc4500bb645e67fb912d53a7f78a5c;p=gostls13.git runtime: document GODEBUG=cpu.* in runtime package So far was only documented in doc/diagnostics. Fixes: #54183 Change-Id: Iab67a1500547f30325453c614a2f2f6621dfadb3 Reviewed-on: https://go-review.googlesource.com/c/go/+/423275 TryBot-Result: Gopher Robot Auto-Submit: Michael Knyszek Run-TryBot: Michael Knyszek Reviewed-by: Martin Möhrmann Reviewed-by: Michael Knyszek Reviewed-by: Lynn Boger --- diff --git a/src/runtime/extern.go b/src/runtime/extern.go index 15c519d233..8fb8720e89 100644 --- a/src/runtime/extern.go +++ b/src/runtime/extern.go @@ -42,6 +42,12 @@ It is a comma-separated list of name=val pairs setting these named variables: clobber the memory content of an object with bad content when it frees the object. + cpu.*: cpu.all=off disables the use of all optional instruction set extensions. + cpu.extension=off disables use of instructions from the specified instruction set extension. + extension is the lower case name for the instruction set extension such as sse41 or avx + as listed in internal/cpu package. As an example cpu.avx=off disables runtime detection + and thereby use of AVX instructions. + cgocheck: setting cgocheck=0 disables all checks for packages using cgo to incorrectly pass Go pointers to non-Go code. Setting cgocheck=1 (the default) enables relatively cheap