aboutsummaryrefslogtreecommitdiff
path: root/src/internal/trace
diff options
context:
space:
mode:
authorFelix Geisendörfer <felix.geisendoerfer@datadoghq.com>2025-07-06 17:16:10 +0200
committerGopher Robot <gobot@golang.org>2025-08-12 11:42:13 -0700
commitd2b3c1a5045437233ca6a8adc7e36293cd73655a (patch)
tree3baea511ca7c43f20f7097772fac5d183bf861b9 /src/internal/trace
parentf63e12d0e0f4533af54550d6d049a836fb738147 (diff)
downloadgo-d2b3c1a5045437233ca6a8adc7e36293cd73655a.tar.xz
internal/trace: clarify which StateTransition events have stacks
Clarify that EvGoDestroy, EvGoSyscallEnd and EvGoSyscallEndBlocked do not have a stack trace by removing the code that tries to assign an empty stack. Change-Id: I6a6a696479ac7f753b3c6f6f48d8b9b67f6e3b95 Reviewed-on: https://go-review.googlesource.com/c/go/+/694621 Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: David Chase <drchase@google.com> Auto-Submit: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/internal/trace')
-rw-r--r--src/internal/trace/event.go3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/internal/trace/event.go b/src/internal/trace/event.go
index f9c40010c4..efc9ae5093 100644
--- a/src/internal/trace/event.go
+++ b/src/internal/trace/event.go
@@ -625,7 +625,6 @@ func (e Event) StateTransition() StateTransition {
s = goStateTransition(GoID(e.base.args[0]), GoRunnable, GoRunning)
case tracev2.EvGoDestroy:
s = goStateTransition(e.ctx.G, GoRunning, GoNotExist)
- s.Stack = e.Stack() // This event references the resource the event happened on.
case tracev2.EvGoDestroySyscall:
s = goStateTransition(e.ctx.G, GoSyscall, GoNotExist)
case tracev2.EvGoStop:
@@ -646,10 +645,8 @@ func (e Event) StateTransition() StateTransition {
s.Stack = e.Stack() // This event references the resource the event happened on.
case tracev2.EvGoSyscallEnd:
s = goStateTransition(e.ctx.G, GoSyscall, GoRunning)
- s.Stack = e.Stack() // This event references the resource the event happened on.
case tracev2.EvGoSyscallEndBlocked:
s = goStateTransition(e.ctx.G, GoSyscall, GoRunnable)
- s.Stack = e.Stack() // This event references the resource the event happened on.
case tracev2.EvGoStatus, tracev2.EvGoStatusStack:
packedStatus := e.base.args[2]
from, to := packedStatus>>32, packedStatus&((1<<32)-1)