aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/trace.go
diff options
context:
space:
mode:
authorNick Ripley <nick.ripley@datadoghq.com>2023-05-01 09:08:01 -0400
committerGopher Robot <gobot@golang.org>2023-05-02 15:36:11 +0000
commit2d83b646d677ceb3df2ea592b7938efe8214c52a (patch)
treef89c1a355cd6020b4ee3d858cd44ef39c7d730a0 /src/runtime/trace.go
parentc63066123bb5c2ef7a6d26d1a6e3e5f1012a1e23 (diff)
downloadgo-2d83b646d677ceb3df2ea592b7938efe8214c52a.tar.xz
runtime/trace: enable frame pointer unwinding by default for amd64 and arm64
Re-enable frame pointer unwinding for execution tracing on amd64 by default, now that CL 489015 and CL 488755 have fixed recently-discovered crashes. This reverts CL 486382. These fixes, together with CL 241158 to fix up frame pointers when copying stacks on arm64, also make frame pointer unwinding for tracing safe to enable for arm64. This should significantly reduce the CPU and latency overhead of execution tracing on arm64, as it has for amd64. Co-Authored-By: Felix Geisendörfer <felix.geisendoerfer@datadoghq.com> Change-Id: I64a88bd69dfd8cb13956ec46f8b1203dbeaa26a6 Reviewed-on: https://go-review.googlesource.com/c/go/+/490815 Reviewed-by: Felix Geisendörfer <felix.geisendoerfer@datadoghq.com> Run-TryBot: Nick Ripley <nick.ripley@datadoghq.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Pratt <mpratt@google.com> Auto-Submit: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/runtime/trace.go')
-rw-r--r--src/runtime/trace.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/runtime/trace.go b/src/runtime/trace.go
index 79ccebb4b3..5eb68271d1 100644
--- a/src/runtime/trace.go
+++ b/src/runtime/trace.go
@@ -927,12 +927,10 @@ func traceStackID(mp *m, pcBuf []uintptr, skip int) uint64 {
return uint64(id)
}
-// tracefpunwindoff returns false if frame pointer unwinding for the tracer is
+// tracefpunwindoff returns true if frame pointer unwinding for the tracer is
// disabled via GODEBUG or not supported by the architecture.
func tracefpunwindoff() bool {
- // compiler emits frame pointers for amd64 and arm64, but issue 58432 blocks
- // arm64 support for now.
- return debug.tracefpunwindoff != 0 || goarch.ArchFamily != goarch.AMD64
+ return debug.tracefpunwindoff != 0 || (goarch.ArchFamily != goarch.AMD64 && goarch.ArchFamily != goarch.ARM64)
}
// fpTracebackPCs populates pcBuf with the return addresses for each frame and