1
0
mirror of https://github.com/golang/go synced 2024-11-24 16:40:15 -07:00
Commit Graph

59925 Commits

Author SHA1 Message Date
Egon Elbre
1c4704991a testing: use QueryPerformanceCounter on Windows
Windows time.Now granularity is around 0.5ms on modern systems,
which introduces a significant noise into benchmark results.
Instead of relying time.Now use QueryPerformanceCounter, which
has significantly better granularity compared to time.Now.

 │ TimeNow-32  │        HighPrecisionTimeNow-32        │
 │   sec/op    │    sec/op     vs base                 │
   4.812n ± 0%   30.580n ± 0%  +535.43% (p=0.000 n=20)

Fixes #31160

Change-Id: Ib2a574d638c9c6762a2524212def02265574e267
Reviewed-on: https://go-review.googlesource.com/c/go/+/557315
Reviewed-by: Quim Muntal <quimmuntal@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2024-04-26 22:55:25 +00:00
Dmitriy Matrenichev
9effeeab27 internal/weak: remove unnecessary conversion, fix typo
Remove unnecessary conversion from unsafe.Pointer to unsafe.Pointer.
Also fix small typo in weak.Pointer.Strong method documentation.

Change-Id: I84791fba244581bd6218c589827a61914f0797b4
GitHub-Last-Rev: 7978d07d5b
GitHub-Pull-Request: golang/go#66977
Reviewed-on: https://go-review.googlesource.com/c/go/+/580936
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Commit-Queue: Ian Lance Taylor <iant@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Joedian Reid <joedian@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
2024-04-26 22:13:25 +00:00
Jes Cok
b439f32859 all: make use of sync.Map.Clear
Since CL 515015 added sync.Map.Clear method, we can use it to make
the code simpler and clearer.

Change-Id: I29edc969431b4fd95cd5fd864953a71ca1538dd3
Reviewed-on: https://go-review.googlesource.com/c/go/+/582015
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Joedian Reid <joedian@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
2024-04-26 21:32:11 +00:00
Jonathan Amsterdam
0e7f5cf30b doc/README.md: discourage RELNOTE in CLs
Release notes should always be files under doc/next. Make it clear that
this is the only way to add them: RELNOTE markers in CLs are no longer
supported.

Change-Id: I34d77eb876f57b84ecdc7e5ecbf3eb5c91e6fed8
Reviewed-on: https://go-review.googlesource.com/c/go/+/582075
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Bypass: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2024-04-26 21:24:36 +00:00
Damien Neil
b384ee7ceb net, os, internal/poll: test for use of sendfile
The net package's sendfile tests exercise various paths where
we expect sendfile to be used, but don't verify that sendfile
was in fact used.

Add a hook to internal/poll.SendFile to let us verify that
sendfile was called when expected. Update os package tests
(which use their own hook mechanism) to use this hook as well.

For #66988

Change-Id: I7afb130dcfe0063d60c6ea0f8560cf8665ad5a81
Reviewed-on: https://go-review.googlesource.com/c/go/+/581778
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-04-26 18:12:56 +00:00
Philipp Wollermann
196916299d net: fix sendfile regression with io.Copy on macOS
Since CL 472475, io.Copy can no longer use sendfile on macOS for copying
files to a socket due to a too strict type assertion. This CL fixes the
issue by checking for the necessary interfaces instead of the concrete
os.File type in sendfile_unix_alt.go.

Fixes #66988

Change-Id: Ia0dd190f6575016a191c34a935132907147c8e10
Reviewed-on: https://go-review.googlesource.com/c/go/+/581035
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
2024-04-26 17:08:30 +00:00
Than McIntosh
deeebf5655 cmd/link/internal/ld: more fixes to TestElfBindNow readonly .got check
Second try at fixing the TestElfBindNow testpoint: don't try to check
for readonly ".got" section when using the external linker, since
there is code in some linkers (BFD in particular) that will skip
placing ".got" in relro if the section is below a specific size
threshold. Revised version of the test checks only for readonly
".dynamic" in the external linking case.

Fixes #67063.

Change-Id: Idb6b82ec7893baddf171654775587f6050fc6258
Reviewed-on: https://go-review.googlesource.com/c/go/+/581995
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: abner chenc <chenguoqi@loongson.cn>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-04-26 15:38:14 +00:00
apocelipes
2dd82d97b6 compress: reordering fields to reduce struct sizes
Overall, there are 32 bytes reduced.

Change-Id: I455bf0874b33fa47719f42618e4800c7ff2a9e88
GitHub-Last-Rev: 7670344c4a
GitHub-Pull-Request: golang/go#67010
Reviewed-on: https://go-review.googlesource.com/c/go/+/581355
Reviewed-by: Joedian Reid <joedian@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
2024-04-26 13:32:40 +00:00
go101
4370cfbdf9 slices: optimize Compact and CompactFunc
Try to save a comparison in the loop bodies of Compact and CompactFunc.

Note: due to #64272, some bound checks still fail to be removed.

                            │ old.txt  │             new.txt              │
                            │   sec/op    │   sec/op     vs base                │
