]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: report profile open/parse errors
authorMichael Pratt <mpratt@google.com>
Thu, 9 Mar 2023 17:10:25 +0000 (12:10 -0500)
committerGopher Robot <gobot@golang.org>
Thu, 9 Mar 2023 17:47:01 +0000 (17:47 +0000)
commitafbcf2138cb5f95d829f0a556ce3aaf77627cc32
tree4e105be6909a37e8082d4f314cce52ee29164796
parent71c84d4b4149bebc2abcc495ef744e1a010a18e7
cmd/compile: report profile open/parse errors

Currently we fail to print errors from os.Open and profile.Parse of the
PGO profile, losing context useful to understand these errors.

In fixing this, cleanup error use overall to return an error from
pgo.New and report the problematic file at the top level.

Change-Id: Id7e9c781c4b8520eee96b6f5fe8a0b757d947f7f
Reviewed-on: https://go-review.googlesource.com/c/go/+/474995
Auto-Submit: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
src/cmd/compile/internal/gc/main.go
src/cmd/compile/internal/pgo/irgraph.go