aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2023-01-09 13:59:54 -0500
committerMichael Pratt <mpratt@google.com>2023-01-09 21:50:54 +0000
commit64519baf3802f96a813f3f35e87aefa30a5f5f73 (patch)
tree77d1ef16021b0fe5bd221aa92bc3d214f3127ea0
parent376076f3c6bed06f5256a316af8f1eed53a1135e (diff)
downloadgo-64519baf3802f96a813f3f35e87aefa30a5f5f73.tar.gz
go-64519baf3802f96a813f3f35e87aefa30a5f5f73.zip
cmd/compile/internal/pgo: add hint to missing start_line error
Profiles only began adding Function.start_line in 1.20. If it is missing, add a hint to the error message that they may need to profile a build of the application built with a newer version of the toolchain. Technically profiles are not required to come from Go itself (e.g., they could be converted from perf), but in practice they most likely are. Fixes #57674. Change-Id: I87eca126d3fed0cff94bbb8dd748bd4652f88b12 Reviewed-on: https://go-review.googlesource.com/c/go/+/461195 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Run-TryBot: Michael Pratt <mpratt@google.com>
-rw-r--r--src/cmd/compile/internal/pgo/irgraph.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/pgo/irgraph.go b/src/cmd/compile/internal/pgo/irgraph.go
index 311f20ed81..bf11e365f1 100644
--- a/src/cmd/compile/internal/pgo/irgraph.go
+++ b/src/cmd/compile/internal/pgo/irgraph.go
@@ -217,7 +217,7 @@ func (p *Profile) processprofileGraph(g *Graph) bool {
// TODO(prattic): If Function.start_line is missing we could
// fall back to using absolute line numbers, which is better
// than nothing.
- log.Fatal("PGO profile missing Function.start_line data")
+ log.Fatal("PGO profile missing Function.start_line data (Go version of profiled application too old? Go 1.20+ automatically adds this to profiles)")
}
return true