Compact/nil-4                 4.191n ± 9%   3.402n ± 1%  -18.84% (p=0.000 n=10)
Compact/one-4                 5.289n ± 2%   4.553n ± 2%  -13.93% (p=0.000 n=10)
Compact/sorted-4              9.865n ± 0%   6.882n ± 1%  -30.24% (p=0.000 n=10)
Compact/2_items-4             11.10n ± 2%   12.11n ± 2%   +9.00% (p=0.000 n=10)
Compact/unsorted-4            9.831n ± 3%   6.918n ± 2%  -29.62% (p=0.000 n=10)
Compact/many-4                16.40n ± 4%   14.90n ± 1%   -9.20% (p=0.000 n=10)
Compact/dup_start-4           29.87n ± 0%   28.06n ± 3%   -6.04% (p=0.001 n=10)
Compact_Large/all_dup-4       13.11µ ± 0%   13.12µ ± 0%        ~ (p=0.971 n=10)
Compact_Large/no_dup-4        6.972µ ± 0%   5.806µ ± 0%  -16.73% (p=0.000 n=10)
CompactFunc/nil-4             5.300n ± 0%   5.309n ± 1%        ~ (p=0.289 n=10)
CompactFunc/one-4             6.051n ± 1%   6.442n ± 3%   +6.46% (p=0.000 n=10)
CompactFunc/sorted-4          16.24n ± 1%   12.79n ± 2%  -21.24% (p=0.000 n=10)
CompactFunc/2_items-4         17.89n ± 1%   17.75n ± 0%   -0.75% (p=0.000 n=10)
CompactFunc/unsorted-4        16.26n ± 0%   12.83n ± 1%  -21.07% (p=0.000 n=10)
CompactFunc/many-4            30.71n ± 1%   29.07n ± 0%   -5.32% (p=0.000 n=10)
CompactFunc/dup_start-4       78.94n ± 1%   67.19n ± 1%  -14.89% (p=0.000 n=10)
CompactFunc_Large/all_dup-4   3.277m ± 0%   3.692m ± 2%  +12.67% (p=0.000 n=10)
CompactFunc_Large/no_dup-4    4.019m ± 0%   2.826m ± 1%  -29.68% (p=0.000 n=10)
geomean                       109.6n        96.99n       -11.47%

Change-Id: Ia4c78fa62e7e9f4ff6a39d0e0a0a84cecf79b9cb
GitHub-Last-Rev: cea3d93155
GitHub-Pull-Request: golang/go#64273
Reviewed-on: https://go-review.googlesource.com/c/go/+/543661
Reviewed-by: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Joedian Reid <joedian@google.com>
Auto-Submit: Keith Randall <khr@golang.org>
2024-04-26 13:32:06 +00:00
qmuntal
5ff0b53174 bytes: skip TestNewBufferShallow if optimization is disabled
TestNewBufferShallow should be skipped if optimization is disabled.

It is currently failing on no-opt builders.

Change-Id: Ib5e62022a56a4e5f158f247d69a6229d2cb4d99e
Reviewed-on: https://go-review.googlesource.com/c/go/+/581915
Auto-Submit: Than McIntosh <thanm@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Auto-Submit: Quim Muntal <quimmuntal@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Joedian Reid <joedian@google.com>
2024-04-26 13:31:36 +00:00
Robert Griesemer
5419f652b6 spec: clarify prose for range over numeric range expressions
Fixes #66967.

Change-Id: I7b9d62dcb83bad60b2ce74e2e2bf1a36c6a8ae38
Reviewed-on: https://go-review.googlesource.com/c/go/+/581256
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>
2024-04-26 00:39:16 +00:00
Than McIntosh
1ca31eac40 cmd/link/internal/ld: revised bindnow/relro test for ELF
This patch re-enables the portion of the TestElfBindNow test that
verifies that selected sections are in a read-only segment. Turns out
we can't always check for read-only ".got" on all architectures (on
ppc64le for example ".got" will only turn up if there is CGO use), so
always look for readonly ".dynamic", but only look for readonly ".got"
if the section is present.

Updates #45681.

Change-Id: I4687ae3cf9a81818268925e17700170ba34204a7
Reviewed-on: https://go-review.googlesource.com/c/go/+/581115
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-04-25 20:23:29 +00:00
Derek Parker
57026007c8 cmd/compile: teach dse about equivalent LocalAddrs
This patch teaches DSE that two LocalAddrs of the same variable
are equal, even if they are from different memory states. This avoids
dependance on a store into the same LocalAddr being added to
loadUse even though the store is unnecessary and is in fact
shadowed.

Fixes #59021

Change-Id: I0ef128b783c4ad6fd2236fa5ff20345b4d31eddb
GitHub-Last-Rev: b80a6b28fb
GitHub-Pull-Request: golang/go#66793
Reviewed-on: https://go-review.googlesource.com/c/go/+/578376
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Joedian Reid <joedian@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
2024-04-25 20:07:26 +00:00
qmuntal
a8ba163695 runtime: fix mcall unwinding on Windows
The Windows native stack unwinder incorrectly classifies the next
instruction after the mcall callback call as being part of the function
epilogue, producing a wrong call stack.

Add a NOP after the callback call to work around this issue.

Fixes #67007.

Change-Id: I6017635da895b272b1852391db9a255ca69e335d
Reviewed-on: https://go-review.googlesource.com/c/go/+/581335
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Quim Muntal <quimmuntal@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-04-25 18:50:21 +00:00
Robert Griesemer
fd99157f9d go/types, types2: refactor Checker.rangeStmt for clarity
Change-Id: I0c2f921389416ab222b84f77699fd4b3246ef0e0
Reviewed-on: https://go-review.googlesource.com/c/go/+/581776
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
2024-04-25 17:49:48 +00:00
guoguangwu
a4031ea1f5 all: fix typos in comments
Change-Id: Ib2e77cff4c10f66316295cbd67f52606cbf9972b
GitHub-Last-Rev: 088c033b2d
GitHub-Pull-Request: golang/go#67032
Reviewed-on: https://go-review.googlesource.com/c/go/+/581675
Auto-Submit: Keith Randall <khr@golang.org>
Commit-Queue: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
2024-04-25 17:41:54 +00:00
Robert Griesemer
06478e4b46 go/types, types2: simplify Default function
Change-Id: Ie2b7c1324ec7947c6ff43187dda99b83bcb64f08
Reviewed-on: https://go-review.googlesource.com/c/go/+/581775
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-04-25 17:07:36 +00:00
Sam Thanawalla
8c0da423f7 cmd/go: go env GOMOD should not download newer toolchain
It is not neccessary to download a newer toolchain to display the path
to GOMOD or GOWORK.

