aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/dist/sys_windows.go
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2021-12-13 17:32:07 -0500
committerMichael Pratt <mpratt@google.com>2022-01-14 18:36:41 +0000
commit1302f93c4e1eae0e625b372f9bb6bb48780af30f (patch)
tree1e937d0aa089ab67c6a4f072a183268e2c79744b /src/cmd/dist/sys_windows.go
parente4a6b84962cc2fb4f4b8bb532a84bab5bfd68d99 (diff)
downloadgo-1302f93c4e1eae0e625b372f9bb6bb48780af30f.tar.gz
go-1302f93c4e1eae0e625b372f9bb6bb48780af30f.zip
cmd/dist: log CPU model when testing
Knowing whether test failures are correlated with specific CPU models on has proven useful on several issues. Log it for prior to testing so it is always available. internal/sysinfo provides the CPU model, but it is not available in the bootstrap toolchain, so we can't access this unconditionally in cmd/dist. Instead use a build-tagged file, as the final version of cmd/dist will use the final toolchain. The addition of new data to the beginning of cmd/dist output will break x/build/cmd/coordinator's banner parsing, leaving extra lines in the log output, though information will not be lost. https://golang.org/cl/372538 fixes up the coordinator and should be submitted and deployed before this CL is submitted. For #46272. For #49209. For #50146. Change-Id: I515d2ec58e4c0034b76bf624ecaab38f16146074 Reviewed-on: https://go-review.googlesource.com/c/go/+/371474 Trust: Benny Siegert <bsiegert@gmail.com> Reviewed-by: Benny Siegert <bsiegert@gmail.com> Trust: Michael Pratt <mpratt@google.com> Run-TryBot: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/cmd/dist/sys_windows.go')
-rw-r--r--src/cmd/dist/sys_windows.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/dist/sys_windows.go b/src/cmd/dist/sys_windows.go
index 265f729d0fc..0fb66ad27db 100644
--- a/src/cmd/dist/sys_windows.go
+++ b/src/cmd/dist/sys_windows.go
@@ -38,11 +38,11 @@ const (
PROCESSOR_ARCHITECTURE_IA64 = 6
)
-var sysinfo systeminfo
+var winsysinfo systeminfo
func sysinit() {
- syscall.Syscall(procGetSystemInfo.Addr(), 1, uintptr(unsafe.Pointer(&sysinfo)), 0, 0)
- switch sysinfo.wProcessorArchitecture {
+ syscall.Syscall(procGetSystemInfo.Addr(), 1, uintptr(unsafe.Pointer(&winsysinfo)), 0, 0)
+ switch winsysinfo.wProcessorArchitecture {
case PROCESSOR_ARCHITECTURE_AMD64:
gohostarch = "amd64"
case PROCESSOR_ARCHITECTURE_INTEL: