diff options
| author | Nick Ripley <nick.ripley@datadoghq.com> | 2022-09-28 14:44:56 -0400 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-02-21 17:35:22 +0000 |
| commit | 51225f6fc648ba3e833f3493700c2996a816bdaa (patch) | |
| tree | 740414adb2adcf9e57b992757c9e94bce2e614bd /src/runtime/runtime2.go | |
| parent | 81eda3a33916c17e3415219a9b1e6e6295e8c748 (diff) | |
| download | go-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.go | 1 |
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 |
