go icon indicating copy to clipboard operation
go copied to clipboard

cmd/compile: update compiler's PGO profile

Open cherrymui opened this issue 2 years ago • 11 comments

CL https://golang.org/cl/451292 adds a default profile of the compiler, so we can build the compiler with PGO. As the compiler's source code evolves, we may want to periodically update the profile.

cc @prattmic @aclements

cherrymui avatar May 16 '23 20:05 cherrymui

We discussed this in the release team meeting today. The plan is to add this as a relui step, to be performed as part of creating rc1. We can also run the step as a one-off if necessary (e.g., after any major compiler refactoring).

Ideally we can shrink the profile a little. Currently it's ~350K, which is just big enough to be a little annoying to update regularly in git.

cc @golang/release

aclements avatar May 23 '23 19:05 aclements

We should discuss whether to try to get it done for this cycle. On the one hand it's not very necessary, but on the other it might be best to strike while the iron is hot.

heschi avatar May 23 '23 19:05 heschi

Ideally we can shrink the profile a little

When I did it I put GOROOT in /tmp so the file paths are short. We could probably also trim cold nodes from the profile to reduce size.

cherrymui avatar Jun 01 '23 16:06 cherrymui

Change https://go.dev/cl/546337 mentions this issue: cmd/compile: update PGO profile

gopherbot avatar Dec 02 '23 21:12 gopherbot

Change https://go.dev/cl/587195 mentions this issue: cmd/compile: update PGO profile

gopherbot avatar May 22 '24 02:05 gopherbot

@cherrymui With CL 587195 submitted now, do you expect we might want to do another update before RC 1? When we're confident there's nothing more to do for Go 1.23 milestone, let's move this to the next. Thanks.

At this point it might help to separate out work on making relui do this automatically into a dedicated x/build/cmd/relui issue, since that can happen independently of the Go release cycle.

dmitshur avatar May 24 '24 20:05 dmitshur

Currently I'm not expecting another update, but I can doublecheck before the RC, in case there are some more changes in the compiler.

cherrymui avatar May 24 '24 20:05 cherrymui

Change https://go.dev/cl/634037 mentions this issue: cmd/compile: update default PGO profile

gopherbot avatar Dec 05 '24 16:12 gopherbot

Change https://go.dev/cl/677375 mentions this issue: cmd/compile: update default PGO profile

gopherbot avatar May 29 '25 19:05 gopherbot

At this point it might help to separate out work on making relui do this automatically into a dedicated x/build/cmd/relui issue, since that can happen independently of the Go release cycle.

Made #74104 for the relui task.

dmitshur avatar Jun 11 '25 15:06 dmitshur

Change https://go.dev/cl/728121 mentions this issue: cmd/compile: update default PGO profile

gopherbot avatar Dec 08 '25 16:12 gopherbot