go: cmd/trace: port to v2 traces [freeze exception]
Tracking issue for updating cmd/trace for the v2 overhaul (https://github.com/golang/go/issues/60773) in CL 538515.
Main Viewer:
- Basic P Lanes with G slices
- Heap Metrics
- Thread Metrics
- Goroutine Metrics
- Trace Splitting
- GC Lane
- STW Events
- Proc Start/Stop Events
- Syscalls
- Flow Events
- focustask Filter
- taskid Filter
- goid Filter (Plus some refactoring work.)
- Network Lane
- GWaitingGC State
- CPU Samples
- Add
totalDuration
arg for blocking syscalls (nice-to-have, see comment)
Sub-Pages:
- PPROF (CL 541999)
- MMU (CL 541258)
- Goroutine Analysis (CL 541257)
- Tasks (CL 542077)
- Regions (CL 542077)
cc @mknyszek
About this issue
- Original URL
- State: closed
- Created 8 months ago
- Comments: 23 (4 by maintainers)
Commits related to this issue
- internal/trace: implement MutatorUtilizationV2 This change adds a new MutatorUtilization for traces for Go 1.22+. To facilitate testing, it also generates a short trace with the gc-stress.go test pr... — committed to golang/go by mknyszek 8 months ago
- internal/trace: implement goroutine analysis for v2 traces For #63960. Change-Id: I1efe35435e32623aba894a915114e394570ebc56 Reviewed-on: https://go-review.googlesource.com/c/go/+/540259 Reviewed-by:... — committed to golang/go by mknyszek 8 months ago
- internal/trace/v2: disable cgo callback test if cgo is not available For #63960. Change-Id: I3d8d1567c4ee213e2ffd2bd91d0ffae9c4c42b92 Reviewed-on: https://go-review.googlesource.com/c/go/+/541535 Re... — committed to golang/go by mknyszek 8 months ago
- cmd/trace: add almost full support for v2 traces in the trace viewer This change refactors the cmd/trace package and adds most of the support for v2 traces. The following features of note are missin... — committed to golang/go by mknyszek 8 months ago
- 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... — committed to golang/go by mknyszek 8 months ago
- cmd/trace: common up the mmu page and add it to cmd/trace/v2 This change moves the MMU HTTP handlers and functionality into the traceviewer package, since unlike the goroutine pages the vast majority... — committed to golang/go by mknyszek 8 months ago
- internal/trace/traceviewer: make the mmu handler more self-contained The last change made the MMU rendering code common and introduced a new API, but it was kind of messy. Part of the problem was tha... — committed to golang/go by mknyszek 8 months ago
- cmd/trace: refactor pprof HTTP SVG serving into traceviewer For #60773. For #63960. Change-Id: Id97380f19267ec765b25a703ea3e2f284396ad75 Reviewed-on: https://go-review.googlesource.com/c/go/+/541998... — committed to golang/go by mknyszek 8 months ago
- cmd/trace/v2: add support for pprof endpoints This change adds support for the pprof endpoints to cmd/trace/v2. In the process, I realized we need to pass the goroutine summaries to more places, and... — committed to golang/go by mknyszek 8 months ago
- internal/trace/v2: redefine NoTask and add BackgroundTask The v2 trace parser currently handles task inheritance and region task association incorrectly. It assumes that a TaskID of 0 means that ther... — committed to golang/go by mknyszek 7 months ago
- internal/trace: add task analysis for v2 traces For v1 traces, cmd/trace contains code for analyzing tasks separately from the goroutine analysis code present in internal/trace. As I started to look ... — committed to golang/go by mknyszek 8 months ago
- cmd/trace: factor out durationHistogram This code will be useful for the new tracer, and there's no need to duplicate it. This change copies it to internal/trace/traceviewer, adds some comments, and ... — committed to golang/go by mknyszek 8 months ago
- cmd/trace/v2: add support for task and region endpoints This change fills out the last of cmd/trace's subpages for v2 traces by adding support for task and region endpoints. For #60773. For #63960. ... — committed to golang/go by mknyszek 8 months ago
- 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-gorout... — committed to golang/go by mknyszek 7 months ago
- cmd/trace/v2: add support for a task-oriented procs-based view This change implements support for the trace?focustask=<taskid> endpoint in the trace tool for v2 traces. Note: the one missing feature... — committed to golang/go by mknyszek 7 months ago
- cmd/trace/v2: add thread-oriented mode for v2 traces This is a nice-to-have that's now straightforward to do with the new trace format. This change adds a new query variable passed to the /trace endp... — committed to golang/go by mknyszek 7 months ago
- cmd/trace/v2: add support for the goroutine-oriented task view This change adds support for a goroutine-oriented task view via the /trace?taskid=<taskid> endpoint. This works but it's missing regions... — committed to golang/go by mknyszek 7 months ago
- doc: add release notes for the new execution tracer For #60773. For #62627. For #63960. For #61422. Change-Id: I3c933f7522f65cd36d11d38a268556d92c8053f9 Reviewed-on: https://go-review.googlesource.... — committed to golang/go by mknyszek 7 months ago
Syscall rendering now works. Instead of rendering them as instant events, they are now rendered as slices. For example:
For blocking syscalls, only the time they are executing on a P (before sysmon declares them “blocking”) is displayed on the P lane. The Arg label “blocked” indicates that the syscall got blocked:
While typing this I realize that it might be nice to display the
totalDuration
of blocked syscalls. I added it as a nice-to-have item in the list above.