aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Silva <philip.silva@protonmail.com>2023-05-30 19:59:43 +0200
committerKeith Randall <khr@golang.org>2023-06-13 14:08:14 +0000
commitbce7aec3cdca8580585095007e9b7cea11a8812f (patch)
tree62d28cc8190862e81e5ec8843f3ff46af7446765
parentd9b87d7cc3281a3d3051dfa75e30251f25ee117d (diff)
downloadgo-bce7aec3cdca8580585095007e9b7cea11a8812f.tar.gz
go-bce7aec3cdca8580585095007e9b7cea11a8812f.zip
runtime/trace: disable frame pointer unwinding on plan9
Fixes #60254 Change-Id: Ifd9e517a9479e5cd63fd3622b2556989d5f84eb9 Reviewed-on: https://go-review.googlesource.com/c/go/+/499036 Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Keith Randall <khr@golang.org> Run-TryBot: Keith Randall <khr@golang.org> TryBot-Bypass: Keith Randall <khr@golang.org>
-rw-r--r--src/runtime/trace.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/runtime/trace.go b/src/runtime/trace.go
index 2f9e141b09..ac80ca2902 100644
--- a/src/runtime/trace.go
+++ b/src/runtime/trace.go
@@ -15,6 +15,7 @@ package runtime
import (
"internal/abi"
"internal/goarch"
+ "internal/goos"
"runtime/internal/atomic"
"runtime/internal/sys"
"unsafe"
@@ -993,8 +994,9 @@ func traceStackID(mp *m, pcBuf []uintptr, skip int) uint64 {
// tracefpunwindoff returns true if frame pointer unwinding for the tracer is
// disabled via GODEBUG or not supported by the architecture.
+// TODO(#60254): support frame pointer unwinding on plan9/amd64.
func tracefpunwindoff() bool {
- return debug.tracefpunwindoff != 0 || (goarch.ArchFamily != goarch.AMD64 && goarch.ArchFamily != goarch.ARM64)
+ return debug.tracefpunwindoff != 0 || (goarch.ArchFamily != goarch.AMD64 && goarch.ArchFamily != goarch.ARM64) || goos.IsPlan9 == 1
}
// fpTracebackPCs populates pcBuf with the return addresses for each frame and