From 69a8954282dc4500bb645e67fb912d53a7f78a5c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20M=C3=B6hrmann?= Date: Fri, 12 Aug 2022 19:08:35 +0200 Subject: [PATCH] runtime: document GODEBUG=cpu.* in runtime package MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/runtime/extern.go | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- 2.50.0