]> Cypherpunks repositories - gostls13.git/commit
cmd/trace/v2,internal/trace: use correct frame for identifying goroutines
authorNick Ripley <nick.ripley@datadoghq.com>
Wed, 7 Feb 2024 16:43:05 +0000 (11:43 -0500)
committerMichael Knyszek <mknyszek@google.com>
Fri, 9 Feb 2024 16:30:09 +0000 (16:30 +0000)
commita51713103b5769a792b691e313254b7806855fa6
tree8e36470ec58b21c3de3e56c37bc0ab6c791f5a9e
parent2057ad02bd8387378a2d1fd637e955e126f698bf
cmd/trace/v2,internal/trace: use correct frame for identifying goroutines

To determine the identity of a goroutine for displaying in the trace UI,
we should use the root frame from a call stack. This will be the
starting function for the goroutine and is the same for each call stack
from a given goroutine. The new tracer no longer includes starting PCs
for goroutines which existed at the start of tracing, so we can't use a
PC for grouping together goroutines any more. Instead, we just use the
name of the entry function for grouping.

Fixes #65574

Change-Id: I5324653316f1acf0ab90c30680f181060ea45dd7
Reviewed-on: https://go-review.googlesource.com/c/go/+/562455
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/trace/v2/goroutines.go
src/cmd/trace/v2/pprof.go
src/internal/trace/summary.go
src/internal/trace/summary_test.go