mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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>
This commit is contained in:
parent
b464708b46
commit
dd8cb66d0b
4 changed files with 19 additions and 19 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue