runtime: go fmt

Change-Id: I6a6a636cf38ddb1dc6f2170361eb4093b81acdfb
Reviewed-on: https://go-review.googlesource.com/c/go/+/722521
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
This commit is contained in:
Michael Pratt 2025-11-20 16:25:40 -05:00 committed by Gopher Robot
parent 17b3b98796
commit e7787b9eca
6 changed files with 22 additions and 21 deletions

View file

@ -592,6 +592,7 @@ func cgoCheckPointer(ptr any, arg any) {
} }
type cgoErrorMsg int type cgoErrorMsg int
const ( const (
cgoCheckPointerFail cgoErrorMsg = iota cgoCheckPointerFail cgoErrorMsg = iota
cgoResultFail cgoResultFail

View file

@ -34,11 +34,11 @@ func (head *listHead) init(off uintptr) {
// //
// For example: // For example:
// //
// type foo struct { // type foo struct {
// val int // val int
// //
// node listNode // node listNode
// } // }
// //
// var fooHead listHead // var fooHead listHead
// fooHead.init(unsafe.Offsetof(foo{}.node)) // fooHead.init(unsafe.Offsetof(foo{}.node))

View file

@ -41,11 +41,11 @@ func (head *listHeadManual) init(off uintptr) {
// //
// For example: // For example:
// //
// type foo struct { // type foo struct {
// val int // val int
// //
// node listNodeManual // node listNodeManual
// } // }
// //
// var fooHead listHeadManual // var fooHead listHeadManual
// fooHead.init(unsafe.Offsetof(foo{}.node)) // fooHead.init(unsafe.Offsetof(foo{}.node))

View file

@ -67,7 +67,7 @@ func (q *spanQueue) destroy() {
} }
type spanSPMC struct { type spanSPMC struct {
_ sys.NotInHeap _ sys.NotInHeap
allnode listNodeManual allnode listNodeManual
} }

View file

@ -1175,9 +1175,9 @@ func TestBigGOMAXPROCS(t *testing.T) {
} }
type goroutineState struct { type goroutineState struct {
G trace.GoID // This goroutine. G trace.GoID // This goroutine.
P trace.ProcID // Most recent P this goroutine ran on. P trace.ProcID // Most recent P this goroutine ran on.
M trace.ThreadID // Most recent M this goroutine ran on. M trace.ThreadID // Most recent M this goroutine ran on.
} }
func newGoroutineState(g trace.GoID) *goroutineState { func newGoroutineState(g trace.GoID) *goroutineState {
@ -1228,7 +1228,7 @@ func TestTraceSTW(t *testing.T) {
} }
} }
pct := float64(errors)/float64(runs) pct := float64(errors) / float64(runs)
t.Logf("Errors: %d/%d = %f%%", errors, runs, 100*pct) t.Logf("Errors: %d/%d = %f%%", errors, runs, 100*pct)
if pct > 0.25 { if pct > 0.25 {
t.Errorf("Error rate too high") t.Errorf("Error rate too high")
@ -1264,7 +1264,7 @@ func TestTraceGCSTW(t *testing.T) {
} }
} }
pct := float64(errors)/float64(runs) pct := float64(errors) / float64(runs)
t.Logf("Errors: %d/%d = %f%%", errors, runs, 100*pct) t.Logf("Errors: %d/%d = %f%%", errors, runs, 100*pct)
if pct > 0.25 { if pct > 0.25 {
t.Errorf("Error rate too high") t.Errorf("Error rate too high")

View file

@ -838,7 +838,7 @@ type p struct {
palloc persistentAlloc // per-P to avoid mutex palloc persistentAlloc // per-P to avoid mutex
// Per-P GC state // Per-P GC state
gcAssistTime int64 // Nanoseconds in assistAlloc gcAssistTime int64 // Nanoseconds in assistAlloc
gcFractionalMarkTime atomic.Int64 // Nanoseconds in fractional mark worker gcFractionalMarkTime atomic.Int64 // Nanoseconds in fractional mark worker
// limiterEvent tracks events for the GC CPU limiter. // limiterEvent tracks events for the GC CPU limiter.
@ -934,12 +934,12 @@ type schedt struct {
// sure to call checkdead(). // sure to call checkdead().
midle listHeadManual // idle m's waiting for work midle listHeadManual // idle m's waiting for work
nmidle int32 // number of idle m's waiting for work nmidle int32 // number of idle m's waiting for work
nmidlelocked int32 // number of locked m's waiting for work nmidlelocked int32 // number of locked m's waiting for work
mnext int64 // number of m's that have been created and next M ID mnext int64 // number of m's that have been created and next M ID
maxmcount int32 // maximum number of m's allowed (or die) maxmcount int32 // maximum number of m's allowed (or die)
nmsys int32 // number of system m's not counted for deadlock nmsys int32 // number of system m's not counted for deadlock
nmfreed int64 // cumulative number of freed m's nmfreed int64 // cumulative number of freed m's
ngsys atomic.Int32 // number of system goroutines ngsys atomic.Int32 // number of system goroutines
nGsyscallNoP atomic.Int32 // number of goroutines in syscalls without a P nGsyscallNoP atomic.Int32 // number of goroutines in syscalls without a P