Fixes: #61455

Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-windows-amd64-longtest
Change-Id: I0b031651ad9bfeb5565361ecaff6908640ccf9c8
Reviewed-on: https://go-review.googlesource.com/c/go/+/581275
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
2024-04-25 16:05:39 +00:00
Russ Cox
8960925ad8 time: deflake TestChan/asynctimerchan=1 tests
The overall time package tests increase from 3.85s to 4.85s on my laptop.
But they should be less flaky, and the time is spent sleeping, so it won't
slow down the overall machine running multiple package tests in
parallel.

For #66322.

Change-Id: I66d6647c389c943b53045e8836ede4ba3d4670c7
Reviewed-on: https://go-review.googlesource.com/c/go/+/581315
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2024-04-25 11:28:32 +00:00
Robert Griesemer
db5f2b4153 spec: clarify when a range expression is evaluated
If the range expression is a numeric constant, the
range expression is also not evaluated.

Change-Id: I97201e5c136d3d1a87ed1500b19b7199b30bc9ff
Reviewed-on: https://go-review.googlesource.com/c/go/+/581298
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
2024-04-25 01:05:15 +00:00
Jes Cok
4351af68eb net/http: improve continue statements for tests
Change-Id: I302368c17fbb6983bd14ab72784076e548ed8829
Reviewed-on: https://go-review.googlesource.com/c/go/+/581475
Auto-Submit: Ian Lance Taylor <iant@google.com>
Commit-Queue: Ian Lance Taylor <iant@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2024-04-25 01:02:12 +00:00
Nigel Tao
e7aeeae0c8 image/jpeg: ignore garbage bytes before a RST marker
Well-formed JPEG images will not have garbage bytes. However, for
corrupted JPEG images, the RST (restart) mechanism is specifically
designed so that a decoder can re-synchronize to an upcoming restartable
MCU (Minimum Coded Unit, e.g. 16x16 block of pixels) boundary and resume
decoding. Even if the resultant image isn't perfect, a 98%-good image is
better than a fatal error.

Every JPEG marker is encoded in two bytes, the first of which is 0xFF.
There are 8 possible RST markers, cycling as "0xFF 0xD0", "0xFF 0xD1",
..., "0xFF 0xD7". Suppose that, our decoder is expecting "0xFF 0xD1".

Before this commit, Go's image/jpeg package would accept only two
possible inputs: a well-formed "0xFF 0xD1" or one very specific pattern
of spec non-compliance, "0xFF 0x00 0xFF 0xD1".

After this commit, it is more lenient, similar to libjpeg's jdmarker.c's
next_marker function.
2dfe6c0fe9/jdmarker.c (L892-L935)

The new testdata file was created by:

$ convert video-001.png a.ppm
$ cjpeg -restart 2 a.ppm > video-001.restart2.jpeg
$ rm a.ppm

Fixes #40130

Change-Id: Ic598a5f489f110d6bd63e0735200fb6acac3aca3
Reviewed-on: https://go-review.googlesource.com/c/go/+/580755
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Joedian Reid <joedian@google.com>
2024-04-25 00:46:29 +00:00
Robert Griesemer
799968dfc3 go.types, types2: factor out isUntypedNumeric predicate
No need for Unalias or under calls for this predicate.

Change-Id: Idcdcda3e153d829ee5b26ad112ccfda3f4efedde
Reviewed-on: https://go-review.googlesource.com/c/go/+/581255
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Robert Griesemer <gri@google.com>
2024-04-25 00:43:27 +00:00
Alan Donovan
9b9de261bd go/types: add Alias.Rhs
This method returns the type on the right-hand side of an
alias declaration such as type L = R.

Fixes #66559

Change-Id: I396f2d999680ad251f47cdde20856ae20fc1c40a
Reviewed-on: https://go-review.googlesource.com/c/go/+/581615
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Alan Donovan <adonovan@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
2024-04-24 21:50:16 +00:00
Roland Shoemaker
e689118852 crypto/tls: skip bogo suite on windows builders
Updates #66913

Change-Id: Ie6bb262ee95593d23a93ef06656a561a7b1006ba
Reviewed-on: https://go-review.googlesource.com/c/go/+/581515
Auto-Submit: Roland Shoemaker <roland@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
2024-04-24 18:15:23 +00:00
Michael Pratt
d037bba19b cmd/compile: add debug log prior to export data lookup
If there is a crash in LookupFunc (which has occurred a few times now),
this ensures that we log the offending symbol before crashing.

For #67016.

Change-Id: I0119597de2be3d1b97c41a9361273d1feb90ec11
Reviewed-on: https://go-review.googlesource.com/c/go/+/581437
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-04-24 15:55:17 +00:00
Michael Pratt
508e761978 cmd/compile: bail PGO method lookup on interface types
Interface types don't have concrete method implementations, so it does
not make sense to attempt a lookup.

An interface method would not normally appear in a PGO profile as it has
no symbol in the final binary. However it can appear if the method was
concrete when the profile was collected and it has since been refactored
to an interface method in the code being compiled.

The guards here (OTYPE, !Alias, !IsInterface) now match
noder.linker.relocObj, which does a similar iteration of all methods.

Fixes #67016.

Change-Id: I858c58929c890ac0b2019fbd7c99f683ab63f8bb
Reviewed-on: https://go-review.googlesource.com/c/go/+/581436
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2024-04-24 15:55:11 +00:00
Paul E. Murphy
3aad2d0765 cmd/internal/obj/ppc64: fix incorrect int to int64 conversion when checking MOVD opcodes
A type conversion from int to int64 was done in the wrong place causing
some MOVD $const, Rx operations to be incorrectly transformed on 32 bit
hosts cross-compiling for ppc64x.

Fixes #66955

Change-Id: I023ba267a8dac6d6bd22f8146c0d9d2d473bc5c1
Reviewed-on: https://go-review.googlesource.com/c/go/+/580796
Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
Reviewed-by: Joedian Reid <joedian@google.com>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-04-24 15:53:25 +00:00
guoguangwu
4792ca7b93 doc: fix typos in docs
Change-Id: Ib51283b35d6d35acd7a90cd531ff6897a23d9894
GitHub-Last-Rev: dd485f332e
GitHub-Pull-Request: golang/go#66985
Reviewed-on: https://go-review.googlesource.com/c/go/+/580797
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Joedian Reid <joedian@google.com>
2024-04-24 13:37:36 +00:00
Joe Tsai
62dfa43101 bytes: add test to ensure shallow copy of NewBuffer does not allocate
At present, there is no API to reset the underlying []byte
of an existing Buffer struct, except to shallow copy
the entire Buffer struct.

Updates #67004

Change-Id: I08998f7a95ae5bde0897d86247d47f23cd784583
Reviewed-on: https://go-review.googlesource.com/c/go/+/581297
Auto-Submit: Joseph Tsai <joetsai@digital-static.net>
Reviewed-by: Joedian Reid <joedian@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Run-TryBot: Joseph Tsai <joetsai@digital-static.net>
Reviewed-by: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-04-24 13:36:51 +00:00
Rhys Hiltner
fc6a5ea88c runtime: test mutex contention stacks and counts
Fully testing the runtime's profiles and metrics for contention on its
internal mutex values involves comparing two separate clocks (cputicks
for the profile and nanotime for the metric), verifying its fractional
sampling (when MutexProfileRate is greater than 1), and observing a very
small critical section outside of the test's control (semrelease).
Flakiness (#64253) from those parts of the test have led to skipping it
entirely.

But there are portions of the mutex profiling behavior that should have
more consistent behavior: for a mutex under the test's control, the test
and the runtime should be able to agree that the test successfully
induced contention, and should agree on the call stack that caused the
contention. Allow those more consistent parts to run.

For #64253

Change-Id: I7f368d3265a5c003da2765164276fab616eb9959
Reviewed-on: https://go-review.googlesource.com/c/go/+/581296
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Joedian Reid <joedian@google.com>
Auto-Submit: Rhys Hiltner <rhys.hiltner@gmail.com>
2024-04-24 13:36:48 +00:00
Austin Clements
960fa9bf66 sync: add examples for OnceValue and OnceValues
Updates #56102.

Change-Id: I2ee2dbc43b4333511d9d23752fdc574dfbf5f5bd
Reviewed-on: https://go-review.googlesource.com/c/go/+/481062
Reviewed-by: Andrew Gerrand <adg@golang.org>
Auto-Submit: Austin Clements <austin@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Joedian Reid <joedian@google.com>
2024-04-23 17:45:47 +00:00
gucio321
a62c290c50 src/buildall.bash: use grep -E instead of egrep
according to https://www.phoronix.com/news/GNU-Grep-3.8-Stop-egrep-fgrep egrep and fgrep should not be used anymore. thats why using buildall.bash throws the following warning: egrep: warning: egrep is obsolescent; using grep -E

Change-Id: I2f3be55ebaa7826a7f89a93d756e083b9bddfb03
GitHub-Last-Rev: 60be0651af
GitHub-Pull-Request: golang/go#66990
Reviewed-on: https://go-review.googlesource.com/c/go/+/581055
Reviewed-by: Joedian Reid <joedian@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-04-23 17:45:23 +00:00
Ian Lance Taylor
08e73e6152 debug/elf: remove incorrect doc link
Here Version is a field in Symbol, not the elf.Version type.

Change-Id: I0285937d806d1a9b53b49420b45a07744be244c2
Reviewed-on: https://go-review.googlesource.com/c/go/+/563095
Reviewed-by: Ian Lance Taylor <iant@google.com>
Commit-Queue: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Austin Clements <austin@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
2024-04-23 16:49:58 +00:00
Ian Lance Taylor
8d880da1c4 cmd/cgo/internal/test: don't skip some tests on musl
They reportedly work at least as of Alpine 3.18.

Fixes #39857

Change-Id: I6a249d61d33e467bf32e8c250f870fc261b90941
Reviewed-on: https://go-review.googlesource.com/c/go/+/563096
Auto-Submit: Ian Lance Taylor <iant@google.com>
Commit-Queue: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Austin Clements <austin@google.com>
2024-04-23 16:49:01 +00:00
racequite
83613293d8 all: fix some typos in comments
This change fixes some typographic errors that I found in various packages.

Change-Id: Ie2d0316f0137d6521496d389a9777659ae22128b
GitHub-Last-Rev: 0307b03d50
GitHub-Pull-Request: golang/go#66917
Reviewed-on: https://go-review.googlesource.com/c/go/+/580077
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Commit-Queue: Ian Lance Taylor <iant@golang.org>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
2024-04-23 16:37:32 +00:00
Michael Anthony Knyszek
0304d035cd runtime: switch to systemstack before throw in casgstatus
CL 580255 increased the frame size of entersyscall and reentersyscall,
which is causing the x/sys repository to fail to build for
windows/arm64 because of an overflow of the nosplit stack reservation.

Fix this by wrapping the other call to throw in casgstatus in a system
stack switch. This is a fatal throw anyway indicating a core runtime
invariant is broken, so this path is basically never taken. This cuts
off the nosplit frame chain and allows x/sys to build.

Change-Id: I00b16c9db3a7467413ed48953c7f8a9a750f000a
Reviewed-on: https://go-review.googlesource.com/c/go/+/580775
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-04-23 02:53:00 +00:00
Cherry Mui
9702cd980f cmd/compile: mark closure DUPOK if the outer function is
If a function is DUPOK (e.g. an instantiation of a generic
function) and contains closures, the closure also needs to be
DUPOK. Otherwise, when the outer function is included in multiple
packages, the closure will also be included in these packages, and
the linker will dedup the outer function but not the closure,
causing duplicated symbols. In normal builds it is mostly still ok
as these closure symbols are only referenced by indices. But in
shared build mode all symbols are named and kept live, causing an
error.

Should fix the shared build mode.

Change-Id: I227d26e589465440335a4ec7e33d29739ed44aad
Reviewed-on: https://go-review.googlesource.com/c/go/+/580917
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Than McIntosh <thanm@google.com>
2024-04-23 01:21:39 +00:00
Cherry Mui
0c39dc1ff7 runtime: reduce stack usage for asmcgocall on PPC64
Define it as ABIInternal, so the result does not take space on
stack.

Also use R10 as a temporary register for arithmetics on SP, so it
is hidden from the assembler's SP delta calculation, which is
irrelevant anyway as we are on the system stack.

Change-Id: I8fed467601c19cad2d7afab26978246d15ce3147
Reviewed-on: https://go-review.googlesource.com/c/go/+/580918
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2024-04-22 22:46:08 +00:00
Sabyrzhan Tasbolatov
552faa8927 runtime: reduced struct sizes found via pahole
During my research of pahole with Go structs, I've found couple of
structs in runtime/ pkg where we can reduce several structs' sizes
highligted by pahole tool which detect byte holes and paddings.

Overall, there are 80 bytes reduced.

Change-Id: I398e5ed6f5b199394307741981cb5ad5b875e98f
Reviewed-on: https://go-review.googlesource.com/c/go/+/578795
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Joedian Reid <joedian@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-04-22 22:07:41 +00:00
Jes Cok
674657e130 net/http: correct error messages for TestParseSetCookie
This change fixes typos in error messages, while here, also improves
'line' strings to indicate the errEqualNotFoundInCookie error.

Change-Id: I0ce6115c605844d2d86f337f208fd3b2d3774674
Reviewed-on: https://go-review.googlesource.com/c/go/+/579799
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Joedian Reid <joedian@google.com>
Auto-Submit: Damien Neil <dneil@google.com>
2024-04-22 22:06:46 +00:00
Lev Ustimenko
5a3b6400ef Refactor output message
"/reflect/all_test.go : refactor message."

This PR corrects a syntax

%value -> %v

Change-Id: Ie56b93d238f090c564a88eb963dc9b7773054356
GitHub-Last-Rev: 023fde3ed4
GitHub-Pull-Request: golang/go#66974
Reviewed-on: https://go-review.googlesource.com/c/go/+/580935
Reviewed-by: Joedian Reid <joedian@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
2024-04-22 22:06:14 +00:00
Michael Anthony Knyszek
aa63ef4b8b internal/intern: delete unused package
The functionality within has been replaced with the unique package, and
all uses of it have been replaced by uses of the unique package.

Change-Id: I399ca72972c712711d4ec6a5ddbdbcba7088ecd1
Reviewed-on: https://go-review.googlesource.com/c/go/+/577036
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-04-22 20:48:19 +00:00
Michael Anthony Knyszek
6737f4cee5 runtime: set gp.syscallbp from entersyscallblock_handoff
This was an oversight and is causing a few failures, most notably on
Solaris and Illumos, but also occasionally on the Linux builders.

Change-Id: I38bd28537ad01d955675f61f9b1d42b9ecdd1ef0
Reviewed-on: https://go-review.googlesource.com/c/go/+/580875
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-04-22 20:21:45 +00:00
Michael Pratt
1f4bcee2cd runtime: move zeroVal out of map.go
It isn't specific to maps, so put it in a more general location.

For #54766.

Change-Id: Ia3f3ebe8c347cfa5a8582082a306f4df4e05818d
Reviewed-on: https://go-review.googlesource.com/c/go/+/580777
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-04-22 20:09:01 +00:00
Keith Randall
9f9dd2bfd8 cmd/compile: fix cmpstring rewrite rule
We need to ensure that the Select0 lives in the same block as
its argument. Divide up the rule into 2 so that we can put the
parts in the right places.

(This would be simpler if we could use @block syntax mid-rule, but
that feature currently only works at the top level.)

This fixes the ssacheck builder after CL 578835

Change-Id: Id26a01d9fac0684e0b732d35d0f7999f6de07825
Reviewed-on: https://go-review.googlesource.com/c/go/+/580815
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
2024-04-22 18:24:47 +00:00
Michael Anthony Knyszek
79065f0a5e net/netip: use the unique package instead of internal/intern
This change replaces net/netip's use of the internal/intern package with
the new unique package.

Below are the benchmark results for the package. Lots of things get
faster, but some things get slower. The single-core performance of
unique.Make is expected to be a tad slower than internal/intern, but is
vastly more scalable. No benchmark in this package currently
demonstrates this, however.

                                    │ before.bench  │             after.bench              │
                                    │    sec/op     │    sec/op      vs base               │
IPNextPrev-48                          85.66n ± ∞ ¹    85.61n ± ∞ ¹        ~ (p=0.690 n=5)
BinaryMarshalRoundTrip/ipv4-48         16.12n ± ∞ ¹    15.84n ± ∞ ¹   -1.74% (p=0.008 n=5)
BinaryMarshalRoundTrip/ipv6-48         33.14n ± ∞ ¹    32.49n ± ∞ ¹   -1.96% (p=0.016 n=5)
BinaryMarshalRoundTrip/ipv6+zone-48    88.84n ± ∞ ¹   101.50n ± ∞ ¹  +14.25% (p=0.008 n=5)
StdIPv4-48                             126.6n ± ∞ ¹    157.2n ± ∞ ¹  +24.17% (p=0.008 n=5)
IPv4-48                                101.2n ± ∞ ¹    101.0n ± ∞ ¹        ~ (p=0.452 n=5)
IPv4_inline-48                         131.7n ± ∞ ¹    101.2n ± ∞ ¹  -23.16% (p=0.008 n=5)
StdIPv6-48                             180.6n ± ∞ ¹    178.7n ± ∞ ¹   -1.05% (p=0.040 n=5)
IPv6-48                                136.7n ± ∞ ¹    137.4n ± ∞ ¹        ~ (p=0.135 n=5)
IPv4Contains-48                        4.650n ± ∞ ¹    5.287n ± ∞ ¹  +13.70% (p=0.008 n=5)
IPv6Contains-48                        5.284n ± ∞ ¹    5.290n ± ∞ ¹        ~ (p=0.540 n=5)
ParseAddr/v4-48                        23.94n ± ∞ ¹    23.62n ± ∞ ¹        ~ (p=0.841 n=5)
ParseAddr/v6-48                        84.95n ± ∞ ¹    80.64n ± ∞ ¹   -5.07% (p=0.008 n=5)
ParseAddr/v6_ellipsis-48               51.54n ± ∞ ¹    51.62n ± ∞ ¹        ~ (p=1.000 n=5)
ParseAddr/v6_v4-48                     55.85n ± ∞ ¹    56.56n ± ∞ ¹   +1.27% (p=0.008 n=5)
ParseAddr/v6_zone-48                   110.0n ± ∞ ¹    124.6n ± ∞ ¹  +13.27% (p=0.008 n=5)
StdParseIP/v4-48                       54.05n ± ∞ ¹    53.74n ± ∞ ¹   -0.57% (p=0.016 n=5)
StdParseIP/v6-48                       111.6n ± ∞ ¹    111.7n ± ∞ ¹        ~ (p=0.651 n=5)
StdParseIP/v6_ellipsis-48              81.81n ± ∞ ¹    82.15n ± ∞ ¹   +0.42% (p=0.008 n=5)
StdParseIP/v6_v4-48                    89.36n ± ∞ ¹    90.72n ± ∞ ¹   +1.52% (p=0.008 n=5)
StdParseIP/v6_zone-48                  138.7n ± ∞ ¹    150.7n ± ∞ ¹   +8.65% (p=0.008 n=5)
AddrString/v4-48                       36.43n ± ∞ ¹    36.33n ± ∞ ¹        ~ (p=0.508 n=5)
AddrString/v6-48                       106.1n ± ∞ ¹    102.5n ± ∞ ¹   -3.39% (p=0.008 n=5)
AddrString/v6_ellipsis-48              93.93n ± ∞ ¹    92.87n ± ∞ ¹   -1.13% (p=0.008 n=5)
AddrString/v6_v4-48                    43.09n ± ∞ ¹    43.33n ± ∞ ¹        ~ (p=0.111 n=5)
AddrString/v6_zone-48                  91.15n ± ∞ ¹    89.22n ± ∞ ¹   -2.12% (p=0.008 n=5)
IPStringExpanded/v4-48                 37.99n ± ∞ ¹    37.77n ± ∞ ¹   -0.58% (p=0.032 n=5)
IPStringExpanded/v6-48                 63.59n ± ∞ ¹    63.58n ± ∞ ¹        ~ (p=0.690 n=5)
IPStringExpanded/v6_ellipsis-48        64.33n ± ∞ ¹    63.50n ± ∞ ¹   -1.29% (p=0.024 n=5)
IPStringExpanded/v6_v4-48              64.79n ± ∞ ¹    63.08n ± ∞ ¹   -2.64% (p=0.008 n=5)
IPStringExpanded/v6_zone-48            111.7n ± ∞ ¹    109.7n ± ∞ ¹   -1.79% (p=0.016 n=5)
AddrMarshalText/v4-48                  34.45n ± ∞ ¹    34.04n ± ∞ ¹        ~ (p=0.151 n=5)
AddrMarshalText/v6-48                  105.2n ± ∞ ¹    102.6n ± ∞ ¹   -2.47% (p=0.008 n=5)
AddrMarshalText/v6_ellipsis-48         99.69n ± ∞ ¹    98.56n ± ∞ ¹        ~ (p=0.151 n=5)
AddrMarshalText/v6_v4-48               48.22n ± ∞ ¹    47.33n ± ∞ ¹        ~ (p=0.151 n=5)
AddrMarshalText/v6_zone-48             98.55n ± ∞ ¹    94.82n ± ∞ ¹   -3.78% (p=0.008 n=5)
AddrPortString/v4-48                   59.03n ± ∞ ¹    50.09n ± ∞ ¹  -15.14% (p=0.008 n=5)
AddrPortString/v6-48                   118.2n ± ∞ ¹    113.3n ± ∞ ¹   -4.15% (p=0.008 n=5)
AddrPortString/v6_ellipsis-48          110.1n ± ∞ ¹    107.3n ± ∞ ¹   -2.54% (p=0.008 n=5)
AddrPortString/v6_v4-48                66.48n ± ∞ ¹    58.80n ± ∞ ¹  -11.55% (p=0.008 n=5)
AddrPortString/v6_zone-48              106.7n ± ∞ ¹    104.9n ± ∞ ¹   -1.69% (p=0.008 n=5)
AddrPortMarshalText/v4-48              56.67n ± ∞ ¹    54.19n ± ∞ ¹   -4.38% (p=0.008 n=5)
AddrPortMarshalText/v6-48              125.1n ± ∞ ¹    122.1n ± ∞ ¹   -2.40% (p=0.008 n=5)
AddrPortMarshalText/v6_ellipsis-48     120.1n ± ∞ ¹    118.0n ± ∞ ¹   -1.75% (p=0.024 n=5)
AddrPortMarshalText/v6_v4-48           71.53n ± ∞ ¹    70.25n ± ∞ ¹        ~ (p=0.548 n=5)
AddrPortMarshalText/v6_zone-48         116.4n ± ∞ ¹    114.0n ± ∞ ¹   -2.06% (p=0.016 n=5)
PrefixMasking/IPv4_/32-48              5.259n ± ∞ ¹    5.289n ± ∞ ¹   +0.57% (p=0.016 n=5)
PrefixMasking/IPv4_/17-48              5.286n ± ∞ ¹    5.284n ± ∞ ¹        ~ (p=0.937 n=5)
PrefixMasking/IPv4_/0-48               5.266n ± ∞ ¹    5.280n ± ∞ ¹        ~ (p=0.151 n=5)
PrefixMasking/IPv6_/128-48             5.271n ± ∞ ¹    5.284n ± ∞ ¹        ~ (p=0.151 n=5)
PrefixMasking/IPv6_/65-48              5.256n ± ∞ ¹    5.282n ± ∞ ¹        ~ (p=0.317 n=5)
PrefixMasking/IPv6_/0-48               5.253n ± ∞ ¹    5.284n ± ∞ ¹        ~ (p=0.095 n=5)
PrefixMasking/IPv6_zone_/128-48        5.274n ± ∞ ¹    5.284n ± ∞ ¹        ~ (p=0.222 n=5)
PrefixMasking/IPv6_zone_/65-48         5.280n ± ∞ ¹    5.291n ± ∞ ¹        ~ (p=0.095 n=5)
PrefixMasking/IPv6_zone_/0-48          5.283n ± ∞ ¹    5.292n ± ∞ ¹        ~ (p=0.095 n=5)
PrefixMarshalText-48                   44.60n ± ∞ ¹    44.81n ± ∞ ¹        ~ (p=1.000 n=5)
ParseAddrPort/v4-48                    46.40n ± ∞ ¹    41.27n ± ∞ ¹  -11.06% (p=0.008 n=5)
ParseAddrPort/v6-48                   106.90n ± ∞ ¹    99.29n ± ∞ ¹   -7.12% (p=0.008 n=5)
ParseAddrPort/v6_ellipsis-48           77.10n ± ∞ ¹    69.98n ± ∞ ¹   -9.23% (p=0.008 n=5)
ParseAddrPort/v6_v4-48                 71.82n ± ∞ ¹    74.97n ± ∞ ¹   +4.39% (p=0.008 n=5)
ParseAddrPort/v6_zone-48               130.0n ± ∞ ¹    148.5n ± ∞ ¹  +14.23% (p=0.008 n=5)
As16-48                                7.446n ± ∞ ¹    7.437n ± ∞ ¹        ~ (p=0.286 n=5)
geomean                                45.52n          45.18n         -0.76%
¹ need >= 6 samples for confidence interval at level 0.95

                                   │ before.bench │             after.bench             │
                                   │     B/op     │    B/op      vs base                │
StdIPv4-48                            16.00 ± ∞ ¹   16.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
IPv4-48                               0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
IPv4_inline-48                        0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
StdIPv6-48                            16.00 ± ∞ ¹   16.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
IPv6-48                               0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
IPv4Contains-48                       0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
IPv6Contains-48                       0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
ParseAddr/v4-48                       0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
ParseAddr/v6-48                       0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
ParseAddr/v6_ellipsis-48              0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
ParseAddr/v6_v4-48                    0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
ParseAddr/v6_zone-48                  0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
StdParseIP/v4-48                      16.00 ± ∞ ¹   16.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
StdParseIP/v6-48                      16.00 ± ∞ ¹   16.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
StdParseIP/v6_ellipsis-48             16.00 ± ∞ ¹   16.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
StdParseIP/v6_v4-48                   16.00 ± ∞ ¹   16.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
StdParseIP/v6_zone-48                 16.00 ± ∞ ¹   16.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrString/v4-48                      16.00 ± ∞ ¹   16.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrString/v6-48                      48.00 ± ∞ ¹   48.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrString/v6_ellipsis-48             24.00 ± ∞ ¹   24.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrString/v6_v4-48                   24.00 ± ∞ ¹   24.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrString/v6_zone-48                 24.00 ± ∞ ¹   24.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
IPStringExpanded/v4-48                16.00 ± ∞ ¹   16.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
IPStringExpanded/v6-48                48.00 ± ∞ ¹   48.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
IPStringExpanded/v6_ellipsis-48       48.00 ± ∞ ¹   48.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
IPStringExpanded/v6_v4-48             48.00 ± ∞ ¹   48.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
IPStringExpanded/v6_zone-48           128.0 ± ∞ ¹   128.0 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrMarshalText/v4-48                 16.00 ± ∞ ¹   16.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrMarshalText/v6-48                 48.00 ± ∞ ¹   48.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrMarshalText/v6_ellipsis-48        48.00 ± ∞ ¹   48.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrMarshalText/v6_v4-48              32.00 ± ∞ ¹   32.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrMarshalText/v6_zone-48            48.00 ± ∞ ¹   48.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrPortString/v4-48                  24.00 ± ∞ ¹   24.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrPortString/v6-48                  48.00 ± ∞ ¹   48.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrPortString/v6_ellipsis-48         32.00 ± ∞ ¹   32.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrPortString/v6_v4-48               32.00 ± ∞ ¹   32.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrPortString/v6_zone-48             32.00 ± ∞ ¹   32.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrPortMarshalText/v4-48             24.00 ± ∞ ¹   24.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrPortMarshalText/v6-48             64.00 ± ∞ ¹   64.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrPortMarshalText/v6_ellipsis-48    64.00 ± ∞ ¹   64.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrPortMarshalText/v6_v4-48          64.00 ± ∞ ¹   64.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrPortMarshalText/v6_zone-48        64.00 ± ∞ ¹   64.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
PrefixMasking/IPv4_/32-48             0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
PrefixMasking/IPv4_/17-48             0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
PrefixMasking/IPv4_/0-48              0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
PrefixMasking/IPv6_/128-48            0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
PrefixMasking/IPv6_/65-48             0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
PrefixMasking/IPv6_/0-48              0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
PrefixMasking/IPv6_zone_/128-48       0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
PrefixMasking/IPv6_zone_/65-48        0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
PrefixMasking/IPv6_zone_/0-48         0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
PrefixMarshalText-48                  24.00 ± ∞ ¹   24.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
ParseAddrPort/v4-48                   0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
ParseAddrPort/v6-48                   0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
ParseAddrPort/v6_ellipsis-48          0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
ParseAddrPort/v6_v4-48                0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
ParseAddrPort/v6_zone-48              0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
geomean                                         ³                +0.00%               ³
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
³ summaries must be >0 to compute geomean

                                   │ before.bench │             after.bench             │
                                   │  allocs/op   │  allocs/op   vs base                │
StdIPv4-48                            1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
IPv4-48                               0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
IPv4_inline-48                        0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
StdIPv6-48                            1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
IPv6-48                               0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
IPv4Contains-48                       0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
IPv6Contains-48                       0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
ParseAddr/v4-48                       0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
ParseAddr/v6-48                       0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
ParseAddr/v6_ellipsis-48              0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
ParseAddr/v6_v4-48                    0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
ParseAddr/v6_zone-48                  0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
StdParseIP/v4-48                      1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
StdParseIP/v6-48                      1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
StdParseIP/v6_ellipsis-48             1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
StdParseIP/v6_v4-48                   1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
StdParseIP/v6_zone-48                 1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrString/v4-48                      1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrString/v6-48                      1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrString/v6_ellipsis-48             1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrString/v6_v4-48                   1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrString/v6_zone-48                 1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
IPStringExpanded/v4-48                1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
IPStringExpanded/v6-48                1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
IPStringExpanded/v6_ellipsis-48       1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
IPStringExpanded/v6_v4-48             1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
IPStringExpanded/v6_zone-48           2.000 ± ∞ ¹   2.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrMarshalText/v4-48                 1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrMarshalText/v6-48                 1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrMarshalText/v6_ellipsis-48        1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrMarshalText/v6_v4-48              1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrMarshalText/v6_zone-48            1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrPortString/v4-48                  1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrPortString/v6-48                  1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrPortString/v6_ellipsis-48         1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrPortString/v6_v4-48               1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrPortString/v6_zone-48             1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrPortMarshalText/v4-48             1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrPortMarshalText/v6-48             1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrPortMarshalText/v6_ellipsis-48    1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrPortMarshalText/v6_v4-48          1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
AddrPortMarshalText/v6_zone-48        1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
PrefixMasking/IPv4_/32-48             0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
PrefixMasking/IPv4_/17-48             0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
PrefixMasking/IPv4_/0-48              0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
PrefixMasking/IPv6_/128-48            0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
PrefixMasking/IPv6_/65-48             0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
PrefixMasking/IPv6_/0-48              0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
PrefixMasking/IPv6_zone_/128-48       0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
PrefixMasking/IPv6_zone_/65-48        0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
PrefixMasking/IPv6_zone_/0-48         0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
PrefixMarshalText-48                  1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
ParseAddrPort/v4-48                   0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
ParseAddrPort/v6-48                   0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
ParseAddrPort/v6_ellipsis-48          0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
ParseAddrPort/v6_v4-48                0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
ParseAddrPort/v6_zone-48              0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
geomean                                         ³                +0.00%               ³
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
³ summaries must be >0 to compute geomean

Change-Id: Ieec7d1f0836f3ee93a33653aee9b0c0fc77f399d
Reviewed-on: https://go-review.googlesource.com/c/go/+/577035
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
2024-04-22 18:14:15 +00:00
Michael Anthony Knyszek
a088e230d4 unique: add unique package and implement Make/Handle
This change adds the unique package for canonicalizing values, as
described by the proposal in #62483.

Fixes #62483.

Change-Id: I1dc3d34ec12351cb4dc3838a8ea29a5368d59e99
Reviewed-on: https://go-review.googlesource.com/c/go/+/574355
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ingo Oeser <nightlyone@googlemail.com>
Reviewed-by: David Chase <drchase@google.com>
2024-04-22 18:14:07 +00:00
Ian Lance Taylor
654c3368e5 cmd/go: update comment to not say GO386 does not exist
GO386 was removed by CL 258957, but it was restored by CL 260017.

Change-Id: Iced49ca61512a0f2ef513acbf9700a87ac964c68
Reviewed-on: https://go-review.googlesource.com/c/go/+/580675
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
2024-04-22 17:58:25 +00:00
Than McIntosh
ed2671aa15 cmd/link/internal/ld: temporarily add skip for new portion of TestElfBindNow
Skip newly added sections in TestElfBindNow from elf_test.go
temporarily pending resolution of failures on loong64 and ppc64le.

Change-Id: I22e0e52c9fbbcad88a4d0088f631ed7be15bf9da
Reviewed-on: https://go-review.googlesource.com/c/go/+/580776
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2024-04-22 17:13:24 +00:00