mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
runtime: document maxStack and m.createstack in more details
Change-Id: If93b6cfa5a598a5f4101c879a0cd88a194e4a6aa Reviewed-on: https://go-review.googlesource.com/c/go/+/518116 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Andy Pan <panjf2000@gmail.com>
This commit is contained in:
parent
50f2b7b764
commit
a7c3de7052
@ -39,7 +39,10 @@ const (
|
|||||||
// size of bucket hash table
|
// size of bucket hash table
|
||||||
buckHashSize = 179999
|
buckHashSize = 179999
|
||||||
|
|
||||||
// max depth of stack to record in bucket
|
// maxStack is the max depth of stack to record in bucket.
|
||||||
|
// Note that it's only used internally as a guard against
|
||||||
|
// wildly out-of-bounds slicing of the PCs that come after
|
||||||
|
// a bucket struct, and it could increase in the future.
|
||||||
maxStack = 32
|
maxStack = 32
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -583,7 +583,7 @@ type m struct {
|
|||||||
alllink *m // on allm
|
alllink *m // on allm
|
||||||
schedlink muintptr
|
schedlink muintptr
|
||||||
lockedg guintptr
|
lockedg guintptr
|
||||||
createstack [32]uintptr // stack that created this thread.
|
createstack [32]uintptr // stack that created this thread, it's used for StackRecord.Stack0, so it must align with it.
|
||||||
lockedExt uint32 // tracking for external LockOSThread
|
lockedExt uint32 // tracking for external LockOSThread
|
||||||
lockedInt uint32 // tracking for internal lockOSThread
|
lockedInt uint32 // tracking for internal lockOSThread
|
||||||
nextwaitm muintptr // next m waiting for lock
|
nextwaitm muintptr // next m waiting for lock
|
||||||
|
Loading…
x
Reference in New Issue
Block a user