Skip to content

Commit

Permalink
internal/telemetry: disable telemetry on GOARCH=mips
Browse files Browse the repository at this point in the history
On mips, 64-bit atomics are implemented with a spin lock, and therefore
don't work across processes. Since the counter file relies on this
synchronization primitive, disable telemetry on mips.

Change-Id: I5e8c47acc0071b572ec34555eca1149d04428aa5
Reviewed-on: https://go-review.googlesource.com/c/telemetry/+/600916
Reviewed-by: Cherry Mui <[email protected]>
Reviewed-by: Russ Cox <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
  • Loading branch information
findleyr committed Aug 5, 2024
1 parent 6a1b328 commit 5270ccf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/telemetry/dir.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ func (d Dir) Mode() (string, time.Time) {

// DisabledOnPlatform indicates whether telemetry is disabled
// due to bugs in the current platform.
//
// TODO(rfindley): move to a more appropriate file.
const DisabledOnPlatform = false ||
// The following platforms could potentially be supported in the future:
runtime.GOOS == "openbsd" || // #60614
Expand All @@ -157,4 +159,5 @@ const DisabledOnPlatform = false ||
// These platforms fundamentally can't be supported:
runtime.GOOS == "js" || // #60971
runtime.GOOS == "wasip1" || // #60971
runtime.GOOS == "plan9" // https://github.com/golang/go/issues/57540#issuecomment-1470766639
runtime.GOOS == "plan9" || // https://github.com/golang/go/issues/57540#issuecomment-1470766639
runtime.GOARCH == "mips" || runtime.GOARCH == "mipsle" // mips lacks cross-process 64-bit atomics

0 comments on commit 5270ccf

Please sign in to comment.