diff options
| author | Michael Pratt <mpratt@google.com> | 2022-07-19 13:49:33 -0400 |
|---|---|---|
| committer | Michael Pratt <mpratt@google.com> | 2022-08-12 01:39:28 +0000 |
| commit | dd8cb66d0b1bf385a8acbbdc81515b301e059236 (patch) | |
| tree | c597432d852a845d21fbc229d3db550368486569 /src/runtime/proc.go | |
| parent | b464708b463b104849a951af54352c8a894bfbc4 (diff) | |
| download | go-dd8cb66d0b1bf385a8acbbdc81515b301e059236.tar.xz | |
runtime: convert g.goid to uint64
schedt.goidgen and p.goidcache are already uint64, this makes all cases
consistent.
The only oddball here is schedtrace which prints -1 as an equivalent for
N/A or nil. A future CL will make this more explicit.
Change-Id: I489626f3232799f6ca333d0d103b71d9d3aa7494
Reviewed-on: https://go-review.googlesource.com/c/go/+/419440
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/runtime/proc.go')
| -rw-r--r-- | src/runtime/proc.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/runtime/proc.go b/src/runtime/proc.go index d9df526f7e..ff9caed212 100644 --- a/src/runtime/proc.go +++ b/src/runtime/proc.go @@ -1919,7 +1919,7 @@ func oneNewExtraM() { mp.lockedInt++ mp.lockedg.set(gp) gp.lockedm.set(mp) - gp.goid = int64(sched.goidgen.Add(1)) + gp.goid = sched.goidgen.Add(1) if raceenabled { gp.racectx = racegostart(abi.FuncPCABIInternal(newextram) + sys.PCQuantum) } @@ -4172,7 +4172,7 @@ func newproc1(fn *funcval, callergp *g, callerpc uintptr) *g { pp.goidcache -= _GoidCacheBatch - 1 pp.goidcacheend = pp.goidcache + _GoidCacheBatch } - newg.goid = int64(pp.goidcache) + newg.goid = pp.goidcache pp.goidcache++ if raceenabled { newg.racectx = racegostart(callerpc) @@ -5455,11 +5455,11 @@ func schedtrace(detailed bool) { } id2 := int64(-1) if gp != nil { - id2 = gp.goid + id2 = int64(gp.goid) } id3 := int64(-1) if lockedg != nil { - id3 = lockedg.goid + id3 = int64(lockedg.goid) } print(" M", mp.id, ": p=", id1, " curg=", id2, " mallocing=", mp.mallocing, " throwing=", mp.throwing, " preemptoff=", mp.preemptoff, " locks=", mp.locks, " dying=", mp.dying, " spinning=", mp.spinning, " blocked=", mp.blocked, " lockedg=", id3, "\n") } @@ -6274,7 +6274,7 @@ var inittrace tracestat type tracestat struct { active bool // init tracing activation status - id int64 // init goroutine id + id uint64 // init goroutine id allocs uint64 // heap allocations bytes uint64 // heap allocated bytes } |
