]> Cypherpunks repositories - gostls13.git/commit
cmd/trace/v2: add goroutine analysis pages
authorMichael Anthony Knyszek <mknyszek@google.com>
Sun, 12 Nov 2023 21:48:31 +0000 (21:48 +0000)
committerMichael Knyszek <mknyszek@google.com>
Tue, 21 Nov 2023 21:27:34 +0000 (21:27 +0000)
commit48a6362dff840cfe75d5f1a674157af1f5d9ee85
tree8043360f6f38f467982bd0c5322614a512406177
parent351d8520a6e55cbadc1714ad62405699ee172c5e
cmd/trace/v2: add goroutine analysis pages

This is a complete fork and most of a rewrite of the goroutine analysis
pages for v2 traces. It fixes an issue with the old page where GC time
didn't really make any sense, generalizes the page and breaks things
down further, and adds clarifying text.

This change also modifies the SummarizeGoroutines API to not stream the
trace. This is unfortunate, but we're already reading and holding the
entire trace in memory for the trace viewer. We can revisit this
decision in the future. Also, we want to do this now because the
GoroutineSummary holds on to pointers to events, and these events will
be used by the user region and user task analyses. While tracev2 events
are values and they should be equivalent no matter how many times we
parse a trace, this lets us reference the event in the slice directly.

For #60773.
For #63960.
Fixes #62443.

Change-Id: I1c5ab68141869378843f4f2826686038e4533090
Reviewed-on: https://go-review.googlesource.com/c/go/+/541257
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/trace/v2/goroutines.go [new file with mode: 0644]
src/cmd/trace/v2/main.go
src/internal/trace/goroutinesv2.go
src/internal/trace/goroutinesv2_test.go
src/internal/trace/traceviewer/http.go