Skip to content

Commit d2b3c1a

Browse files
felixgegopherbot
authored andcommitted
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 <[email protected]> Reviewed-by: David Chase <[email protected]> Auto-Submit: Michael Knyszek <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent f63e12d commit d2b3c1a

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/internal/trace/event.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,6 @@ func (e Event) StateTransition() StateTransition {
625625
s = goStateTransition(GoID(e.base.args[0]), GoRunnable, GoRunning)
626626
case tracev2.EvGoDestroy:
627627
s = goStateTransition(e.ctx.G, GoRunning, GoNotExist)
628-
s.Stack = e.Stack() // This event references the resource the event happened on.
629628
case tracev2.EvGoDestroySyscall:
630629
s = goStateTransition(e.ctx.G, GoSyscall, GoNotExist)
631630
case tracev2.EvGoStop:
@@ -646,10 +645,8 @@ func (e Event) StateTransition() StateTransition {
646645
s.Stack = e.Stack() // This event references the resource the event happened on.
647646
case tracev2.EvGoSyscallEnd:
648647
s = goStateTransition(e.ctx.G, GoSyscall, GoRunning)
649-
s.Stack = e.Stack() // This event references the resource the event happened on.
650648
case tracev2.EvGoSyscallEndBlocked:
651649
s = goStateTransition(e.ctx.G, GoSyscall, GoRunnable)
652-
s.Stack = e.Stack() // This event references the resource the event happened on.
653650
case tracev2.EvGoStatus, tracev2.EvGoStatusStack:
654651
packedStatus := e.base.args[2]
655652
from, to := packedStatus>>32, packedStatus&((1<<32)-1)

0 commit comments

Comments
 (0)