1
0
mirror of https://github.com/golang/go synced 2024-11-26 14:46:47 -07: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:
Andy Pan 2023-08-10 14:02:03 +08:00 committed by Michael Knyszek
parent 50f2b7b764
commit a7c3de7052
2 changed files with 5 additions and 2 deletions

View File

@ -39,7 +39,10 @@ const (
// size of bucket hash table
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
)

View File

@ -583,7 +583,7 @@ type m struct {
alllink *m // on allm
schedlink muintptr
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
lockedInt uint32 // tracking for internal lockOSThread
nextwaitm muintptr // next m waiting for lock