aboutsummaryrefslogtreecommitdiff
path: root/doc/next
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2024-02-29 16:23:03 -0500
committerGopher Robot <gobot@golang.org>2024-04-18 15:39:17 +0000
commit84fbdf01ffde21fcf0a5359d98a65dc6ee16f5a5 (patch)
tree8110a89b0e85ed739e2aaa3841ac4d2cc1255b76 /doc/next
parent081dc9fd8c9cf824f5caac3a03a1c8dfd86894c0 (diff)
downloadgo-84fbdf01ffde21fcf0a5359d98a65dc6ee16f5a5.tar.gz
go-84fbdf01ffde21fcf0a5359d98a65dc6ee16f5a5.zip
cmd/go: use cache for PGO preprocessing
This is the final CL in the series adding PGO preprocessing support to cmd/go. Now that the tool is hooked up, we integrate with the build cache to cache the result. This is fairly straightforward. One difference is that the compile and link do caching through updateBuildID. However, preprocessed PGO files don't have a build ID, so it doesn't make much sense to hack our way through that function when it is simple to just add to the cache ourselves. As as aside, we could add a build ID to the preproccessed file format, though it is not clear if it is worthwhile. The one place a build ID could be used is in buildActionID, which currently compute the file hash of the preprocessed profile. With a build ID it could simply read the build ID. This would save one complete read of the file per build (cmd/go caches the hash), but each compile process also reads the entire file, so this is a small change overall. Fixes #58102. Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest Change-Id: I86e2999a08ccd264230fbb1c983192259b7288e9 Reviewed-on: https://go-review.googlesource.com/c/go/+/569425 Auto-Submit: Michael Pratt <mpratt@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'doc/next')
-rw-r--r--doc/next/5-toolchain.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/next/5-toolchain.md b/doc/next/5-toolchain.md
index 0f4a816479..ce763f1b93 100644
--- a/doc/next/5-toolchain.md
+++ b/doc/next/5-toolchain.md
@@ -1,5 +1,9 @@
## Compiler {#compiler}
+The build time overhead to building with [Profile Guided Optimization](/doc/pgo) has been reduced significantly.
+Previously, large builds could see 100%+ build time increase from enabling PGO.
+In Go 1.23, overhead should be in the single digit percentages.
+
## Assembler {#assembler}
## Linker {#linker}