]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile/internal/pgo: allow and ignore profiles with no sample
authorCherry Mui <cherryyz@google.com>
Mon, 7 Nov 2022 21:46:28 +0000 (16:46 -0500)
committerCherry Mui <cherryyz@google.com>
Tue, 8 Nov 2022 18:10:34 +0000 (18:10 +0000)
commitefe541d4e53f0e229e7069adbdcedb7f0b117d8e
tree337f79625c2dc5ec18946f67e942f6ebd3d0b7c8
parent0409314db39db8f1d587fff31f79a24f1aa36ad2
cmd/compile/internal/pgo: allow and ignore profiles with no sample

Passing a profile with no sample is arguably not a user error.
Accept such a profile, and ignore it as it doesn't indicate any
optimizations. This also makes testing easier.

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