]> Cypherpunks repositories - gostls13.git/log
gostls13.git
2 years agocmd/dist: add doc comments to some functions
Austin Clements [Thu, 13 Oct 2022 14:54:11 +0000 (10:54 -0400)]
cmd/dist: add doc comments to some functions

I keep having to reconstruct how dist test's command system works.
This CL documents the main functions to help with this.

Change-Id: Ic1102496d3c7f356e73f3fa2ea76498251f525d4
Reviewed-on: https://go-review.googlesource.com/c/go/+/448799
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2 years agotesting: in TestRacyOutput, ensure that the Run calls complete before cleanup
Bryan C. Mills [Wed, 16 Nov 2022 15:17:17 +0000 (10:17 -0500)]
testing: in TestRacyOutput, ensure that the Run calls complete before cleanup

Also tweak the failure message added in CL 352349.

Updates #18741.
Updates #48515.

Change-Id: I46ed84c6f498d7a68414cc3dab3c1cd55da69aa9
Reviewed-on: https://go-review.googlesource.com/c/go/+/451215
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Changkun Ou <mail@changkun.de>
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

2 years agocmd/dist: add curiously missing GOOS/GOARCH combinations
Austin Clements [Fri, 4 Nov 2022 18:58:40 +0000 (14:58 -0400)]
cmd/dist: add curiously missing GOOS/GOARCH combinations

The cmd/dist cgo_test enumerates a large number of platforms in
various special cases. Some combinations are suspiciously absent. This
CL completes the combinations.

I've confirmed using trybots that the newly-enabled tests pass on
android/* (this is not surprising because the gohostos is never
"android" anyway), windows/arm64, linux/ppc64 (no cgo), linux/loong64
(except for one test, filed #56623), linux/mips*, netbsd/arm (except
for one test, filed #56629), and netbsd/arm64. The windows/arm builder
is out to lunch, so I'm assuming that works. Since netbsd/arm and
arm64 mostly passed these tests, I've also enabled them on netbsd/386
and netbsd/amd64, where they seem to work fine as well.

Preparation for #37486.

Change-Id: I04c3348e4f422d74d51e714647ca3db379e6e919
Reviewed-on: https://go-review.googlesource.com/c/go/+/448016
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Austin Clements <austin@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2 years agonet: remove unused goLookupHost method
Mateusz Poliwczak [Wed, 16 Nov 2022 11:18:32 +0000 (11:18 +0000)]
net: remove unused goLookupHost method

Change-Id: I62b9d0dcbec647fdd3279d78b9999dd933ff0bbd
GitHub-Last-Rev: f83db66c935dd7a14128d1e87c9323539e9d2d16
GitHub-Pull-Request: golang/go#56758
Reviewed-on: https://go-review.googlesource.com/c/go/+/451135
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Joedian Reid <joedian@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>

2 years agogo/types, types2: ensure invalid generic types are marked as invalid
Robert Findley [Thu, 10 Nov 2022 00:16:39 +0000 (19:16 -0500)]
go/types, types2: ensure invalid generic types are marked as invalid

When detecting invalid types, we may detect cycles through instances.
Ensure that the uninstantiated origin type is also marked invalid.

Fixes #56665

Change-Id: Id67653bcb072ac80161dea07d0ced566e61564a8
Reviewed-on: https://go-review.googlesource.com/c/go/+/449275
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
2 years agotesting: reject calls to Run within Cleanup callbacks
Changkun Ou [Mon, 27 Sep 2021 09:37:56 +0000 (11:37 +0200)]
testing: reject calls to Run within Cleanup callbacks

Calling t.Run inside t.Cleanup can mess up the execution order of
registered Cleanup callbacks. Reject calls to Run within Cleanup
callbacks.

Fixes #48515

Change-Id: I61e4cb35253db1a8bbe3351d59055433030aa289
Reviewed-on: https://go-review.googlesource.com/c/go/+/352349
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Joedian Reid <joedian@golang.org>
Run-TryBot: Changkun Ou <mail@changkun.de>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
2 years agointernal/goroot: report PkgfileMap error on invalid line
Tobias Klauser [Tue, 15 Nov 2022 11:26:11 +0000 (12:26 +0100)]
internal/goroot: report PkgfileMap error on invalid line

Ref. https://go-review.googlesource.com/c/go/+/442303/comment/7caca6eb_0ebe4d51/

Change-Id: Id351b9c25380f0959453bb84ed123d0e784e4866
Reviewed-on: https://go-review.googlesource.com/c/go/+/450595
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Joedian Reid <joedian@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>

2 years agocrypto/x509: add support for PKCS8/PKIX X25519 key encodings
Filippo Valsorda [Tue, 15 Nov 2022 17:43:56 +0000 (18:43 +0100)]
crypto/x509: add support for PKCS8/PKIX X25519 key encodings

This specifically doesn't add support for X25519 certificates.
Refactored parsePublicKey not to depend on the public PublicKeyAlgorithm
values, and ParseCertificate/ParseCertificateRequest to ignore keys that
don't have a PublicKeyAlgorithm even if parsePublicKey supports them.

Updates #56088

Change-Id: I2274deadfe9bb592e3547c0d4d48166de1006df0
Reviewed-on: https://go-review.googlesource.com/c/go/+/450815
Reviewed-by: Roland Shoemaker <roland@golang.org>
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Joedian Reid <joedian@golang.org>
Auto-Submit: Filippo Valsorda <filippo@golang.org>

2 years agocrypto/ecdh: move ECDH method to PrivateKey
Filippo Valsorda [Mon, 14 Nov 2022 11:13:46 +0000 (12:13 +0100)]
crypto/ecdh: move ECDH method to PrivateKey

Fixes #56052

Change-Id: Icacba0ed0f77519bca2140c8af68407af97f9734
Reviewed-on: https://go-review.googlesource.com/c/go/+/450335
Run-TryBot: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Joedian Reid <joedian@golang.org>
Auto-Submit: Filippo Valsorda <filippo@golang.org>

2 years agotest: fix noinit on noopt builder
Russ Cox [Wed, 16 Nov 2022 05:02:14 +0000 (00:02 -0500)]
test: fix noinit on noopt builder

Fix noopt build break from CL 450136 by not running test.

I can't reproduce the failure locally, but it's entirely reasonable
for this test to fail when optimizations are disabled, so just don't
run it when optimizations are disabled.

Change-Id: I882760fc7373ba0449379f81d295312a6be49be1
Reviewed-on: https://go-review.googlesource.com/c/go/+/450740
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Michael Stapelberg <stapelberg@google.com>
Auto-Submit: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>

2 years agocmd/compile: handle simple inlined calls in staticinit
Russ Cox [Sun, 13 Nov 2022 14:22:35 +0000 (09:22 -0500)]
cmd/compile: handle simple inlined calls in staticinit

Global variable initializers like

var myErr error = &myError{"msg"}

have been converted to statically initialized data
from the earliest days of Go: there is no init-time
execution or allocation for that line of code.

But if the expression is moved into an inlinable function,
the static initialization no longer happens.
That is, this code has always executed and allocated
at init time, even after we added inlining to the compiler,
which should in theory make this code equivalent to
the original:

func NewError(s string) error { return &myError{s} }
var myErr2 = NewError("msg")

This CL makes the static initialization rewriter understand
inlined functions consisting of a single return statement,
like in this example, so that myErr2 can be implemented as
statically initialized data too, just like myErr, with no init-time
execution or allocation.

A real example of code that benefits from this rewrite is
all globally declared errors created with errors.New, like

package io
var EOF = errors.New("EOF")

Package io no longer has to allocate and initialize EOF each
time a program starts.

Another example of code that benefits is any globally declared
godebug setting (using the API from CL 449504), like

package http
var http2server = godebug.New("http2server")

These are no longer allocated and initialized at program startup either.

The list of functions that are inlined into static initializers when
compiling std and cmd (along with how many times each occurs) is:

cmd/compile/internal/ssa.StringToAux (3)
cmd/compile/internal/walk.mkmapnames (4)
errors.New (360)
go/ast.NewIdent (1)
go/constant.MakeBool (4)
go/constant.MakeInt64 (3)
image.NewUniform (4)
image/color.ModelFunc (11)
internal/godebug.New (12)
vendor/golang.org/x/text/unicode/bidi.newBidiTrie (1)
vendor/golang.org/x/text/unicode/norm.newNfcTrie (1)
vendor/golang.org/x/text/unicode/norm.newNfkcTrie (1)

For the cmd/go binary, this CL cuts the number of init-time
allocations from about 1920 to about 1620 (a 15% reduction).

The total executable code footprint of init functions is reduced
by 24kB, from 137kB to 113kB (an 18% reduction).
The overall binary size is reduced by 45kB,
from 15.335MB to 15.290MB (a 0.3% reduction).
(The binary size savings is larger than the executable code savings
because every byte of executable code also requires corresponding
runtime tables for unwinding, source-line mapping, and so on.)

Also merge test/sinit_run.go, which had stopped testing anything
at all as of CL 161337 (Feb 2019) and initempty.go into a new test
noinit.go.

Fixes #30820.

Change-Id: I52f7275b1ac2a0a32e22c29f9095071c7b1fac20
Reviewed-on: https://go-review.googlesource.com/c/go/+/450136
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Joedian Reid <joedian@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Auto-Submit: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>

2 years agocmd/compile: do not emit a few more basic types from every compilation
Russ Cox [Sat, 12 Nov 2022 17:27:33 +0000 (12:27 -0500)]
cmd/compile: do not emit a few more basic types from every compilation

We already emit types for any and func(error) string in runtime.a
but unlike the other pre-emitted types, we don't then exclude them
from being emitted in other packages. Fix that.

Also add slices of non-func types that we already emit.

Saves 0.3% of .a files in std cmd deps, computed by adding sizes from:

ls -l $(go list -export -f '{{.Export}}' -deps std cmd

The effect is small and not worth doing on its own.
The real improvement is making “what to write always in runtime”
and “what not to write in other packages” more obviously aligned.

Change-Id: Ie5cb5fd7e5a3025d2776d9b4cece775fdf92d3b6
Reviewed-on: https://go-review.googlesource.com/c/go/+/450135
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Keith Randall <khr@google.com>
2 years agodoc/go1.20: document new sync.Map methods
Bryan C. Mills [Tue, 15 Nov 2022 22:07:00 +0000 (17:07 -0500)]
doc/go1.20: document new sync.Map methods

For #51972.

Change-Id: I86dcd8abc3b62e20b524541327af2cc891cb251d
Reviewed-on: https://go-review.googlesource.com/c/go/+/450797
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>

2 years agocmd/compile: be more careful about pointer incrementing in range loops
Keith Randall [Fri, 11 Nov 2022 23:30:10 +0000 (15:30 -0800)]
cmd/compile: be more careful about pointer incrementing in range loops

For range loops, we use a pointer to the backing store that gets
incremented on each iteration of the loop.

The problem with this scheme is that at the end of the last iteration,
we may briefly have a pointer that points past the end of the backing store
of the slice that is being iterated over. We cannot let the garbage collector
see that pointer.

To fix this problem, have the incremented pointer live briefly as
a uintptr instead of a normal pointer, so it doesn't keep anything
alive. Convert back to a normal pointer just after the loop condition
is checked, but before anything that requires a real pointer representation
(in practice, any call, which is what could cause a GC scan or stack copy).

Fixes #56699

Change-Id: Ia928d23f85a211565357603668bea4e5c534f989
Reviewed-on: https://go-review.googlesource.com/c/go/+/449995
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
2 years agocrypto/rsa: return err when key too small to compute salt for RSA PSS
Roland Shoemaker [Tue, 15 Nov 2022 19:57:10 +0000 (11:57 -0800)]
crypto/rsa: return err when key too small to compute salt for RSA PSS

When PSSSaltLengthAuto is passed to SignPSS, and the key size is too
small to create a valid salt, return ErrMessageTooLong

Change-Id: I4e0d70bdd54fcd667eae10e0a70b4f540a4ebe93
Reviewed-on: https://go-review.googlesource.com/c/go/+/450796
Reviewed-by: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Roland Shoemaker <roland@golang.org>

2 years agocmd/addr2line: use the test binary as 'addr2line' instead of rebuilding it twice
Bryan C. Mills [Tue, 15 Nov 2022 16:06:03 +0000 (11:06 -0500)]
cmd/addr2line: use the test binary as 'addr2line' instead of rebuilding it twice

This not only reduces the latency of the test, but also respects
build flags like '-race' and '-cover' passed to the 'go test' command.

Change-Id: Ie9a3c03d32d7eea268ba6f8f8ac4000539434052
Reviewed-on: https://go-review.googlesource.com/c/go/+/450713
Auto-Submit: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2 years agocmd/addr2line: use testenv.Command instead of exec.Command in tests
Bryan C. Mills [Tue, 15 Nov 2022 14:48:39 +0000 (09:48 -0500)]
cmd/addr2line: use testenv.Command instead of exec.Command in tests

testenv.Command sets a default based on the test\'s deadline
and sends SIGQUIT (where supported) in case of a hang.

Change-Id: I6710d9866c16610310347d50be1c0916c2976e87
Reviewed-on: https://go-review.googlesource.com/c/go/+/450712
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>

2 years agocmd/vet: use testenv.Command instead of exec.Command in tests
Bryan C. Mills [Tue, 15 Nov 2022 15:53:41 +0000 (10:53 -0500)]
cmd/vet: use testenv.Command instead of exec.Command in tests

testenv.Command sets a default timeout based on the test's deadline
and sends SIGQUIT (where supported) in case of a hang.

Change-Id: I973be280cd0a7f495b491bfb0e04771389562e04
Reviewed-on: https://go-review.googlesource.com/c/go/+/450711
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>

2 years agocmd/vet: use the test binary as 'vet' instead of rebuilding it
Bryan C. Mills [Tue, 15 Nov 2022 15:51:11 +0000 (10:51 -0500)]
cmd/vet: use the test binary as 'vet' instead of rebuilding it

This not only reduces the latency of the test, but also respects
build flags like '-race' and '-cover' passed to the 'go test' command.

Change-Id: I4914870396f90097f45d00012e5601fe42655899
Reviewed-on: https://go-review.googlesource.com/c/go/+/450710
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
2 years agocmd/pprof: use testenv.Command instead of exec.Command in tests
Bryan C. Mills [Tue, 15 Nov 2022 15:47:46 +0000 (10:47 -0500)]
cmd/pprof: use testenv.Command instead of exec.Command in tests

testenv.Command sets a default timeout based on the test's deadline
and sends SIGQUIT (where supported) in case of a hang.

Change-Id: Iabd114dd23b85da524e7ea8415f2bbf2c54b380f
Reviewed-on: https://go-review.googlesource.com/c/go/+/450709
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>

2 years agocmd/pprof: use the test binary as 'pprof' instead of rebuilding it
Bryan C. Mills [Tue, 15 Nov 2022 15:47:00 +0000 (10:47 -0500)]
cmd/pprof: use the test binary as 'pprof' instead of rebuilding it

This not only reduces the latency of the test, but also respects
build flags like '-race' and '-cover' passed to the 'go test' command.

Change-Id: Icdf256420c4dce2da7a187513b7dd08393b76146
Reviewed-on: https://go-review.googlesource.com/c/go/+/450708
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>

2 years agocmd/pack: use testenv.Command instead of exec.Command in tests
Bryan C. Mills [Tue, 15 Nov 2022 15:45:00 +0000 (10:45 -0500)]
cmd/pack: use testenv.Command instead of exec.Command in tests

testenv.Command sets a default timeout based on the test's deadline
and sends SIGQUIT (where supported) in case of a hang.

Change-Id: Ia1dd1bacfa2c9378401bbce304ebf7ee3f159352
Reviewed-on: https://go-review.googlesource.com/c/go/+/450707
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2 years agocmd/pack: use the test binary as 'pack' instead of rebuilding it
Bryan C. Mills [Tue, 15 Nov 2022 15:44:36 +0000 (10:44 -0500)]
cmd/pack: use the test binary as 'pack' instead of rebuilding it

This not only reduces the latency of the test, but also respects
build flags like '-race' and '-cover' passed to the 'go test' command.

Change-Id: Ifaf396465f54ad0a28977b6c0a4b87dbc359de37
Reviewed-on: https://go-review.googlesource.com/c/go/+/450706
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

2 years agogo/internal/gcimporter: backport flattenImports optimization
Matthew Dempsky [Tue, 15 Nov 2022 19:08:03 +0000 (11:08 -0800)]
go/internal/gcimporter: backport flattenImports optimization

Backport of go.dev/cl/450755 from the x/tools importer.

Change-Id: Ia9a2cc038d589a4cde1b31f74484a5f88dabeef9
Reviewed-on: https://go-review.googlesource.com/c/go/+/450795
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Florian Zenker <floriank@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

2 years agocmd/objdump: use testenv.Command instead of exec.Command in tests
Bryan C. Mills [Tue, 15 Nov 2022 15:38:07 +0000 (10:38 -0500)]
cmd/objdump: use testenv.Command instead of exec.Command in tests

testenv.Command sets a default timeout based on the test's deadline
and sends SIGQUIT (where supported) in case of a hang.

Change-Id: I1965ea453af6aa9eeae9669065deb0b372dc6caf
Reviewed-on: https://go-review.googlesource.com/c/go/+/450705
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2 years agocmd/objdump: use the test binary as 'objdump' instead of rebuilding it
Bryan C. Mills [Tue, 15 Nov 2022 15:37:22 +0000 (10:37 -0500)]
cmd/objdump: use the test binary as 'objdump' instead of rebuilding it

This not only reduces the latency of the test, but also respects
build flags like '-race' and '-cover' passed to the 'go test' command.

Change-Id: Icd22062ab75964a74d011c81ea6c99be80bece18
Reviewed-on: https://go-review.googlesource.com/c/go/+/450704
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

2 years agocmd/nm: use the test binary as 'nm' instead of rebuilding it
Bryan C. Mills [Tue, 15 Nov 2022 15:30:10 +0000 (10:30 -0500)]
cmd/nm: use the test binary as 'nm' instead of rebuilding it

This not only reduces the latency of the test, but also respects
build flags like '-race' and '-cover' passed to the 'go test' command.

Change-Id: Iffdc60d444a9ff1d4ff5e688bca1c2ef0dfa03c8
Reviewed-on: https://go-review.googlesource.com/c/go/+/450703
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
2 years agocmd/link: use testenv.Command instead of exec.Command in tests
Bryan C. Mills [Tue, 15 Nov 2022 15:21:21 +0000 (10:21 -0500)]
cmd/link: use testenv.Command instead of exec.Command in tests

testenv.Command sets a default timeout based on the test's deadline
and sends SIGQUIT (where supported) in case of a hang.

Change-Id: I25a67aa5793c6fa977ff6d4dc59ca1533bf58d41
Reviewed-on: https://go-review.googlesource.com/c/go/+/450702
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>

2 years agocmd/internal/goobj: use testenv.Command instead of exec.Command in tests
Bryan C. Mills [Tue, 15 Nov 2022 15:14:41 +0000 (10:14 -0500)]
cmd/internal/goobj: use testenv.Command instead of exec.Command in tests

testenv.Command sets a default timeout based on the test's deadline
and sends SIGQUIT (where supported) in case of a hang.

Change-Id: I464dc34b50f3360123aca9e8666df9799c15e457
Reviewed-on: https://go-review.googlesource.com/c/go/+/450701
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2 years agocmd/internal/archive: use testenv.Command instead of exec.Command in tests
Bryan C. Mills [Tue, 15 Nov 2022 15:14:28 +0000 (10:14 -0500)]
cmd/internal/archive: use testenv.Command instead of exec.Command in tests

testenv.Command sets a default timeout based on the test's deadline
and sends SIGQUIT (where supported) in case of a hang.

Change-Id: I6f8391da50e74919ccc59cd43ccae99affab8798
Reviewed-on: https://go-review.googlesource.com/c/go/+/450700
Auto-Submit: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

2 years agocmd/internal/obj: use testenv.Command instead of exec.Command in tests
Bryan C. Mills [Tue, 15 Nov 2022 15:14:16 +0000 (10:14 -0500)]
cmd/internal/obj: use testenv.Command instead of exec.Command in tests

testenv.Command sets a default timeout based on the test's deadline
and sends SIGQUIT (where supported) in case of a hang.

Change-Id: Ica1a9985f9abb1935434367c9c8ba28fc50f331d
Reviewed-on: https://go-review.googlesource.com/c/go/+/450699
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>

2 years agocmd/internal/moddeps: use testenv.Command instead of exec.Command in tests
Bryan C. Mills [Tue, 15 Nov 2022 15:11:08 +0000 (10:11 -0500)]
cmd/internal/moddeps: use testenv.Command instead of exec.Command in tests

testenv.Command sets a default timeout based on the test's deadline
and sends SIGQUIT (where supported) in case of a hang.

Change-Id: Ia18c323067a416381e5a70d08c50f51576054a79
Reviewed-on: https://go-review.googlesource.com/c/go/+/450698
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

2 years agocmd/go: use testenv.Command instead of exec.Command in tests
Bryan C. Mills [Tue, 15 Nov 2022 15:08:11 +0000 (10:08 -0500)]
cmd/go: use testenv.Command instead of exec.Command in tests

testenv.Command sets a default timeout based on the test's deadline
and sends SIGQUIT (where supported) in case of a hang.

Change-Id: Ic19172b6cd05526cf6776b904e2dfebdd8b055a8
Reviewed-on: https://go-review.googlesource.com/c/go/+/450697
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2 years agocmd/compile: use testenv.Command instead of exec.Command in tests
Bryan C. Mills [Tue, 15 Nov 2022 14:57:01 +0000 (09:57 -0500)]
cmd/compile: use testenv.Command instead of exec.Command in tests

testenv.Command sets a default timeout based on the test's deadline
and sends SIGQUIT (where supported) in case of a hang.

Change-Id: I084b324a20d5ecf733b2cb95f160947a7410a805
Reviewed-on: https://go-review.googlesource.com/c/go/+/450696
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>

2 years agocmd/cover: use testenv.Command instead of exec.Command
Bryan C. Mills [Tue, 15 Nov 2022 14:48:07 +0000 (09:48 -0500)]
cmd/cover: use testenv.Command instead of exec.Command

testenv.Command sets a default timeout based on the test's deadline
and sends SIGQUIT (where supported) in case of a hang.

Change-Id: Ic19f8b020f6d410942bb2ece8a3b71607ee6488a
Reviewed-on: https://go-review.googlesource.com/c/go/+/450695
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

2 years agogo: use testenv.Command instead of exec.Command in tests
Bryan C. Mills [Tue, 15 Nov 2022 14:37:11 +0000 (09:37 -0500)]
go: use testenv.Command instead of exec.Command in tests

This may help to diagnose whether the hang observed in
https://build.golang.org/log/d03db1d27515a4f7e91502e8b58bc83f6e2c04be
is related to #56180.

Updates #56180.
Updates #54773.

Change-Id: I81d37e55a35f876905ceabc103fcf0d1ff348e2f
Reviewed-on: https://go-review.googlesource.com/c/go/+/450615
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>

2 years agonet: rewrite nsswitch.conf parsing to work like other parsers
Ian Lance Taylor [Tue, 8 Nov 2022 23:08:48 +0000 (15:08 -0800)]
net: rewrite nsswitch.conf parsing to work like other parsers

Seems simpler than having two different parsing mechanisms.

Change-Id: I4f8468bc025f8e03f59ec9c79b17721581b64eed
Reviewed-on: https://go-review.googlesource.com/c/go/+/448855
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Joedian Reid <joedian@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>

2 years agocrypto/rsa: fix loop variable capture in test
Cherry Mui [Tue, 15 Nov 2022 18:56:48 +0000 (13:56 -0500)]
crypto/rsa: fix loop variable capture in test

Should fix builds.

Change-Id: I309eccec8d08931b1ef8fee9327a08a97c6bf871
Reviewed-on: https://go-review.googlesource.com/c/go/+/450738
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2 years agocmd/compile: add testing-flag guard to package-is-collected assert
David Chase [Wed, 2 Nov 2022 21:23:47 +0000 (17:23 -0400)]
cmd/compile: add testing-flag guard to package-is-collected assert

On advice of the department of garbage collection, forcing a garbage
collection generally does not improve performance. However,
this-data-is-now-unreachable is a good property to be able to test,
and that requires finalizers and a forced GC. So, to save build time,
this test was removed from the compiler itself, but to verify the
property, it was added to the fma_test (and the end-to-end dependence
on the flag was tested with an inserted failure in testing the
test).

TODO: also turn on the new -d=gccheck=1 debug flag on the ssacheck
builder.

Benchmarking reveals that it is profitable to avoid this GC,
with about 1.5% reduction in both user and wall time.

(48 p) https://perf.golang.org/search?q=upload:20221103.3
(12 p) https://perf.golang.org/search?q=upload:20221103.5

Change-Id: I4c4816d619735838a32388acf0cc5eb1cd5f0db5
Reviewed-on: https://go-review.googlesource.com/c/go/+/447359
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
2 years agosync/atomic: allow linked list of atomic pointers again
Russ Cox [Tue, 15 Nov 2022 14:54:39 +0000 (09:54 -0500)]
sync/atomic: allow linked list of atomic pointers again

For #56603, CL 448275 added a _ [0]T field to atomic.Pointer,
so that different kinds of atomic.Pointer are not convertible.

Unfortunately, that breaks code like:

type List struct {
Next atomic.Pointer[List]
}

which should be valid, just as using Next *List is valid.
Instead, we get:

./atomic_test.go:2533:6: invalid recursive type List
./atomic_test.go:2533:6: List refers to
./atomic_test.go:2534:13: "sync/atomic".Pointer refers to
./atomic_test.go:2533:6: List

Fix by using _[0]*T instead.

Change-Id: Icc4c83c691d35961d20cb14b824223d6c779ac5e
Reviewed-on: https://go-review.googlesource.com/c/go/+/450655
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2 years agocrypto/x509: Reallow duplicate attributes in CSRs.
Rob Stradling [Tue, 6 Sep 2022 16:30:31 +0000 (17:30 +0100)]
crypto/x509: Reallow duplicate attributes in CSRs.

Change-Id: I3fb4331c2b1b6adafbac3e76eaf66c79cd5ef56f
Reviewed-on: https://go-review.googlesource.com/c/go/+/428636
Run-TryBot: Roland Shoemaker <roland@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Auto-Submit: Roland Shoemaker <roland@golang.org>

2 years agosync: add new Map method Swap, CompareAndSwap, CompareAndDelete
Changkun Ou [Tue, 20 Sep 2022 06:30:58 +0000 (08:30 +0200)]
sync: add new Map method Swap, CompareAndSwap, CompareAndDelete

name                                                   time/op
SwapCollision/*sync_test.DeepCopyMap-8                  235ns ± 0%
SwapCollision/*sync_test.RWMutexMap-8                   145ns ± 0%
SwapCollision/*sync.Map-8                               153ns ± 0%
SwapMostlyHits/*sync_test.DeepCopyMap-8                48.2µs ± 0%
SwapMostlyHits/*sync_test.RWMutexMap-8                  190ns ± 0%
SwapMostlyHits/*sync.Map-8                             28.3ns ± 0%
SwapMostlyMisses/*sync_test.DeepCopyMap-8               681ns ± 0%
SwapMostlyMisses/*sync_test.RWMutexMap-8                336ns ± 0%
SwapMostlyMisses/*sync.Map-8                            523ns ± 0%
CompareAndSwapCollision/*sync_test.DeepCopyMap-8       3.99ns ± 0%
CompareAndSwapCollision/*sync_test.RWMutexMap-8         151ns ± 0%
CompareAndSwapCollision/*sync.Map-8                    21.6ns ± 0%
CompareAndSwapNoExistingKey/*sync_test.DeepCopyMap-8   3.95ns ± 0%
CompareAndSwapNoExistingKey/*sync_test.RWMutexMap-8     126ns ± 0%
CompareAndSwapNoExistingKey/*sync.Map-8                6.11ns ± 0%
CompareAndSwapValueNotEqual/*sync_test.DeepCopyMap-8   2.15ns ± 0%
CompareAndSwapValueNotEqual/*sync_test.RWMutexMap-8     132ns ± 0%
CompareAndSwapValueNotEqual/*sync.Map-8                5.32ns ± 0%
CompareAndSwapMostlyHits/*sync_test.RWMutexMap-8        219ns ± 0%
CompareAndSwapMostlyHits/*sync.Map-8                   27.1ns ± 0%
CompareAndSwapMostlyMisses/*sync_test.DeepCopyMap-8    13.0ns ± 0%
CompareAndSwapMostlyMisses/*sync_test.RWMutexMap-8      147ns ± 0%
CompareAndSwapMostlyMisses/*sync.Map-8                 19.6ns ± 0%
CompareAndDeleteCollision/*sync_test.DeepCopyMap-8     2.23ns ± 0%
CompareAndDeleteCollision/*sync_test.RWMutexMap-8       131ns ± 0%
CompareAndDeleteCollision/*sync.Map-8                  16.2ns ± 0%
CompareAndDeleteMostlyHits/*sync_test.RWMutexMap-8      367ns ± 0%
CompareAndDeleteMostlyHits/*sync.Map-8                 33.1ns ± 0%
CompareAndDeleteMostlyMisses/*sync_test.DeepCopyMap-8  8.75ns ± 0%
CompareAndDeleteMostlyMisses/*sync_test.RWMutexMap-8    134ns ± 0%
CompareAndDeleteMostlyMisses/*sync.Map-8               10.9ns ± 0%

name                                                   alloc/op
SwapCollision/*sync_test.DeepCopyMap-8                   336B ± 0%
SwapCollision/*sync_test.RWMutexMap-8                   0.00B
SwapCollision/*sync.Map-8                               16.0B ± 0%
SwapMostlyHits/*sync_test.DeepCopyMap-8                82.1kB ± 0%
SwapMostlyHits/*sync_test.RWMutexMap-8                  12.0B ± 0%
SwapMostlyHits/*sync.Map-8                              28.0B ± 0%
SwapMostlyMisses/*sync_test.DeepCopyMap-8                713B ± 0%
SwapMostlyMisses/*sync_test.RWMutexMap-8                23.0B ± 0%
SwapMostlyMisses/*sync.Map-8                             129B ± 0%
CompareAndSwapCollision/*sync_test.DeepCopyMap-8        0.00B
CompareAndSwapCollision/*sync_test.RWMutexMap-8         0.00B
CompareAndSwapCollision/*sync.Map-8                     3.00B ± 0%
CompareAndSwapNoExistingKey/*sync_test.DeepCopyMap-8    8.00B ± 0%
CompareAndSwapNoExistingKey/*sync_test.RWMutexMap-8     8.00B ± 0%
CompareAndSwapNoExistingKey/*sync.Map-8                 8.00B ± 0%
CompareAndSwapValueNotEqual/*sync_test.DeepCopyMap-8    0.00B
CompareAndSwapValueNotEqual/*sync_test.RWMutexMap-8     0.00B
CompareAndSwapValueNotEqual/*sync.Map-8                 0.00B
CompareAndSwapMostlyHits/*sync_test.RWMutexMap-8        18.0B ± 0%
CompareAndSwapMostlyHits/*sync.Map-8                    33.0B ± 0%
CompareAndSwapMostlyMisses/*sync_test.DeepCopyMap-8     24.0B ± 0%
CompareAndSwapMostlyMisses/*sync_test.RWMutexMap-8      23.0B ± 0%
CompareAndSwapMostlyMisses/*sync.Map-8                  23.0B ± 0%
CompareAndDeleteCollision/*sync_test.DeepCopyMap-8      0.00B
CompareAndDeleteCollision/*sync_test.RWMutexMap-8       0.00B
CompareAndDeleteCollision/*sync.Map-8                   0.00B
CompareAndDeleteMostlyHits/*sync_test.RWMutexMap-8      23.0B ± 0%
CompareAndDeleteMostlyHits/*sync.Map-8                  39.0B ± 0%
CompareAndDeleteMostlyMisses/*sync_test.DeepCopyMap-8   16.0B ± 0%
CompareAndDeleteMostlyMisses/*sync_test.RWMutexMap-8    15.0B ± 0%
CompareAndDeleteMostlyMisses/*sync.Map-8                15.0B ± 0%

name                                                   allocs/op
SwapCollision/*sync_test.DeepCopyMap-8                   2.00 ± 0%
SwapCollision/*sync_test.RWMutexMap-8                    0.00
SwapCollision/*sync.Map-8                                1.00 ± 0%
SwapMostlyHits/*sync_test.DeepCopyMap-8                  4.00 ± 0%
SwapMostlyHits/*sync_test.RWMutexMap-8                   1.00 ± 0%
SwapMostlyHits/*sync.Map-8                               2.00 ± 0%
SwapMostlyMisses/*sync_test.DeepCopyMap-8                6.00 ± 0%
SwapMostlyMisses/*sync_test.RWMutexMap-8                 2.00 ± 0%
SwapMostlyMisses/*sync.Map-8                             6.00 ± 0%
CompareAndSwapCollision/*sync_test.DeepCopyMap-8         0.00
CompareAndSwapCollision/*sync_test.RWMutexMap-8          0.00
CompareAndSwapCollision/*sync.Map-8                      0.00
CompareAndSwapNoExistingKey/*sync_test.DeepCopyMap-8     1.00 ± 0%
CompareAndSwapNoExistingKey/*sync_test.RWMutexMap-8      0.00
CompareAndSwapNoExistingKey/*sync.Map-8                  1.00 ± 0%
CompareAndSwapValueNotEqual/*sync_test.DeepCopyMap-8     0.00
CompareAndSwapValueNotEqual/*sync_test.RWMutexMap-8      0.00
CompareAndSwapValueNotEqual/*sync.Map-8                  0.00
CompareAndSwapMostlyHits/*sync_test.RWMutexMap-8         2.00 ± 0%
CompareAndSwapMostlyHits/*sync.Map-8                     3.00 ± 0%
CompareAndSwapMostlyMisses/*sync_test.DeepCopyMap-8      2.00 ± 0%
CompareAndSwapMostlyMisses/*sync_test.RWMutexMap-8       2.00 ± 0%
CompareAndSwapMostlyMisses/*sync.Map-8                   2.00 ± 0%
CompareAndDeleteCollision/*sync_test.DeepCopyMap-8       0.00
CompareAndDeleteCollision/*sync_test.RWMutexMap-8        0.00
CompareAndDeleteCollision/*sync.Map-8                    0.00
CompareAndDeleteMostlyHits/*sync_test.RWMutexMap-8       2.00 ± 0%
CompareAndDeleteMostlyHits/*sync.Map-8                   3.00 ± 0%
CompareAndDeleteMostlyMisses/*sync_test.DeepCopyMap-8    2.00 ± 0%
CompareAndDeleteMostlyMisses/*sync_test.RWMutexMap-8     1.00 ± 0%
CompareAndDeleteMostlyMisses/*sync.Map-8                 1.00 ± 0%

Fixes #51972

Change-Id: I469e71033592997832c3e8ebdad1b8950a70c99c
Reviewed-on: https://go-review.googlesource.com/c/go/+/399094
Run-TryBot: Changkun Ou <mail@changkun.de>
Reviewed-by: Joedian Reid <joedian@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
2 years agocmd/compile: fix missing typecheck for static initialization slice
Cuong Manh Le [Mon, 14 Nov 2022 16:11:30 +0000 (23:11 +0700)]
cmd/compile: fix missing typecheck for static initialization slice

CL 440455 fixed missing walk pass for static initialization slice.
However, slicelit may produce un-typechecked node, thus we need to do
typecheck for sinit before calling walkStmtList.

Fixes #56727

Change-Id: I40730cebcd09f2be4389d71c5a90eb9a060e4ab7
Reviewed-on: https://go-review.googlesource.com/c/go/+/450215
Reviewed-by: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Keith Randall <khr@google.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>

2 years agoruntime: clarify finalizer semantics for tiny objects
Changkun Ou [Mon, 26 Jul 2021 12:23:26 +0000 (14:23 +0200)]
runtime: clarify finalizer semantics for tiny objects

This change clarifies that a finalizer is not guaranteed to run,
not only for zero bytes objects but also tiny objects (< 16bytes).

Fixes #46827

Change-Id: I193e77f6f024c79110604f86bcb1a28b16cf98ec
Reviewed-on: https://go-review.googlesource.com/c/go/+/337391
Run-TryBot: Changkun Ou <mail@changkun.de>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Joedian Reid <joedian@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2 years agocrypto/rsa: add a test walking through every key size
Filippo Valsorda [Sat, 15 Oct 2022 10:06:48 +0000 (12:06 +0200)]
crypto/rsa: add a test walking through every key size

We already had some tests for special cases such as PSS with 513 bit
keys. The upcoming backend rewrite also happened to crash at 63 and 504
bits for different reasons. Might as well be systematic about it.

Also, make sure SignPSS returns ErrMessageTooLong like SignPKCS1v15 when
the key is too small, instead of panicking or returning an unnamed error.

-all takes a couple minutes on my M1.

Change-Id: I656239a00d0831fa7d187a6d3bb30341d41602f7
Reviewed-on: https://go-review.googlesource.com/c/go/+/443195
Reviewed-by: Roland Shoemaker <roland@golang.org>
Run-TryBot: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Joedian Reid <joedian@golang.org>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>

2 years agoruntime/pprof: scale mutex profile samples when they are recorded
Nick Ripley [Wed, 12 Oct 2022 14:05:51 +0000 (10:05 -0400)]
runtime/pprof: scale mutex profile samples when they are recorded

Samples in the mutex profile have their count and duration scaled
according to the probability they were sampled. This is done when the
profile is actually requested. The adjustment is done using to the
current configured sampling rate. However, if the sample rate is changed
after a specific sample is recorded, then the sample will be scaled
incorrectly. In particular, if the sampling rate is changed to 0, all of
the samples in the encoded profile will have 0 count and duration. This
means the profile will be "empty", even if it should have had samples.

This CL scales the samples in the profile when they are recorded, rather
than when the profile is requested. This matches what is currently done
for the block profile.

With this change, neither the block profile nor mutex profile are scaled
when they are encoded, so the logic for scaling the samples can be
removed.

Change-Id: If228cf39284385aa8fb9a2d62492d839e02f027f
Reviewed-on: https://go-review.googlesource.com/c/go/+/443056
Auto-Submit: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Joedian Reid <joedian@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2 years agodoc/go1.20: add release notes for net/http and net/http/httputil
Damien Neil [Tue, 15 Nov 2022 00:28:57 +0000 (16:28 -0800)]
doc/go1.20: add release notes for net/http and net/http/httputil

For #41773
For #41773
For #50465
For #51914
For #53002
For #53896
For #53960
For #54136
For #54299

Change-Id: I729d5eafc1940d5706f980882a08ece1f69bb42c
Reviewed-on: https://go-review.googlesource.com/c/go/+/450515
Auto-Submit: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Damien Neil <dneil@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2 years agodoc/go1.20: add release notes for archive/zip, encoding/binary, mime
Damien Neil [Mon, 14 Nov 2022 20:35:19 +0000 (12:35 -0800)]
doc/go1.20: add release notes for archive/zip, encoding/binary, mime

For #48866
For #54139
For #54801

Change-Id: Iafe72ccc7e756ec1edb5bb7e8e90d385458cff29
Reviewed-on: https://go-review.googlesource.com/c/go/+/450280
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Damien Neil <dneil@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2 years agodoc/go1.20: add a release note for multiple error wrapping
Damien Neil [Mon, 14 Nov 2022 20:20:17 +0000 (12:20 -0800)]
doc/go1.20: add a release note for multiple error wrapping

For #53435.

Change-Id: I894bd645b0b61d7dd5f3aae7d1ea7b8a12f31dd8
Reviewed-on: https://go-review.googlesource.com/c/go/+/450376
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2 years agocmd/compile: remove manually implemented popcount in _gen/main.go
Jorropo [Sun, 13 Nov 2022 19:41:58 +0000 (20:41 +0100)]
cmd/compile: remove manually implemented popcount in _gen/main.go

Change-Id: I7b4da26bace15c2b632c2dbfe56cc2799bbfdb02
Reviewed-on: https://go-review.googlesource.com/c/go/+/450058
Reviewed-by: Martin Möhrmann <moehrmann@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Run-TryBot: Keith Randall <khr@golang.org>

2 years agocmd/pprof: debug TestDisasm
Cherry Mui [Mon, 14 Nov 2022 21:34:16 +0000 (16:34 -0500)]
cmd/pprof: debug TestDisasm

If pprof -disasm fails, print the profile content for debugging.

For #56574.

Change-Id: I5d9377b7fb80f6b85317bc53f3ebb18f70c2f06d
Reviewed-on: https://go-review.googlesource.com/c/go/+/450281
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
2 years agoruntime: make GC see object as allocated after it is initialized
Cherry Mui [Wed, 9 Nov 2022 15:55:54 +0000 (10:55 -0500)]
runtime: make GC see object as allocated after it is initialized

When the GC is scanning some memory (possibly conservatively),
finding a pointer, while concurrently another goroutine is
allocating an object at the same address as the found pointer, the
GC may see the pointer before the object and/or the heap bits are
initialized. This may cause the GC to see bad pointers and
possibly crash.

To prevent this, we make it that the scanner can only see the
object as allocated after the object and the heap bits are
initialized. Currently the allocator uses freeindex to find the
next available slot, and that code is coupled with updating the
free index to a new slot past it. The scanner also uses the
freeindex to determine if an object is allocated. This is somewhat
racy. This CL makes the scanner use a different field, which is
only updated after the object initialization (and a memory
barrier).

Fixes #54596.

Change-Id: I2a57a226369926e7192c253dd0d21d3faf22297c
Reviewed-on: https://go-review.googlesource.com/c/go/+/449017
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

2 years agonet: use a consistent dnsConfig in hostLookupOrder
Mateusz Poliwczak [Mon, 14 Nov 2022 20:50:02 +0000 (20:50 +0000)]
net: use a consistent dnsConfig in hostLookupOrder

Use the same dnsConfig throughout a DNS lookup operation.
Before this CL it was possible to decide to re-read a
modified resolv.conf file during the DNS lookup,
which could lead to inconsistencies between the lookup order
and the name server list.

Change-Id: I0689749272b8263268d00b9a9cb4458cd68b23eb
GitHub-Last-Rev: 64810a22bc8a7dd5e804b5f5253d11b73942dfe3
GitHub-Pull-Request: golang/go#56690
Reviewed-on: https://go-review.googlesource.com/c/go/+/449337
Reviewed-by: Damien Neil <dneil@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>

2 years agocmd/vet: enable timeformat analyzer
Tim King [Mon, 14 Nov 2022 22:56:13 +0000 (14:56 -0800)]
cmd/vet: enable timeformat analyzer

Fixes #48801

Change-Id: I6230b62f77252a9a694b79caacb38ef15af36e39
Reviewed-on: https://go-review.googlesource.com/c/go/+/450495
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Tim King <taking@google.com>

2 years agocmd: update vendored golang.org/x/tools for loopclosure improvements
Tim King [Mon, 14 Nov 2022 21:07:36 +0000 (13:07 -0800)]
cmd: update vendored golang.org/x/tools for loopclosure improvements

Updates vet to report errors where a loop variable escapes the current
loop iteration by a call to testing.T.Run where the subtest body invokes
t.Parallel().

Change-Id: I727f01d0cdd479ff1b5b1e4f1872c530bfefb263
Reviewed-on: https://go-review.googlesource.com/c/go/+/450435
Run-TryBot: Tim King <taking@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

2 years agocrypto/rsa: improve benchmarks
Filippo Valsorda [Mon, 19 Sep 2022 13:33:49 +0000 (15:33 +0200)]
crypto/rsa: improve benchmarks

Change-Id: Idee03a0c3e4bdb7d6b495f567db8bd644af480e5
Reviewed-on: https://go-review.googlesource.com/c/go/+/433476
Run-TryBot: Filippo Valsorda <filippo@golang.org>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
2 years agonet/url, net/http/httputil: accept invalid percent encodings
Ian Lance Taylor [Mon, 14 Nov 2022 20:02:23 +0000 (12:02 -0800)]
net/url, net/http/httputil: accept invalid percent encodings

Per https://url.spec.whatwg.org/#percent-encoded-bytes an invalid
percent encoding should be handled as ordinary text.

Fixes #56732

Change-Id: Ib0259dfd704922905289eebaacbf722e28f6d636
Reviewed-on: https://go-review.googlesource.com/c/go/+/450375
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>

2 years agoRevert "runtime: delay incrementing freeindex in malloc"
Michael Knyszek [Fri, 11 Nov 2022 18:34:18 +0000 (18:34 +0000)]
Revert "runtime: delay incrementing freeindex in malloc"

This reverts commit bed2b7cf41471e1521af5a83ae28bd643eb3e038.

Reason for revert: I clicked submit by accident on the wrong CL.

Change-Id: Iddf128cb62f289d472510eb30466e515068271b2
Reviewed-on: https://go-review.googlesource.com/c/go/+/449501
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>

2 years agocrypto/x509: remove unused member Raw from certificate
Alexander Scheel [Wed, 2 Nov 2022 11:44:41 +0000 (11:44 +0000)]
crypto/x509: remove unused member Raw from certificate

As noticed in the review of the CRL RawIssuer updates (https://go-review.googlesource.com/c/go/+/418834), the Raw field on the internal type certificate of crypto/x509 is unused and could be removed.

From looking at encoding/asn1's implementation, it appears this field would be set on unmarshal but not during marshaling. However, we unmarshal into the x509.Certificate class directly, avoiding this internal class entirely.

Change-Id: I1ab592eb939b6fe701206ba77b6727763deaeaf0
GitHub-Last-Rev: 5272e0d369ae1b9fee350c2731a6084f41011724
GitHub-Pull-Request: golang/go#56524
Reviewed-on: https://go-review.googlesource.com/c/go/+/447215
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Joedian Reid <joedian@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
Auto-Submit: Roland Shoemaker <roland@golang.org>

2 years agoruntime,cmd/internal/obj/x86: use TEB TLS slots on windows/amd64
qmuntal [Mon, 19 Sep 2022 10:19:38 +0000 (12:19 +0200)]
runtime,cmd/internal/obj/x86: use TEB TLS slots on windows/amd64

This CL redesign how we get the TLS pointer on windows/amd64.

We were previously reading it from the [TEB] arbitrary data slot,
located at 0x28(GS), which can only hold 1 TLS pointer.

With this CL, we will read the TLS pointer from the TEB TLS slot array,
located at 0x1480(GS). The TLS slot array can hold multiple
TLS pointers, up to 64, so multiple Go runtimes running on the
same thread can coexists with different TLS.

Each new TLS slot has to be allocated via [TlsAlloc],
which returns the slot index. This index can then be used to get the
slot offset from GS with the following formula: 0x1480 + index*8

The slot index is fixed per Go runtime, so we can store it
in runtime.tls_g and use it latter on to read/update the TLS pointer.

Loading the TLS pointer requires the following asm instructions:

  MOVQ runtime.tls_g, AX
  MOVQ AX(GS), AX

Notice that this approach is also implemented on windows/arm64.

[TEB]: https://en.wikipedia.org/wiki/Win32_Thread_Information_Block
[TlsAlloc]: https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-tlsalloc

Updates #22192

Change-Id: Idea7119fd76a3cd083979a4d57ed64b552fa101b
Reviewed-on: https://go-review.googlesource.com/c/go/+/431775
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Quim Muntal <quimmuntal@gmail.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2 years agoos,syscall: File.Stat to use file handle for directories on Windows
qmuntal [Tue, 10 May 2022 07:52:20 +0000 (09:52 +0200)]
os,syscall: File.Stat to use file handle for directories on Windows

Updates syscall.Open to support opening directories via CreateFileW.

CreateFileW handles are more versatile than FindFirstFile handles.
They can be used in Win32 APIs like GetFileInformationByHandle and
SetFilePointerEx, which are needed by some Go APIs.

Fixes #52747
Fixes #36019

Change-Id: I26a00cef9844fb4abeeb18d2f9d854162a146651
Reviewed-on: https://go-review.googlesource.com/c/go/+/405275
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Patrik Nyblom <pnyb@google.com>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Quim Muntal <quimmuntal@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

2 years agocmd/compile: merge zero constant ISEL in PPC64 lateLower pass
Paul E. Murphy [Wed, 12 Oct 2022 19:02:38 +0000 (14:02 -0500)]
cmd/compile: merge zero constant ISEL in PPC64 lateLower pass

Add a new SSA opcode ISELZ, similar to ISELB to represent a select
of value or 0. Then, merge candidate ISEL opcodes inside the late
lower pass.

This avoids complicating rules within the the lower pass.

Change-Id: I3b14c94b763863aadc834b0e910a85870c131313
Reviewed-on: https://go-review.googlesource.com/c/go/+/442596
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Paul Murphy <murp@ibm.com>
Reviewed-by: Joedian Reid <joedian@golang.org>
2 years agoos: don't request read access from CreateFile in Stat
Damien Neil [Mon, 14 Nov 2022 18:21:51 +0000 (10:21 -0800)]
os: don't request read access from CreateFile in Stat

CL 448897 changed os.Stat to request GENERIC_READ access when using
CreateFile to examine a file. This is unnecessary; access flags of 0
will permit examining file metadata even if the file isn't readable.
Revert to the old behavior here.

For #56217

Change-Id: I09220b3bbee304bd89f4a94ec9b0af42042b7773
Reviewed-on: https://go-review.googlesource.com/c/go/+/450296
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Run-TryBot: Quim Muntal <quimmuntal@gmail.com>

2 years agodoc/go1.20: add a release note for (*testing.B).Elapsed
Bryan C. Mills [Wed, 9 Nov 2022 16:19:21 +0000 (11:19 -0500)]
doc/go1.20: add a release note for (*testing.B).Elapsed

Updates #43620.

Change-Id: If2b6f37d79c055ca5799071bf70fcc9d12b8a2a0
Reviewed-on: https://go-review.googlesource.com/c/go/+/449077
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

2 years agodoc/go1.20: add release notes for cmd/go changes
Bryan C. Mills [Wed, 9 Nov 2022 15:45:50 +0000 (10:45 -0500)]
doc/go1.20: add release notes for cmd/go changes

Updates #41696.
Updates #50332.
Updates #41583.

Change-Id: I99e96a2996f14da262570a5cb5273dcdce45df2b
Reviewed-on: https://go-review.googlesource.com/c/go/+/449075
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>

2 years agocrypto/x509: expand package docs and clarify package target
Filippo Valsorda [Fri, 30 Oct 2020 15:40:27 +0000 (16:40 +0100)]
crypto/x509: expand package docs and clarify package target

Fixes #26624

Change-Id: Ifab3fc2209d71b9a7de383eaa5786b7446de25fa
Reviewed-on: https://go-review.googlesource.com/c/go/+/266541
Reviewed-by: Roland Shoemaker <roland@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Auto-Submit: Roland Shoemaker <roland@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>

2 years agodoc/go1.20: add TODOs found by x/build/cmd/relnote
Russ Cox [Mon, 14 Nov 2022 18:11:54 +0000 (13:11 -0500)]
doc/go1.20: add TODOs found by x/build/cmd/relnote

Change-Id: Id1e7cf8f088fa39d177a001e97c93cd660d0b3c6
Reviewed-on: https://go-review.googlesource.com/c/go/+/450256
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2 years agocrypto/aes: rewrite ppc64le asm-cbc routine
Paul E. Murphy [Thu, 24 Mar 2022 17:06:27 +0000 (12:06 -0500)]
crypto/aes: rewrite ppc64le asm-cbc routine

This loads the keys once per call, not once per block. This
has the effect of unrolling the inner loop too. This allows
decryption to scale better with available hardware.

Noteably, encryption serializes crypto ops, thus no
performance improvement is seen, but neither is it reduced.

Care is also taken to explicitly clear keys from registers
as was done implicitly in the prior version.

Also, fix a couple of typos from copying the asm used to
load ESPERM.

Performance delta on POWER9:

name             old time/op    new time/op    delta
AESCBCEncrypt1K    1.10µs ± 0%    1.10µs ± 0%   +0.55%
AESCBCDecrypt1K     793ns ± 0%     415ns ± 0%  -47.70%

Change-Id: I52ca939fefa1d776a390a0869e7f4564058942b3
Reviewed-on: https://go-review.googlesource.com/c/go/+/441816
Run-TryBot: Paul Murphy <murp@ibm.com>
Reviewed-by: Joedian Reid <joedian@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
2 years agodatabase/sql: add a missing period to end of sentence in Rows.Scan docs
Brad Fitzpatrick [Mon, 14 Nov 2022 17:04:38 +0000 (09:04 -0800)]
database/sql: add a missing period to end of sentence in Rows.Scan docs

Change-Id: I331d4ff3e0f76a26c1c5ec41297117a5b1f16911
Reviewed-on: https://go-review.googlesource.com/c/go/+/450295
Reviewed-by: Damien Neil <dneil@google.com>
Auto-Submit: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Joedian Reid <joedian@golang.org>
2 years agotesting: fix error message when a parallel Cleanup calls runtime.Goexit
Changkun Ou [Mon, 27 Sep 2021 10:06:43 +0000 (12:06 +0200)]
testing: fix error message when a parallel Cleanup calls runtime.Goexit

Fixes #48502

Change-Id: I6054b043ebd2237e19897fdf1234b311d19facc7
Reviewed-on: https://go-review.googlesource.com/c/go/+/352350
Reviewed-by: Joedian Reid <joedian@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Changkun Ou <mail@changkun.de>
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>

2 years agointernal/godebug: define more efficient API
Russ Cox [Fri, 11 Nov 2022 17:36:31 +0000 (12:36 -0500)]
internal/godebug: define more efficient API

We have been expanding our use of GODEBUG for compatibility,
and the current implementation forces a tradeoff between
freshness and efficiency. It parses the environment variable
in full each time it is called, which is expensive. But if clients
cache the result, they won't respond to run-time GODEBUG
changes, as happened with x509sha1 (#56436).

This CL changes the GODEBUG API to provide efficient,
up-to-date results. Instead of a single Get function,
New returns a *godebug.Setting that itself has a Get method.
Clients can save the result of New, which is no more expensive
than errors.New, in a global variable, and then call that
variable's Get method to get the value. Get costs only two
atomic loads in the case where the variable hasn't changed
since the last call.

Unfortunately, these changes do require importing sync
from godebug, which will mean that sync itself will never
be able to use a GODEBUG setting. That doesn't seem like
such a hardship. If it was really necessary, the runtime could
pass a setting to package sync itself at startup, with the
caveat that that setting, like the ones used by runtime itself,
would not respond to run-time GODEBUG changes.

Change-Id: I99a3acfa24fb2a692610af26a5d14bbc62c966ac
Reviewed-on: https://go-review.googlesource.com/c/go/+/449504
Run-TryBot: Russ Cox <rsc@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

2 years agoarchive/zip: don't read directories containing file data
Alexander Yastrebov [Fri, 11 Nov 2022 23:23:19 +0000 (23:23 +0000)]
archive/zip: don't read directories containing file data

Fixes #54801

Change-Id: I3d03516792975ddb09835b2621c57e12e7cbad35
GitHub-Last-Rev: 4faa7e14dcc48c05d707f1e137d915da24133e14
GitHub-Pull-Request: golang/go#56714
Reviewed-on: https://go-review.googlesource.com/c/go/+/449955
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Joedian Reid <joedian@golang.org>
2 years agospec: document the new unsafe functions SliceData, String, and StringData
Robert Griesemer [Thu, 10 Nov 2022 23:28:03 +0000 (15:28 -0800)]
spec: document the new unsafe functions SliceData, String, and StringData

For #53003.

Change-Id: If5d76c7b8dfcbcab919cad9c333c0225fc155859
Reviewed-on: https://go-review.googlesource.com/c/go/+/449537
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
2 years agomath/bits: directly calculate quo/rem when hi is zero in Div64
ruinan [Tue, 8 Nov 2022 08:49:53 +0000 (16:49 +0800)]
math/bits: directly calculate quo/rem when hi is zero in Div64

func Div64(hi, lo, y uint64) (quo, rem uint64) {...}

math/bits.Div64 returns the quotient and remainder of (hi, lo) divided
by y. When hi is zero, we can directly return lo/y, lo%y, which can save
a lot of unnecessary calculations.

The performance is measured on arm64 and the changes will only affect
the arch that doesn't have the intrinsic.

name                old time/op    new time/op    delta
DivWVW/1-10         4.62ns ± 1%    2.45ns ± 1%  -46.97%
DivWVW/2-10         12.4ns ± 0%    12.2ns ± 0%   -1.38%
DivWVW/3-10         17.4ns ± 1%    17.2ns ± 0%   -0.88%
DivWVW/4-10         21.4ns ± 1%    21.6ns ± 0%   +0.75%
DivWVW/5-10         22.1ns ± 1%    21.9ns ± 0%   -0.69%
DivWVW/10-10        53.4ns ± 1%    53.0ns ± 1%   -0.69%
DivWVW/100-10        641ns ± 1%     633ns ± 0%   -1.26%
DivWVW/1000-10      5.52µs ± 1%    5.44µs ± 0%   -1.39%
DivWVW/10000-10     54.9µs ± 1%    54.7µs ± 1%   -0.54%
DivWVW/100000-10     646µs ± 1%     643µs ± 1%     ~

name                  old speed      new speed    delta
DivWVW/1-10       13.8GB/s ± 1%  26.1GB/s ± 1%  +88.57%
DivWVW/2-10       10.3GB/s ± 0%  10.5GB/s ± 0%   +1.39%
DivWVW/3-10       11.1GB/s ± 1%  11.2GB/s ± 0%   +0.90%
DivWVW/4-10       12.0GB/s ± 1%  11.9GB/s ± 0%   -0.74%
DivWVW/5-10       14.5GB/s ± 1%  14.6GB/s ± 0%   +0.69%
DivWVW/10-10      12.0GB/s ± 1%  12.1GB/s ± 1%   +0.69%
DivWVW/100-10     10.0GB/s ± 1%  10.1GB/s ± 0%   +1.28%
DivWVW/1000-10    11.6GB/s ± 1%  11.8GB/s ± 0%   +1.41%
DivWVW/10000-10   11.6GB/s ± 1%  11.7GB/s ± 1%   +0.54%
DivWVW/100000-10  9.91GB/s ± 1%  9.95GB/s ± 1%     ~

Change-Id: I12014c2e2cdb2c91608079f7502592307af9e525
Reviewed-on: https://go-review.googlesource.com/c/go/+/449776
Reviewed-by: Keith Randall <khr@google.com>
Run-TryBot: Eric Fang <eric.fang@arm.com>
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
2 years agospec: clarify struct field and array element comparison order
Robert Griesemer [Thu, 10 Nov 2022 21:50:33 +0000 (13:50 -0800)]
spec: clarify struct field and array element comparison order

Fixes #8606.

Change-Id: I64b13b2ed61ecae4641264deb47c9f7653a80356
Reviewed-on: https://go-review.googlesource.com/c/go/+/449536
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

2 years agointernal/syscall/unix: use runtime.gostring for Gostring
Ian Lance Taylor [Fri, 11 Nov 2022 20:42:51 +0000 (12:42 -0800)]
internal/syscall/unix: use runtime.gostring for Gostring

Under the race detector, checkptr flags uses of unsafe.Slice that
result in slices that straddle multiple Go allocations.
Avoid that scenario by calling existing runtime code.

This fixes a failure on the darwin-.*-race builders introduced in
CL 446178.

Change-Id: I6e0fdb37e3c3f38d97939a8799bb4d10f519c5b9
Reviewed-on: https://go-review.googlesource.com/c/go/+/449936
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Auto-Submit: Ian Lance Taylor <iant@golang.org>

2 years agoos/exec: fix TestWaitInterrupt/WaitDelay error message
scott [Fri, 11 Nov 2022 03:55:08 +0000 (03:55 +0000)]
os/exec: fix TestWaitInterrupt/WaitDelay error message

As the comments say. Here we expect err to be nil instead of ctx.Err()

Change-Id: I4cd02d62ac0a13c9577a567de36742f13d140d36
GitHub-Last-Rev: 6bedfbc9d2511140d088dc9ee5f40015725f68db
GitHub-Pull-Request: golang/go#56698
Reviewed-on: https://go-review.googlesource.com/c/go/+/449737
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>

2 years agonet: handle correctly the _gateway and _outbound hostnames for nss myhostname
Mateusz Poliwczak [Fri, 11 Nov 2022 07:34:15 +0000 (07:34 +0000)]
net: handle correctly the _gateway and _outbound hostnames for nss myhostname

Fixes #56387

Change-Id: If412134344600caefec425699398522399986d4d
GitHub-Last-Rev: f33540ef8f90e9a8c09f3947aba8c01155516d39
GitHub-Pull-Request: golang/go#56388
Reviewed-on: https://go-review.googlesource.com/c/go/+/445075
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>

2 years agoall: fix problematic comments
cui fliter [Fri, 11 Nov 2022 02:05:39 +0000 (10:05 +0800)]
all: fix problematic comments

Change-Id: Ib6ea1bd04d9b06542ed2b0f453c718115417c62c
Reviewed-on: https://go-review.googlesource.com/c/go/+/449755
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Keith Randall <khr@google.com>
2 years agoruntime/race: add missing copyright headers to syso import files
Bryan C. Mills [Fri, 11 Nov 2022 18:12:47 +0000 (13:12 -0500)]
runtime/race: add missing copyright headers to syso import files

These were apparently missed in CL 424034.

Change-Id: I60fcdd8c16992177a23c0e701f4224b250cfabee
Reviewed-on: https://go-review.googlesource.com/c/go/+/449855
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>

2 years agonet: disable TestLookupDotsWithRemoteSource and TestLookupGoogleSRV
Michael Anthony Knyszek [Fri, 11 Nov 2022 17:26:45 +0000 (17:26 +0000)]
net: disable TestLookupDotsWithRemoteSource and TestLookupGoogleSRV

These tests fail consistently due to a DNS change causing widespread
trybot outages.

Fixes #56707.

Change-Id: Iebdf91254a922a48880021198f0f12f6bc16b6e7
Reviewed-on: https://go-review.googlesource.com/c/go/+/449640
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
2 years agoruntime: delay incrementing freeindex in malloc
Cherry Mui [Wed, 9 Nov 2022 15:44:36 +0000 (10:44 -0500)]
runtime: delay incrementing freeindex in malloc

When the GC is scanning some memory (possibly conservatively),
finding a pointer, while concurrently another goroutine is
allocating an object at the same address as the found pointer, the
GC may see the pointer before the object and/or the heap bits are
initialized. This may cause the GC to see bad pointers and
possibly crash.

To prevent this, we make it that the scanner can only see the
object as allocated after the object and the heap bits are
initialized. As the scanner uses the freeindex to determine if an
object is allocated, we delay the increment of freeindex after the
initialization.

As currently in some code path finding the next free index and
updating the free index to a new slot past it is coupled, this
needs a small refactoring. In the new code mspan.nextFreeIndex
return the next free index but not update it (although allocCache
is updated). mallocgc will update it at a later time.

Fixes #54596.

Change-Id: I6dd5ccf743f2d2c46a1ed67c6a8237fe09a71260
Reviewed-on: https://go-review.googlesource.com/c/go/+/427619
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2 years agocmd/go/internal/vcweb: fix a data race in the overview handler
Bryan C. Mills [Thu, 10 Nov 2022 22:00:18 +0000 (17:00 -0500)]
cmd/go/internal/vcweb: fix a data race in the overview handler

I forgot to lock the scriptResult in the overview handler, and
apparently a cmd/go test is incidentally fetching the overview page at
some point during test execution, triggering the race.

This race was caught almost immediately by the new
linux-amd64-longtest-race builder (see
https://build.golang.org/log/85ab78169a6382a73b1a26c89e64138b387da217).

Updates #27494.

Change-Id: I06ee8d54dba400800284401428ba4a59809983b2
Reviewed-on: https://go-review.googlesource.com/c/go/+/449517
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
2 years agocmd/link: exit if runtime.a is missing
Cherry Mui [Thu, 10 Nov 2022 22:17:54 +0000 (17:17 -0500)]
cmd/link: exit if runtime.a is missing

Many stages in the linker assume some runtime symbols exist.
Error out if the runtime package cannot be found.

Fixes #56685.

Change-Id: I39b2663f6d7419688e30e6d8650e5eb8fc43a2b1
Reviewed-on: https://go-review.googlesource.com/c/go/+/449638
Reviewed-by: Than McIntosh <thanm@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

2 years agotest: add regression test for issue 53439
Cuong Manh Le [Fri, 11 Nov 2022 06:02:44 +0000 (13:02 +0700)]
test: add regression test for issue 53439

Fixes #53439

Change-Id: I425af0f78153511034e4a4648f32ef8c9378a325
Reviewed-on: https://go-review.googlesource.com/c/go/+/449756
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Keith Randall <khr@google.com>
2 years agoos/user: use libc (not cgo) on macOS
Russ Cox [Thu, 10 Nov 2022 03:42:25 +0000 (22:42 -0500)]
os/user: use libc (not cgo) on macOS

With net converted to libc, os/user is the last remaining
cgo code in the standard libary on macOS.
Convert it to libc too.

Now only plugin remains as a cgo-using package on macOS.

Change-Id: Ibb518b5c62ef9ec1e6ab6191f4b576f7c5a4501c
Reviewed-on: https://go-review.googlesource.com/c/go/+/449316
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>

2 years agocrypto/ecdh: add boringcrypto support
Russ Cox [Tue, 16 Aug 2022 14:37:49 +0000 (10:37 -0400)]
crypto/ecdh: add boringcrypto support

Update crypto/ecdh to use boringcrypto when enabled.

Change-Id: Idd0ce06a22b1a62289b383c46893800621c7d97b
Reviewed-on: https://go-review.googlesource.com/c/go/+/423363
Run-TryBot: Russ Cox <rsc@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>

2 years agocmd/compile: remove output registers limit for MUL/DIV on loong64
Wayne Zuo [Thu, 10 Nov 2022 14:55:00 +0000 (22:55 +0800)]
cmd/compile: remove output registers limit for MUL/DIV on loong64

This limitation exists on MIPS platform, but not on loong64.

Change-Id: I14bb3ec6895a8f7850873c171e1756843ffea72e
Reviewed-on: https://go-review.googlesource.com/c/go/+/449395
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Wayne Zuo <wdvxdr@golangcn.org>
Reviewed-by: David Chase <drchase@google.com>
2 years agonet/http: fix triv.go
Russ Cox [Thu, 10 Nov 2022 20:26:27 +0000 (15:26 -0500)]
net/http: fix triv.go

CL 428137 replaced 'buf := make(bytes.Buffer)' with 'var buf strings.Builder'.
That change also requires passing &buf to io.Copy instead of buf.

Change-Id: I72b3faa46693e7d1441298f49dc6b95859c3bff3
Reviewed-on: https://go-review.googlesource.com/c/go/+/449635
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
Run-TryBot: Russ Cox <rsc@golang.org>

2 years agocmd/compile: adjust PGO inlining default parameters
Cherry Mui [Thu, 10 Nov 2022 16:33:00 +0000 (11:33 -0500)]
cmd/compile: adjust PGO inlining default parameters

Adjust PGO inlining default parameters to 99% CDF threshold and
2000 budget. Benchmark results (mostly from Sweet) show that this
set of parameters performs reasonably well, with a few percent
speedup at the cost of a few percent binary size increase.

Also rename the debug flags to start with "pgo", to make it clear
that they are related to PGO.

Change-Id: I0749249b1298d1dc55a28993c37b3185f9d7639d
Reviewed-on: https://go-review.googlesource.com/c/go/+/449477
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

2 years agocmd/internal/obj: reduce allocations in object file writing
Cherry Mui [Thu, 10 Nov 2022 21:10:32 +0000 (16:10 -0500)]
cmd/internal/obj: reduce allocations in object file writing

Some object file writer functions are structured like, having a
local variable, setting fields, then passing it to a Write method
which eventually calls io.Writer.Write. As the Write call is an
interface call it escapes the parameter, which in turn causes the
local variable to be heap allocated. To reduce allocation, use
pre-allocated scratch space instead.

Reduce number of allocations in the compiler:
name        old allocs/op     new allocs/op     delta
Template           679k ± 0%         644k ± 0%  -5.17%  (p=0.000 n=20+20)
Unicode            603k ± 0%         581k ± 0%  -3.67%  (p=0.000 n=20+20)
GoTypes           3.83M ± 0%        3.63M ± 0%  -5.30%  (p=0.000 n=20+20)
Compiler           353k ± 0%         342k ± 0%  -3.09%  (p=0.000 n=18+19)
SSA               31.4M ± 0%        30.4M ± 0%  -3.02%  (p=0.000 n=20+20)
Flate              397k ± 0%         373k ± 0%  -5.92%  (p=0.000 n=20+18)
GoParser           777k ± 0%         735k ± 0%  -5.37%  (p=0.000 n=20+20)
Reflect           2.07M ± 0%        1.90M ± 0%  -7.89%  (p=0.000 n=18+20)
Tar                605k ± 0%         568k ± 0%  -6.26%  (p=0.000 n=19+16)
XML                801k ± 0%         766k ± 0%  -4.36%  (p=0.000 n=20+20)
[Geo mean]        1.18M             1.12M       -5.02%

Change-Id: I9d02a72e459e645527196ac54b6ee643a5ea6bd3
Reviewed-on: https://go-review.googlesource.com/c/go/+/449637
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>

2 years agonet: auto-reload the /etc/nsswitch.conf on unix systems
Mateusz Poliwczak [Thu, 10 Nov 2022 18:52:22 +0000 (18:52 +0000)]
net: auto-reload the /etc/nsswitch.conf on unix systems

This change is made to align with the current (recently changed) glibc behaviour, it will allow the hostLookupOrder method to change its decisions on runtime (based on /etc/nsswitch.conf changes).

Fixes #56515

Change-Id: I241d67f053b6d2111eebcd67744adee02829166e
GitHub-Last-Rev: 82842c127474d5d225d2e9b68568387ee6b0ba04
GitHub-Pull-Request: golang/go#56588
Reviewed-on: https://go-review.googlesource.com/c/go/+/448075
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2 years agocmd/go: enable -x in go mod graph
ianwoolf [Wed, 9 Nov 2022 08:52:41 +0000 (16:52 +0800)]
cmd/go: enable -x in go mod graph

Updates #35849

Change-Id: Ifa18e448c0d436c18d7204ac755cd36bc28cd612
Reviewed-on: https://go-review.googlesource.com/c/go/+/448935
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

2 years agocmd/go: enable -x in go mod tidy
ianwoolf [Wed, 9 Nov 2022 08:40:24 +0000 (16:40 +0800)]
cmd/go: enable -x in go mod tidy

Updates #35849

Change-Id: I8b40a2de6a05880a9f939349a714b631888f5f94
Reviewed-on: https://go-review.googlesource.com/c/go/+/448915
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>

2 years agoruntime: retry thread creation on EAGAIN
Ian Lance Taylor [Tue, 1 Nov 2022 23:04:50 +0000 (16:04 -0700)]
runtime: retry thread creation on EAGAIN

This copies the logic we use in runtime/cgo, when calling pthread_create,
into runtime proper, when calling newosproc.

We only do this in newosproc, not newosproc0, because in newosproc0 we
need a nosplit function literal, and we need to pass arguments to it through
newosproc, which is a pain. Also newosproc0 is only called at process
startup, when thread creation is less likely to fail anyhow.

Fixes #49438

Change-Id: Ia26813952fdbae8aaad5904c9102269900a07ba9
Reviewed-on: https://go-review.googlesource.com/c/go/+/447175
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2 years agocmd/compile: teach prove about signed domain relations of constant integer Phi's
Jakub Ciolek [Mon, 19 Sep 2022 11:08:08 +0000 (13:08 +0200)]
cmd/compile: teach prove about signed domain relations of constant integer Phi's

Implement extracting signed domain relations for OpPhi's composed entirely of integer constants.

darwin/arm benches (M1 Pro):

EqIfaceConcrete-10            0.83ns ± 0%  0.78ns ± 0%  -6.52%  p=0.000 n=8+9 )
ConvT2EByteSized/bool-10      1.33ns ± 0%  1.25ns ± 0%  -6.4%  ( p=0.000 n=9+8 )
ConvT2EByteSized/uint8-10     1.27ns ± 1%  1.25ns ± 0%  -1.82%( p=0.000 n=8+8 )
ConvT2ESmall-10               2.18ns ± 0%  2.14ns ± 1%  -1.97%( p=0.000 n=9+9 )

compilecmp linux/amd64  reports a 1.4% reduction in total size:

file                                                                     before   after    Δ       %
unicode/utf8.s                                                           4251     4317     +66     +1.553%
runtime/internal/sys.s                                                   599      593      -6      -1.002%
sync/atomic.s                                                            2277     1695     -582    -25.560%
internal/cpu.s                                                           5412     5249     -163    -3.012%
internal/abi.s                                                           1006     1045     +39     +3.877%
container/list.s                                                         4821     4858     +37     +0.767%
unicode/utf16.s                                                          1162     868      -294    -25.301%
hash/maphash.s                                                           2525     2625     +100    +3.960%
image/color.s                                                            7414     7045     -369    -4.977%
math.s                                                                   37278    37246    -32     -0.086%
math/cmplx.s                                                             8868     8876     +8      +0.090%
runtime.s                                                                496893   486910   -9983   -2.009%
runtime/metrics.s                                                        1145     1165     +20     +1.747%
sync.s                                                                   14257    15049    +792    +5.555%
internal/singleflight.s                                                  2557     2576     +19     +0.743%
internal/reflectlite.s                                                   59715    21713    -38002  -63.639%
math/rand.s                                                              10153    9980     -173    -1.704%
path.s                                                                   6007     6091     +84     +1.398%
sort.s                                                                   20704    20717    +13     +0.063%
io.s                                                                     19708    18899    -809    -4.105%
container/heap.s                                                         1922     1932     +10     +0.520%
cmd/vendor/golang.org/x/mod/semver.s                                     8013     7922     -91     -1.136%
strconv.s                                                                50530    49955    -575    -1.138%
vendor/golang.org/x/net/dns/dnsmessage.s                                 79054    80314    +1260   +1.594%
bytes.s                                                                  31195    31448    +253    +0.811%
text/tabwriter.s                                                         8952     9037     +85     +0.950%
strings.s                                                                43052    41627    -1425   -3.310%
crypto/internal/nistec/fiat.s                                            124219   123197   -1022   -0.823%
syscall.s                                                                85224    84600    -624    -0.732%
hash/adler32.s                                                           1224     1221     -3      -0.245%
encoding/ascii85.s                                                       4131     4149     +18     +0.436%
hash/crc32.s                                                             6304     6347     +43     +0.682%
encoding/base32.s                                                        8466     8473     +7      +0.083%
vendor/golang.org/x/text/transform.s                                     15633    16050    +417    +2.667%
bufio.s                                                                  24464    22091    -2373   -9.700%
reflect.s                                                                258373   164941   -93432  -36.162%
internal/syscall/unix.s                                                  1730     1299     -431    -24.913%
go/build/constraint.s                                                    12959    13581    +622    +4.800%
hash/crc64.s                                                             3604     3673     +69     +1.915%
hash/fnv.s                                                               4482     4609     +127    +2.834%
compress/bzip2.s                                                         9586     9891     +305    +3.182%
time.s                                                                   92081    89953    -2128   -2.311%
regexp/syntax.s                                                          78123    78293    +170    +0.218%
internal/saferio.s                                                       1746     1635     -111    -6.357%
html.s                                                                   4228     4233     +5      +0.118%
encoding/binary.s                                                        31383    31282    -101    -0.322%
image.s                                                                  37513    38082    +569    +1.517%
internal/poll.s                                                          45486    43956    -1530   -3.364%
context.s                                                                11096    10804    -292    -2.632%
io/fs.s                                                                  16921    18609    +1688   +9.976%
regexp.s                                                                 58983    58790    -193    -0.327%
crypto/cipher.s                                                          18686    18718    +32     +0.171%
crypto/internal/edwards25519/field.s                                     9473     9488     +15     +0.158%
crypto/sha1.s                                                            6477     6537     +60     +0.926%
encoding/base64.s                                                        10615    10215    -400    -3.768%
vendor/golang.org/x/crypto/internal/poly1305.s                           4522     4567     +45     +0.995%
cmd/internal/sys.s                                                       4729     4965     +236    +4.990%
os.s                                                                     53819    53697    -122    -0.227%
embed.s                                                                  6428     6437     +9      +0.140%
crypto/des.s                                                             5770     5762     -8      -0.139%
encoding/pem.s                                                           6425     6467     +42     +0.654%
crypto/internal/edwards25519.s                                           31850    31948    +98     +0.308%
image/draw.s                                                             28660    28594    -66     -0.230%
image/jpeg.s                                                             32246    32385    +139    +0.431%
index/suffixarray.s                                                      38665    38627    -38     -0.098%
crypto/hmac.s                                                            2546     2437     -109    -4.281%
fmt.s                                                                    70412    71396    +984    +1.397%
crypto/sha256.s                                                          5708     5683     -25     -0.438%
crypto/sha512.s                                                          8346     8313     -33     -0.395%
crypto/aes.s                                                             11586    11231    -355    -3.064%
path/filepath.s                                                          16499    16438    -61     -0.370%
crypto/internal/nistec.s                                                 65640    65713    +73     +0.111%
internal/lazyregexp.s                                                    2389     2284     -105    -4.395%
internal/intern.s                                                        2988     3266     +278    +9.304%
os/user.s                                                                12166    12106    -60     -0.493%
compress/lzw.s                                                           7292     7264     -28     -0.384%
encoding/hex.s                                                           5431     5405     -26     -0.479%
compress/flate.s                                                         46812    47932    +1120   +2.393%
net/url.s                                                                26853    26638    -215    -0.801%
crypto/ecdh.s                                                            10015    12228    +2213   +22.097%
vendor/golang.org/x/sys/cpu.s                                            5877     5599     -278    -4.730%
database/sql/driver.s                                                    16553    16671    +118    +0.713%
net/netip.s                                                              39077    40164    +1087   +2.782%
debug/plan9obj.s                                                         6765     6679     -86     -1.271%
math/big.s                                                               160530   161099   +569    +0.354%
archive/tar.s                                                            59285    59692    +407    +0.687%
debug/dwarf.s                                                            117589   116367   -1222   -1.039%
compress/gzip.s                                                          8288     8255     -33     -0.398%
archive/zip.s                                                            51813    49835    -1978   -3.818%
compress/zlib.s                                                          6206     6209     +3      +0.048%
runtime/debug.s                                                          11995    12212    +217    +1.809%
database/sql.s                                                           91280    90859    -421    -0.461%
crypto/dsa.s                                                             4816     4784     -32     -0.664%
net.s                                                                    272116   271353   -763    -0.280%
crypto/elliptic.s                                                        30485    32898    +2413   +7.915%
encoding/asn1.s                                                          47189    48186    +997    +2.113%
crypto/rand.s                                                            3812     3801     -11     -0.289%
debug/macho.s                                                            30712    27800    -2912   -9.482%
debug/pe.s                                                               23198    23542    +344    +1.483%
debug/elf.s                                                              50653    50335    -318    -0.628%
internal/xcoff.s                                                         18330    18578    +248    +1.353%
debug/gosym.s                                                            37011    34275    -2736   -7.392%
encoding/csv.s                                                           11440    11497    +57     +0.498%
encoding/json.s                                                          95650    92269    -3381   -3.535%
vendor/golang.org/x/crypto/cryptobyte.s                                  31261    31418    +157    +0.502%
encoding/gob.s                                                           131648   132481   +833    +0.633%
crypto/x509/pkix.s                                                       9030     9285     +255    +2.824%
crypto/rsa.s                                                             25753    25620    -133    -0.516%
debug/buildinfo.s                                                        7329     7360     +31     +0.423%
log.s                                                                    12153    12554    +401    +3.300%
encoding/xml.s                                                           90630    91544    +914    +1.008%
net/textproto.s                                                          17674    15707    -1967   -11.129%
vendor/golang.org/x/text/unicode/norm.s                                  66104    66296    +192    +0.290%
vendor/golang.org/x/net/http2/hpack.s                                    23542    24291    +749    +3.182%
mime/quotedprintable.s                                                   5074     5106     +32     +0.631%
mime.s                                                                   32982    32673    -309    -0.937%
net/http/internal.s                                                      5765     4748     -1017   -17.641%
flag.s                                                                   25247    25434    +187    +0.741%
vendor/golang.org/x/text/unicode/bidi.s                                  30444    30707    +263    +0.864%
go/token.s                                                               13689    14075    +386    +2.820%
go/doc/comment.s                                                         49201    47717    -1484   -3.016%
internal/buildcfg.s                                                      10468    9949     -519    -4.958%
text/scanner.s                                                           9812     9814     +2      +0.020%
os/exec.s                                                                34367    29498    -4869   -14.168%
mime/multipart.s                                                         17568    17083    -485    -2.761%
image/gif.s                                                              22965    22826    -139    -0.605%
crypto/x509.s                                                            142551   139844   -2707   -1.899%
text/template/parse.s                                                    82771    94885    +12114  +14.636%
go/scanner.s                                                             17306    17321    +15     +0.087%
internal/dag.s                                                           13123    13368    +245    +1.867%
go/constant.s                                                            29736    32872    +3136   +10.546%
image/png.s                                                              37126    37013    -113    -0.304%
internal/goroot.s                                                        3080     3212     +132    +4.286%
internal/diff.s                                                          7561     7909     +348    +4.603%
vendor/golang.org/x/net/idna.s                                           22454    22493    +39     +0.174%
go/ast.s                                                                 63945    68792    +4847   +7.580%
internal/pkgbits.s                                                       19638    19838    +200    +1.018%
text/template.s                                                          107139   100338   -6801   -6.348%
runtime/trace.s                                                          2844     2762     -82     -2.883%
internal/txtar.s                                                         2495     2483     -12     -0.481%
internal/profile.s                                                       117110   118516   +1406   +1.201%
log/syslog.s                                                             6615     6625     +10     +0.151%
vendor/golang.org/x/net/http/httpguts.s                                  3558     3580     +22     +0.618%
crypto/tls.s                                                             298298   292244   -6054   -2.030%
internal/trace.s                                                         69626    67477    -2149   -3.086%
vendor/golang.org/x/net/http/httpproxy.s                                 8164     7942     -222    -2.719%
go/doc.s                                                                 69092    71449    +2357   +3.411%
go/internal/typeparams.s                                                 1465     1338     -127    -8.669%
go/printer.s                                                             90427    82948    -7479   -8.271%
html/template.s                                                          91720    90853    -867    -0.945%
runtime/pprof.s                                                          70261    69793    -468    -0.666%
testing.s                                                                107098   98982    -8116   -7.578%
net/internal/socktest.s                                                  15715    15469    -246    -1.565%
net/mail.s                                                               17762    18044    +282    +1.588%
net/smtp.s                                                               11295    11484    +189    +1.673%
os/signal.s                                                              7647     7779     +132    +1.726%
go/parser.s                                                              111336   116170   +4834   +4.342%
testing/iotest.s                                                         13339    13379    +40     +0.300%
testing/quick.s                                                          8493     8516     +23     +0.271%
cmd/internal/bio.s                                                       11994    8754     -3240   -27.014%
internal/testenv.s                                                       7067     6779     -288    -4.075%
vendor/golang.org/x/net/nettest.s                                        27692    27770    +78     +0.282%
cmd/internal/objabi.s                                                    15031    14718    -313    -2.082%
cmd/internal/src.s                                                       14507    14515    +8      +0.055%
cmd/vendor/golang.org/x/arch/arm/armasm.s                                33278    33864    +586    +1.761%
go/format.s                                                              4517     4725     +208    +4.605%
go/build.s                                                               67444    70250    +2806   +4.160%
testing/fstest.s                                                         53785    52941    -844    -1.569%
cmd/vendor/golang.org/x/arch/arm64/arm64asm.s                            86346    87156    +810    +0.938%
cmd/internal/goobj.s                                                     12262    12327    +65     +0.530%
internal/fuzz.s                                                          88446    89608    +1162   +1.314%
cmd/vendor/golang.org/x/arch/ppc64/ppc64asm.s                            36435    37026    +591    +1.622%
cmd/internal/dwarf.s                                                     28919    29476    +557    +1.926%
cmd/internal/edit.s                                                      3375     3428     +53     +1.570%
cmd/vendor/golang.org/x/arch/x86/x86asm.s                                70465    70187    -278    -0.395%
cmd/internal/pkgpath.s                                                   4922     4422     -500    -10.158%
net/http.s                                                               548512   541160   -7352   -1.340%
cmd/internal/archive.s                                                   11103    11111    +8      +0.072%
testing/internal/testdeps.s                                              6384     6427     +43     +0.674%
cmd/internal/quoted.s                                                    2374     2708     +334    +14.069%
cmd/compile/internal/abt.s                                               15188    14795    -393    -2.588%
cmd/internal/gcprog.s                                                    6090     6131     +41     +0.673%
cmd/internal/codesign.s                                                  4395     4406     +11     +0.250%
go/types.s                                                               478152   479038   +886    +0.185%
cmd/internal/obj.s                                                       121049   114662   -6387   -5.276%
cmd/compile/internal/syntax.s                                            157912   156897   -1015   -0.643%
expvar.s                                                                 8906     8586     -320    -3.593%
net/http/cgi.s                                                           17411    17782    +371    +2.131%
net/http/cookiejar.s                                                     13763    13931    +168    +1.221%
net/http/httptest.s                                                      16213    16785    +572    +3.528%
net/http/pprof.s                                                         14556    14739    +183    +1.257%
net/http/httputil.s                                                      43808    44406    +598    +1.365%
net/rpc.s                                                                32868    30581    -2287   -6.958%
go/internal/gccgoimporter.s                                              45024    45409    +385    +0.855%
go/internal/gcimporter.s                                                 58540    53044    -5496   -9.388%
go/internal/srcimporter.s                                                10011    10451    +440    +4.395%
net/http/fcgi.s                                                          18344    18039    -305    -1.663%
cmd/internal/objfile.s                                                   45853    46153    +300    +0.654%
cmd/api.s                                                                34943    35806    +863    +2.470%
cmd/internal/obj/arm.s                                                   61126    61156    +30     +0.049%
net/rpc/jsonrpc.s                                                        5601     5271     -330    -5.892%
cmd/internal/obj/loong64.s                                               45594    45335    -259    -0.568%
cmd/internal/obj/arm64.s                                                 140572   140006   -566    -0.403%
cmd/internal/obj/mips.s                                                  53672    53637    -35     -0.065%
go/importer.s                                                            1989     2169     +180    +9.050%
cmd/internal/obj/riscv.s                                                 56721    56877    +156    +0.275%
cmd/addr2line.s                                                          1930     1906     -24     -1.244%
cmd/internal/obj/ppc64.s                                                 137317   115306   -22011  -16.029%
cmd/internal/obj/wasm.s                                                  34091    34162    +71     +0.208%
cmd/internal/obj/s390x.s                                                 110244   110444   +200    +0.181%
cmd/asm/internal/flags.s                                                 2234     2351     +117    +5.237%
cmd/internal/obj/x86.s                                                   86811    87534    +723    +0.833%
cmd/internal/buildid.s                                                   17303    17156    -147    -0.850%
cmd/compile/internal/base.s                                              29582    29675    +93     +0.314%
cmd/compile/internal/logopt.s                                            9859     9943     +84     +0.852%
cmd/cgo.s                                                                198958   203063   +4105   +2.063%
cmd/internal/browser.s                                                   1751     1803     +52     +2.970%
cmd/vendor/golang.org/x/tools/cover.s                                    9752     9759     +7      +0.072%
cmd/asm/internal/lex.s                                                   22668    21352    -1316   -5.806%
cmd/asm/internal/arch.s                                                  27642    29863    +2221   +8.035%
cmd/compile/internal/bitvec.s                                            5535     5542     +7      +0.126%
cmd/compile/internal/types.s                                             74646    74488    -158    -0.212%
cmd/dist.s                                                               185287   184450   -837    -0.452%
cmd/compile/internal/types2.s                                            477270   470783   -6487   -1.359%
cmd/cover.s                                                              29563    31341    +1778   +6.014%
cmd/doc.s                                                                54013    53299    -714    -1.322%
cmd/go/internal/fsys.s                                                   16751    16944    +193    +1.152%
cmd/fix.s                                                                64367    65866    +1499   +2.329%
cmd/asm/internal/asm.s                                                   60266    60767    +501    +0.831%
cmd/compile/internal/ir.s                                                252952   187941   -65011  -25.701%
cmd/go/internal/str.s                                                    3582     3690     +108    +3.015%
cmd/go/internal/lockedfile/internal/filelock.s                           2062     1960     -102    -4.947%
cmd/go/internal/cfg.s                                                    11331    11253    -78     -0.688%
cmd/asm.s                                                                2461     2474     +13     +0.528%
cmd/compile/internal/deadcode.s                                          5576     5812     +236    +4.232%
cmd/compile/internal/objw.s                                              5553     5450     -103    -1.855%
cmd/go/internal/par.s                                                    4473     4378     -95     -2.124%
cmd/compile/internal/abi.s                                               19219    19382    +163    +0.848%
cmd/go/internal/lockedfile.s                                             22412    14422    -7990   -35.651%
cmd/go/internal/auth.s                                                   2218     2250     +32     +1.443%
cmd/vendor/golang.org/x/mod/internal/lazyregexp.s                        2389     2284     -105    -4.395%
cmd/go/internal/base.s                                                   10079    10177    +98     +0.972%
cmd/go/internal/imports.s                                                16417    16159    -258    -1.572%
cmd/go/internal/trace.s                                                  4888     4895     +7      +0.143%
cmd/go/internal/web.s                                                    12130    12007    -123    -1.014%
cmd/vendor/golang.org/x/mod/sumdb/tlog.s                                 27662    28441    +779    +2.816%
cmd/vendor/golang.org/x/mod/module.s                                     20503    20758    +255    +1.244%
cmd/vendor/golang.org/x/mod/sumdb/dirhash.s                              3599     3601     +2      +0.056%
cmd/go/internal/cache.s                                                  23949    24705    +756    +3.157%
cmd/go/internal/cmdflag.s                                                3769     3748     -21     -0.557%
cmd/go/internal/search.s                                                 15584    15917    +333    +2.137%
cmd/vendor/golang.org/x/mod/sumdb/note.s                                 14260    14347    +87     +0.610%
cmd/internal/test2json.s                                                 8706     8575     -131    -1.505%
cmd/go/internal/tool.s                                                   2762     2756     -6      -0.217%
cmd/vendor/golang.org/x/mod/zip.s                                        36841    37335    +494    +1.341%
cmd/go/internal/mvs.s                                                    27581    30511    +2930   +10.623%
cmd/go/internal/modfetch/codehost.s                                      80858    76219    -4639   -5.737%
cmd/go/internal/version.s                                                3050     3046     -4      -0.131%
cmd/vendor/golang.org/x/mod/modfile.s                                    99002    98074    -928    -0.937%
cmd/go/internal/test/internal/genflags.s                                 2025     2032     +7      +0.346%
cmd/vendor/golang.org/x/sync/semaphore.s                                 2220     2210     -10     -0.450%
cmd/go/internal/vcs.s                                                    43959    45346    +1387   +3.155%
cmd/vendor/golang.org/x/mod/sumdb.s                                      27952    28265    +313    +1.120%
cmd/go/internal/modindex.s                                               79377    82223    +2846   +3.585%
cmd/compile/internal/typecheck.s                                         317102   310352   -6750   -2.129%
cmd/link/internal/benchmark.s                                            3621     3680     +59     +1.629%
cmd/link/internal/sym.s                                                  1816     1805     -11     -0.606%
cmd/go/internal/modconv.s                                                14909    14895    -14     -0.094%
cmd/gofmt.s                                                              29575    29779    +204    +0.690%
cmd/link/internal/dwtest.s                                               3879     3909     +30     +0.773%
cmd/vendor/golang.org/x/sys/unix.s                                       118975   119232   +257    +0.216%
cmd/nm.s                                                                 4675     4718     +43     +0.920%
cmd/go/internal/modfetch.s                                               111400   112088   +688    +0.618%
cmd/compile/internal/compare.s                                           11311    10693    -618    -5.464%
cmd/compile/internal/staticdata.s                                        14014    14277    +263    +1.877%
cmd/compile/internal/devirtualize.s                                      2548     2144     -404    -15.856%
cmd/compile/internal/inline.s                                            37591    37993    +402    +1.069%
cmd/compile/internal/escape.s                                            69777    68692    -1085   -1.555%
cmd/compile/internal/importer.s                                          52920    48544    -4376   -8.269%
cmd/internal/osinfo.s                                                    501      698      +197    +39.321%
cmd/link/internal/loader.s                                               79034    75315    -3719   -4.706%
cmd/pack.s                                                               8512     8600     +88     +1.034%
cmd/vendor/github.com/google/pprof/internal/elfexec.s                    5636     5711     +75     +1.331%
cmd/vendor/github.com/google/pprof/profile.s                             143898   145834   +1936   +1.345%
cmd/compile/internal/reflectdata.s                                       80184    81399    +1215   +1.515%
cmd/vendor/golang.org/x/term.s                                           24431    24478    +47     +0.192%
cmd/go/internal/modload.s                                                273375   282247   +8872   +3.245%
cmd/link/internal/loadpe.s                                               19813    17572    -2241   -11.311%
cmd/link/internal/loadmacho.s                                            20848    20767    -81     -0.389%
cmd/link/internal/loadelf.s                                              24458    23896    -562    -2.298%
cmd/link/internal/loadxcoff.s                                            11183    8913     -2270   -20.299%
cmd/vendor/github.com/ianlancetaylor/demangle.s                          264095   268313   +4218   +1.597%
cmd/compile/internal/staticinit.s                                        13176    13292    +116    +0.880%
cmd/go/internal/help.s                                                   5180     5320     +140    +2.703%
cmd/go/internal/workcmd.s                                                17702    17368    -334    -1.887%
cmd/test2json.s                                                          1581     1427     -154    -9.741%
cmd/vendor/github.com/google/pprof/internal/measurement.s                8449     8700     +251    +2.971%
cmd/go/internal/load.s                                                   123087   125064   +1977   +1.606%
cmd/vendor/golang.org/x/tools/internal/analysisinternal.s                11481    12506    +1025   +8.928%
cmd/vendor/golang.org/x/tools/internal/typeparams.s                      15239    15796    +557    +3.655%
cmd/vendor/github.com/google/pprof/internal/symbolz.s                    4760     4805     +45     +0.945%
cmd/vendor/github.com/google/pprof/internal/binutils.s                   37975    37526    -449    -1.182%
cmd/vendor/github.com/google/pprof/internal/graph.s                      47850    47968    +118    +0.247%
cmd/go/internal/fmtcmd.s                                                 2319     2373     +54     +2.329%
cmd/vendor/github.com/google/pprof/internal/symbolizer.s                 10195    10268    +73     +0.716%
cmd/vendor/golang.org/x/tools/go/analysis.s                              5790     6021     +231    +3.990%
cmd/vendor/golang.org/x/tools/go/analysis/passes/internal/analysisutil.s 2246     2519     +273    +12.155%
cmd/vendor/golang.org/x/tools/go/types/objectpath.s                      15720    16601    +881    +5.604%
cmd/vendor/golang.org/x/tools/go/ast/inspector.s                         4537     5777     +1240   +27.331%
cmd/go/internal/modcmd.s                                                 47192    47738    +546    +1.157%
cmd/vendor/golang.org/x/tools/go/analysis/internal/analysisflags.s       13575    14348    +773    +5.694%
cmd/vendor/github.com/google/pprof/internal/report.s                     79257    80089    +832    +1.050%
cmd/link/internal/ld.s                                                   553166   554375   +1209   +0.219%
cmd/vendor/golang.org/x/tools/go/analysis/passes/asmdecl.s               29123    29957    +834    +2.864%
cmd/vendor/golang.org/x/tools/go/analysis/passes/inspect.s               638      818      +180    +28.213%
cmd/vendor/golang.org/x/tools/go/analysis/internal/facts.s               12934    13735    +801    +6.193%
cmd/vendor/golang.org/x/tools/go/analysis/passes/buildtag.s              6903     7148     +245    +3.549%
cmd/vendor/golang.org/x/tools/go/analysis/passes/cgocall.s               7953     8549     +596    +7.494%
cmd/go/internal/work.s                                                   271866   275488   +3622   +1.332%
cmd/trace.s                                                              98068    98671    +603    +0.615%
cmd/vendor/github.com/google/pprof/internal/driver.s                     145066   145844   +778    +0.536%
cmd/link/internal/amd64.s                                                15589    15625    +36     +0.231%
cmd/link/internal/arm.s                                                  16490    16541    +51     +0.309%
cmd/link/internal/arm64.s                                                31835    31684    -151    -0.474%
cmd/go/internal/envcmd.s                                                 21012    20787    -225    -1.071%
cmd/go/internal/clean.s                                                  9306     9233     -73     -0.784%
cmd/go/internal/fix.s                                                    1906     2086     +180    +9.444%
cmd/go/internal/generate.s                                               10509    10758    +249    +2.369%
cmd/go/internal/get.s                                                    13782    14075    +293    +2.126%
cmd/go/internal/run.s                                                    4852     4914     +62     +1.278%
cmd/go/internal/list.s                                                   19576    19097    -479    -2.447%
cmd/go/internal/bug.s                                                    6253     5720     -533    -8.524%
cmd/go/internal/modget.s                                                 58449    59583    +1134   +1.940%
cmd/go/internal/vet.s                                                    7384     7228     -156    -2.113%
cmd/go/internal/test.s                                                   59654    60193    +539    +0.904%
cmd/link/internal/riscv64.s                                              9856     9931     +75     +0.761%
cmd/link/internal/ppc64.s                                                28471    27046    -1425   -5.005%
cmd/link/internal/s390x.s                                                15081    15524    +443    +2.937%
cmd/link/internal/wasm.s                                                 16770    16817    +47     +0.280%
cmd/link/internal/x86.s                                                  14008    14093    +85     +0.607%
cmd/vendor/github.com/google/pprof/driver.s                              8046     8124     +78     +0.969%
cmd/vendor/golang.org/x/tools/go/analysis/passes/assign.s                2010     2193     +183    +9.104%
cmd/vendor/golang.org/x/tools/go/analysis/passes/atomic.s                2132     2335     +203    +9.522%
cmd/go.s                                                                 6341     6546     +205    +3.233%
cmd/vendor/golang.org/x/tools/go/analysis/passes/bools.s                 6078     6348     +270    +4.442%
cmd/vendor/golang.org/x/tools/go/analysis/passes/composite.s             4457     4789     +332    +7.449%
cmd/vendor/golang.org/x/tools/go/analysis/passes/copylock.s              8814     9375     +561    +6.365%
cmd/link.s                                                               3829     4373     +544    +14.207%
cmd/vendor/golang.org/x/tools/go/analysis/passes/framepointer.s          2007     2265     +258    +12.855%
cmd/pprof.s                                                              9881     10052    +171    +1.731%
cmd/vendor/golang.org/x/tools/go/cfg.s                                   26215    27546    +1331   +5.077%
cmd/vendor/golang.org/x/tools/go/analysis/passes/httpresponse.s          3500     4205     +705    +20.143%
cmd/vendor/golang.org/x/tools/go/analysis/passes/ifaceassert.s           4790     5407     +617    +12.881%
cmd/vendor/golang.org/x/tools/go/ast/astutil.s                           50786    55269    +4483   +8.827%
cmd/vendor/golang.org/x/tools/go/analysis/passes/nilfunc.s               1754     2033     +279    +15.906%
cmd/vendor/golang.org/x/tools/go/analysis/passes/shift.s                 4514     5262     +748    +16.571%
cmd/vendor/golang.org/x/tools/go/analysis/passes/sigchanyzer.s           3455     3687     +232    +6.715%
cmd/vendor/golang.org/x/tools/go/analysis/passes/stdmethods.s            8064     8249     +185    +2.294%
cmd/vendor/golang.org/x/tools/go/analysis/passes/stringintconv.s         4547     4900     +353    +7.763%
cmd/vendor/golang.org/x/tools/go/analysis/passes/structtag.s             6975     7584     +609    +8.731%
cmd/vendor/golang.org/x/tools/go/analysis/passes/testinggoroutine.s      3375     3670     +295    +8.741%
cmd/vendor/golang.org/x/tools/go/types/typeutil.s                        12924    13870    +946    +7.320%
cmd/vendor/golang.org/x/tools/go/analysis/passes/unsafeptr.s             3251     3557     +306    +9.412%
cmd/vendor/golang.org/x/tools/go/analysis/passes/unreachable.s           6121     7575     +1454   +23.754%
cmd/vendor/golang.org/x/tools/go/analysis/passes/tests.s                 13925    14409    +484    +3.476%
cmd/vendor/golang.org/x/tools/go/analysis/passes/unusedresult.s          2953     3159     +206    +6.976%
cmd/vendor/golang.org/x/tools/go/analysis/unitchecker.s                  11563    11962    +399    +3.451%
cmd/vendor/golang.org/x/tools/go/analysis/passes/errorsas.s              1735     1933     +198    +11.412%
cmd/vendor/golang.org/x/tools/go/analysis/passes/ctrlflow.s              4241     4486     +245    +5.777%
cmd/vendor/golang.org/x/tools/go/analysis/passes/loopclosure.s           3107     3460     +353    +11.361%
cmd/vendor/golang.org/x/tools/go/analysis/passes/unmarshal.s             1879     2141     +262    +13.944%
cmd/vendor/golang.org/x/tools/go/analysis/passes/printf.s                28740    29317    +577    +2.008%
cmd/vendor/golang.org/x/tools/go/analysis/passes/lostcancel.s            7188     7930     +742    +10.323%
cmd/vet.s                                                                1374     1554     +180    +13.100%
cmd/compile/internal/ssa.s                                               3631074  3571680  -59394  -1.636%
cmd/compile/internal/liveness.s                                          40423    40726    +303    +0.750%
cmd/compile/internal/ssagen.s                                            361816   362743   +927    +0.256%
cmd/compile/internal/mips64.s                                            16298    16330    +32     +0.196%
cmd/compile/internal/loong64.s                                           17376    17440    +64     +0.368%
cmd/compile/internal/mips.s                                              16121    16153    +32     +0.198%
cmd/compile/internal/arm64.s                                             29294    29346    +52     +0.178%
cmd/compile/internal/arm.s                                               26850    26882    +32     +0.119%
cmd/compile/internal/amd64.s                                             30945    31034    +89     +0.288%
cmd/compile/internal/dwarfgen.s                                          34464    35065    +601    +1.744%
cmd/compile/internal/ppc64.s                                             31621    31733    +112    +0.354%
cmd/compile/internal/wasm.s                                              11851    11889    +38     +0.321%
cmd/compile/internal/s390x.s                                             24168    24183    +15     +0.062%
cmd/compile/internal/x86.s                                               18090    18079    -11     -0.061%
cmd/compile/internal/walk.s                                              295003   295945   +942    +0.319%
cmd/compile/internal/noder.s                                             405458   403775   -1683   -0.415%
cmd/compile/internal/pkginit.s                                           30757    31951    +1194   +3.882%
cmd/compile/internal/gc.s                                                18788    18880    +92     +0.490%
total                                                                    20334984 20041049 -293935 -1.445%
package runtime/race/internal/amd64v3 was deleted
package runtime/race/internal/amd64v1 was deleted

Change-Id: Ibcd71480da1b53cfec4fa16c20f222b9a195e6da
Reviewed-on: https://go-review.googlesource.com/c/go/+/431797
Reviewed-by: Keith Randall <khr@google.com>
Run-TryBot: Jakub Ciolek <jakub@ciolek.dev>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>

2 years agocmd/go: allow -mod=vendor to be set outside of a module
Michael Matloob [Fri, 4 Nov 2022 21:27:38 +0000 (17:27 -0400)]
cmd/go: allow -mod=vendor to be set outside of a module

It will behave as if teh command-line-arguments module was vendored,
with zero dependencies, much as -mod=readonly works.

Fixes #56536

Change-Id: Ia02dda2f90d006b5917c3ae002ccb714987f27a3
Reviewed-on: https://go-review.googlesource.com/c/go/+/448019
Reviewed-by: Michael Matloob <matloob@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Michael Matloob <matloob@golang.org>

2 years agocmd/dist: define GOPPC64_{cpu} for PPC64 targets
Paul E. Murphy [Thu, 10 Mar 2022 17:51:00 +0000 (11:51 -0600)]
cmd/dist: define GOPPC64_{cpu} for PPC64 targets

This can be used to provide better instruction selection for assembly
implementations without having to implement two variants and dynamic
runtime selections when a newer GOPPC64 value is used.

Change-Id: I4331037d57b128137280aa7904d08d362391f81e
Reviewed-on: https://go-review.googlesource.com/c/go/+/449115
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2 years agoos/signal/internal/pty: use libc (not cgo) on macOS
Russ Cox [Wed, 9 Nov 2022 20:43:54 +0000 (15:43 -0500)]
os/signal/internal/pty: use libc (not cgo) on macOS

This package is only used by tests anyway, but might as well
remove the cgo use on macOS so that it doesn't show up as
a cgo user, as part of our overall strategy to remove cgo use
in the standard library on macOS.

Change-Id: I5a1a39ed56373385f9d43a5e17098035dc1a451a
Reviewed-on: https://go-review.googlesource.com/c/go/+/449315
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2 years agocmd/go/internal/load: remove a special case for "unsafe"
Bryan C. Mills [Thu, 10 Nov 2022 17:30:05 +0000 (12:30 -0500)]
cmd/go/internal/load: remove a special case for "unsafe"

We had a special case to zero out the Target field for package
"unsafe", which is not imported from a normal object file.

As of CL 449376 that special case has been folded into go/build's
logic for setting the PkgObj field, so the special case in
cmd/go/internal/load has become redundant.

(Noticed while investigating CL 449376.)

Updates #47257.
Updates #56687.

Change-Id: I1668123aa6230097aa75e55380d3e2c7937c4b64
Reviewed-on: https://go-review.googlesource.com/c/go/+/449515
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>