-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/trace/v2: pprof profiles always empty [1.22 backport] #68546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Change https://go.dev/cl/600255 mentions this issue: |
Change https://go.dev/cl/600275 mentions this issue: |
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? |
That's how I understand it, yes. With a trace generated by a go1.21.12 program, With a trace generated by a go1.22.5 program, So it's a problem with v2 traces (Go 1.22+) being read by the go1.22.x version of |
We reviewed in a meeting and agreed to backport this. Thanks. |
Turns out we ported all the profile generation, but forgot to actually support the command line flags for them! This change fixes the issue by handling the different kinds of profiles and writing them out to stdout. For #66782 For #68542 For #68546 Change-Id: I7756fb4636ce8daaf11ed471be79c86ce3d463cc Reviewed-on: https://go-review.googlesource.com/c/go/+/578318 Reviewed-by: Carlos Amedee <carlos@golang.org> Auto-Submit: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> (cherry picked from commit e14aad1) Reviewed-on: https://go-review.googlesource.com/c/go/+/600255 Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
In both the v1 and v2 cmd/trace, pprofMatchingGoroutines will generate no output at all if the filter name passed to it is the empty string. This is rather pointless because there are at least two places where we don't pass a name to filter. Modify pprofMatchingGoroutines to include *all* goroutines in the trace if the name to filter by is not specified. For #66782 Fixes #68542 Fixes #68546 Change-Id: I6b72298d676bc93892b075a7426e6e56bc6656c7 Reviewed-on: https://go-review.googlesource.com/c/go/+/578356 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Carlos Amedee <carlos@golang.org> Auto-Submit: Michael Knyszek <mknyszek@google.com> (cherry picked from commit d1f2cd8) Reviewed-on: https://go-review.googlesource.com/c/go/+/600275 Reviewed-by: Michael Knyszek <mknyszek@google.com> Auto-Submit: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
@rhysh requested issue #68542 to be considered for backport to the next 1.22 minor release.
The text was updated successfully, but these errors were encountered: