]> Cypherpunks.ru repositories - gostls13.git/commitdiff
Revert "cmd/compile: build compiler with PGO"
authorCherry Mui <cherryyz@google.com>
Tue, 16 May 2023 20:53:53 +0000 (20:53 +0000)
committerCherry Mui <cherryyz@google.com>
Tue, 16 May 2023 21:06:01 +0000 (21:06 +0000)
This reverts CL 451292.

Reason for revert: causes the racecompile builder failure.
https://build.golang.org/log/32d2fc21bd6e3bd415495d04befe806c0f10ea8b

Change-Id: I5863437d4b814712b1280a1c21ba86009c332645
Reviewed-on: https://go-review.googlesource.com/c/go/+/495475
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
src/cmd/compile/default.pgo [deleted file]
src/cmd/compile/profile.sh [deleted file]
src/cmd/dist/buildtool.go

diff --git a/src/cmd/compile/default.pgo b/src/cmd/compile/default.pgo
deleted file mode 100644 (file)
index 2ba7968..0000000
Binary files a/src/cmd/compile/default.pgo and /dev/null differ
diff --git a/src/cmd/compile/profile.sh b/src/cmd/compile/profile.sh
deleted file mode 100644 (file)
index 37d65d8..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-# Copyright 2023 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-# This script collects a CPU profile of the compiler
-# for building all targets in std and cmd, and puts
-# the profile at cmd/compile/default.pgo.
-
-dir=$(mktemp -d)
-cd $dir
-seed=$(date)
-
-for p in $(go list std cmd); do
-       h=$(echo $seed $p | md5sum | cut -d ' ' -f 1)
-       echo $p $h
-       go build -o /dev/null -gcflags=-cpuprofile=$PWD/prof.$h $p
-done
-
-go tool pprof -proto prof.* > $(go env GOROOT)/src/cmd/compile/default.pgo
-
-rm -r $dir
index 7ecfb3a811b0e83896accae9bc51ddd832ff909b..af3db5f59023bd9e99fdef6884cac49ca2c3de8d 100644 (file)
@@ -100,10 +100,6 @@ var ignorePrefixes = []string{
 var ignoreSuffixes = []string{
        "_test.s",
        "_test.go",
-       // Skip PGO profile. No need to build toolchain1 compiler
-       // with PGO. And as it is not a text file the import path
-       // rewrite will break it.
-       ".pgo",
 }
 
 var tryDirs = []string{