-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/compile: avoid reading entire PGO profile just to check the header
isPreProfileFile reads the entire file into memory just to check the first few bytes, and then throws it all away. We can avoid this by just peeking at the beginning. For golang#58102. Change-Id: Id2c2844e5e44a2f3a9c7cdb9a027d94d26bdf71d Reviewed-on: https://go-review.googlesource.com/c/go/+/560035 Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Michael Pratt <mpratt@google.com>
- Loading branch information
Showing
1 changed file
with
33 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters