]> Cypherpunks.ru repositories - gostls13.git/commit
runtime/traceback: support tracking goroutine ancestor tracebacks with GODEBUG="trace...
authorEric Daniels <eric@erdaniels.com>
Wed, 4 Apr 2018 01:35:46 +0000 (21:35 -0400)
committerAustin Clements <austin@google.com>
Fri, 13 Apr 2018 20:42:38 +0000 (20:42 +0000)
commitd9b006a7057d4666cb4fa9c421f2360ef3994b0f
treec164e0e3b0f5c10fa391ba1e25456e52c1dfa365
parent115b1cd192609624a898954b9759fcd90247badc
runtime/traceback: support tracking goroutine ancestor tracebacks with GODEBUG="tracebackancestors=N"

Currently, collecting a stack trace via runtime.Stack captures the stack for the
immediately running goroutines. This change extends those tracebacks to include
the tracebacks of their ancestors. This is done with a low memory cost and only
utilized when debug option tracebackancestors is set to a value greater than 0.

Resolves #22289

Change-Id: I7edacc62b2ee3bd278600c4a21052c351f313f3a
Reviewed-on: https://go-review.googlesource.com/70993
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
src/runtime/extern.go
src/runtime/proc.go
src/runtime/runtime1.go
src/runtime/runtime2.go
src/runtime/sizeof_test.go
src/runtime/stack_test.go
src/runtime/testdata/testprog/traceback_ancestors.go [new file with mode: 0644]
src/runtime/traceback.go