Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../lib/golang/src/cmd/compile
File: profile.sh
# Copyright 2023 The Go Authors. All rights reserved.
[0] Fix | Delete
# Use of this source code is governed by a BSD-style
[1] Fix | Delete
# license that can be found in the LICENSE file.
[2] Fix | Delete
[3] Fix | Delete
# This script collects a CPU profile of the compiler
[4] Fix | Delete
# for building all targets in std and cmd, and puts
[5] Fix | Delete
# the profile at cmd/compile/default.pgo.
[6] Fix | Delete
[7] Fix | Delete
dir=$(mktemp -d)
[8] Fix | Delete
cd $dir
[9] Fix | Delete
seed=$(date)
[10] Fix | Delete
[11] Fix | Delete
for p in $(go list std cmd); do
[12] Fix | Delete
h=$(echo $seed $p | md5sum | cut -d ' ' -f 1)
[13] Fix | Delete
echo $p $h
[14] Fix | Delete
go build -o /dev/null -gcflags=-cpuprofile=$PWD/prof.$h $p
[15] Fix | Delete
done
[16] Fix | Delete
[17] Fix | Delete
go tool pprof -proto prof.* > $(go env GOROOT)/src/cmd/compile/default.pgo
[18] Fix | Delete
[19] Fix | Delete
rm -r $dir
[20] Fix | Delete
[21] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function