aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime2.go
diff options
context:
space:
mode:
authorNick Ripley <nick.ripley@datadoghq.com>2022-09-28 14:44:56 -0400
committerGopher Robot <gobot@golang.org>2023-02-21 17:35:22 +0000
commit51225f6fc648ba3e833f3493700c2996a816bdaa (patch)
tree740414adb2adcf9e57b992757c9e94bce2e614bd /src/runtime/runtime2.go
parent81eda3a33916c17e3415219a9b1e6e6295e8c748 (diff)
downloadgo-51225f6fc648ba3e833f3493700c2996a816bdaa.tar.xz
runtime: record parent goroutine ID, and print it in stack traces
Fixes #38651 Change-Id: Id46d684ee80e208c018791a06c26f304670ed159 Reviewed-on: https://go-review.googlesource.com/c/go/+/435337 Run-TryBot: Nick Ripley <nick.ripley@datadoghq.com> Reviewed-by: Ethan Reesor <ethan.reesor@gmail.com> Auto-Submit: Michael Pratt <mpratt@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/runtime/runtime2.go')
-rw-r--r--src/runtime/runtime2.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go
index 9381d1e3f7..044a9a715f 100644
--- a/src/runtime/runtime2.go
+++ b/src/runtime/runtime2.go
@@ -479,6 +479,7 @@ type g struct {
sigcode0 uintptr
sigcode1 uintptr
sigpc uintptr
+ parentGoid uint64 // goid of goroutine that created this goroutine
gopc uintptr // pc of go statement that created this goroutine
ancestors *[]ancestorInfo // ancestor information goroutine(s) that created this goroutine (only used if debug.tracebackancestors)
startpc uintptr // pc of goroutine function