commit | 0cf7623e9dbd9bc79267b27a7e6c5757ef550423 | [log] [tgz] |
---|---|---|
author | Polina Osadcha <polliosa@google.com> | Thu Jul 09 09:47:37 2020 +0300 |
committer | Martin Möhrmann <moehrmann@google.com> | Wed Aug 05 06:55:43 2020 +0000 |
tree | 7f9df537c5092f6a17210cd4793e85348c632b62 | |
parent | 64077c9b5642ac67ce07bc05738eb432a9029f93 [diff] |
cpu: add GODEBUG options to disable use of instruction set extensions The GODEBUG environment variable can be used to disable usage of specific processor features of Go programs that use the sys/cpu package. This is useful for testing and benchmarking different code paths that are guarded by sys/cpu variable checks. Use of processor features can not be enabled through GODEBUG. To disable usage of AVX and SSE41 cpu features on GOARCH amd64 use: GODEBUG=cpu.avx=off,cpu.sse41=off The special "all" option can be used to disable all options: GODEBUG=all=off This aligns the support of GODEBUG for sys/cpu with existing support for GODEBUG in the Go standard library package internal/cpu. Fixes golang/go#33963 Change-Id: I618b71af397bf06c57a49b2a300d032a16d05664 Reviewed-on: https://go-review.googlesource.com/c/sys/+/245237 Run-TryBot: Martin Möhrmann <moehrmann@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Martin Möhrmann <moehrmann@google.com> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
This repository holds supplemental Go packages for low-level interactions with the operating system.
The easiest way to install is to run go get -u golang.org/x/sys
. You can also manually git clone the repository to $GOPATH/src/golang.org/x/sys
.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.
The main issue tracker for the sys repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/sys:” in the subject line, so it is easy to find.