diff options
| author | Nicolas Hillegeer <aktau@google.com> | 2024-02-08 08:56:33 -0800 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2024-02-10 00:14:50 +0000 |
| commit | 20f4b6d8f910adb5a3739dce5f4ffcfd2eb491c4 (patch) | |
| tree | 363adef72c43b896e27b60a28f28a5f4f1450d64 /src/runtime/trace.go | |
| parent | 2dfc5eae2ee177d44f867783e13d7401b9f34a18 (diff) | |
| download | go-20f4b6d8f910adb5a3739dce5f4ffcfd2eb491c4.tar.xz | |
runtime: call traceAdvance before exiting
This ensures the trace buffers are as up-to-date as possible right
before crashing. It increases the chance of finding the culprit for the
crash when looking at core dumps, e.g. if slowness is the cause for the
crash (monitor kills process).
Fixes #65319.
Change-Id: Iaf5551911b3b3b01ba65cb8749cf62a411e02d9c
Reviewed-on: https://go-review.googlesource.com/c/go/+/562616
Auto-Submit: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Diffstat (limited to 'src/runtime/trace.go')
| -rw-r--r-- | src/runtime/trace.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/runtime/trace.go b/src/runtime/trace.go index a9cfa22337..948a8da0ca 100644 --- a/src/runtime/trace.go +++ b/src/runtime/trace.go @@ -578,6 +578,9 @@ func StopTrace() { }) } +// traceAdvance is called from panic, it does nothing for the legacy tracer. +func traceAdvance(stopTrace bool) {} + // ReadTrace returns the next chunk of binary tracing data, blocking until data // is available. If tracing is turned off and all the data accumulated while it // was on has been returned, ReadTrace returns nil. The caller must copy the |
