mirror of
https://github.com/tailscale/tailscale.git
synced 2026-09-12 22:08:26 -04:00
To decide whether we can bump GOAMD64 for our production binaries, we first need to know what x86-64 microarchitecture levels the fleet's CPUs actually support. Add two gauges to the default metric set on linux/amd64: goamd64_capable, the maximum GOAMD64 level the host CPU supports per /proc/cpuinfo, and goamd64_compiled, the level the running binary was built with per its build info. Both are computed once at init and report 0 on error. The per-level feature lists match the checks in Go's runtime/asm_amd64.s. Updates tailscale/corp#47099 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com> Change-Id: I3b4e5431ae1501f0b7d584c12d9af805e9ab6125