]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/pgo: error parsing profile (for pgo) after scaling
authorRyan Diep <ryandiep5@gmail.com>
Fri, 28 Nov 2025 08:27:09 +0000 (03:27 -0500)
committerGopher Robot <gobot@golang.org>
Fri, 23 Jan 2026 16:26:16 +0000 (08:26 -0800)
commita1150b5017b789c6dc22d2c3939f7df10baf3dff
tree285a3972c20ad9740e846871c2b320e6dd7e2d0e
parent6b7206feb2df3116bd5c471813353ffec1ff25fe
cmd/compile/internal/pgo: error parsing profile (for pgo) after scaling

If a valid profile is scaled such that the samples/counts become 0,
an empty graph in which the compiler complain that we never saw a start line
since the graph has no nodes which is a misleading error message.

src/cmd/internal/pgo/pprof.go was modified to check if the graph is empty
return an empty profile.

GitHub-Pull-Request: golang/go#73640
Change-Id: If3f7ab8af6fcf77b2e29ae1df154f87bee377ab0
Reviewed-on: https://go-review.googlesource.com/c/go/+/725120
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Auto-Submit: Michael Pratt <mpratt@google.com>
src/cmd/compile/internal/test/pgo_inl_test.go
src/cmd/internal/pgo/pprof.go