cmd/compile: adjust PGO devirtualization diagnostic message

Make it more consistent with the static devirtualization
diagnostic message. Keep the print of concrete callee's method
name, as it is clearer.

Change-Id: Ibe9b40253eaff2c0071353a2b388177213488822
Reviewed-on: https://go-review.googlesource.com/c/go/+/500960
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
This commit is contained in:
Cherry Mui 2023-06-05 16:36:38 -04:00
parent 26a90e4e36
commit 38e2376f35
2 changed files with 2 additions and 2 deletions

View File

@ -265,7 +265,7 @@ func constructCallStat(p *pgo.Profile, fn *ir.Func, name string, call *ir.CallEx
// concretetyp.
func rewriteCondCall(call *ir.CallExpr, curfn, callee *ir.Func, concretetyp *types.Type) ir.Node {
if base.Flag.LowerM != 0 {
fmt.Printf("%v: PGO devirtualizing call to %v\n", ir.Line(call), callee)
fmt.Printf("%v: PGO devirtualizing %v to %v\n", ir.Line(call), call.X, callee)
}
// We generate an OINCALL of:

View File

@ -68,7 +68,7 @@ go 1.19
got := make(map[devirtualization]struct{})
devirtualizedLine := regexp.MustCompile(`(.*): PGO devirtualizing call to (.*)`)
devirtualizedLine := regexp.MustCompile(`(.*): PGO devirtualizing .* to (.*)`)
scanner := bufio.NewScanner(pr)
for scanner.Scan() {