@rhysh requested issue #68542 to be considered for backport to the next 1.22 minor release.
@gopherbot please backport to Go 1.22. The impact is limited to local runs of
go tool trace
, but there's no workaround. And since the change only affectsgo tool trace
, it's relatively low risk.
Comment From: gopherbot
Change https://go.dev/cl/600255 mentions this issue: cmd/trace/v2: handle the -pprof flag
Comment From: gopherbot
Change https://go.dev/cl/600275 mentions this issue: cmd/trace/v2: make the -pprof actually useful
Comment From: dmitshur
This problem doesn't affect Go 1.21, only 1.22, because it's related to https://go.dev/doc/go1.22#trace changes, is that right?
Comment From: rhysh
That's how I understand it, yes.
With a trace generated by a go1.21.12 program, go tool trace -pprof=sched
works with go1.21.12, go1.22.5, and go1.23rc2.
With a trace generated by a go1.22.5 program, go tool trace -pprof=sched
works with go1.23rc2 but does not work with go1.22.5. (The format is too new for go1.21.12 to attempt to decode.)
So it's a problem with v2 traces (Go 1.22+) being read by the go1.22.x version of go tool trace
.
Comment From: dmitshur
We reviewed in a meeting and agreed to backport this. Thanks.
Comment From: gopherbot
Closed by merging CL 600255 (commit 2c88c1d59967e173053e97e51ab8c3e317108f63) to release-branch.go1.22
.