]> Cypherpunks repositories - gostls13.git/commit
cmd/trace/v2: add support for goroutine filtering
authorMichael Anthony Knyszek <mknyszek@google.com>
Sat, 18 Nov 2023 05:50:50 +0000 (05:50 +0000)
committerMichael Knyszek <mknyszek@google.com>
Tue, 21 Nov 2023 21:29:43 +0000 (21:29 +0000)
commit64c12bafea06144c0d4e3f3bee80171021800903
tree2edc0744a8a1effc99060c074810a1ff283969d4
parent71052169be2d4de14f2e93ea6ba9811b54434bc3
cmd/trace/v2: add support for goroutine filtering

This change adds support for the trace?goid=<goid> endpoint to the trace
tool for v2 traces.

In effect, this change actually implements a per-goroutine view. I tried
to add a link to the main page to enable a "view by goroutines" view
without filtering, but the web trace viewer broke the browser tab when
there were a few hundred goroutines. The risk of a browser hang probably
isn't worth the cases where this is nice, especially since filtering by
goroutine already works. Unfortunate, but c'est l'vie. Might be worth
revisiting if we change out the web viewer in the future.

For #60773.
For #63960.

Change-Id: I8e29f4ab8346af6708fd8824505c30f2c43db796
Reviewed-on: https://go-review.googlesource.com/c/go/+/543595
TryBot-Bypass: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
src/cmd/trace/v2/goroutinegen.go [new file with mode: 0644]
src/cmd/trace/v2/jsontrace.go
src/cmd/trace/v2/main.go
src/internal/trace/summary.go
src/internal/trace/summary_test.go