]> Cypherpunks repositories - gostls13.git/log
gostls13.git
6 years agonet/http: add StatusTooEarly (425)
Leon Klingele [Mon, 3 Dec 2018 04:44:48 +0000 (04:44 +0000)]
net/http: add StatusTooEarly (425)

StatusTooEarly can be returned to indicate that a server is unwilling
to accept early data as introduced in TLS 1.3.
The status code was specified in RFC 8470, section 5.2.

Major supported browsers are:
- Firefox as of version 58
  https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/425#Browser_compatibility
- Chromium as of version 73.0.3628.1
  https://chromium.googlesource.com/chromium/src/+/58097ec3823e0f340ab5abfcaec1306e1d954c5a

Change-Id: I3f62f4193bae198994d08fde7e92e0ccd080e59a
GitHub-Last-Rev: fa885040eaf80e0e33b571567108d8a9ded67801
GitHub-Pull-Request: golang/go#29073
Reviewed-on: https://go-review.googlesource.com/c/152118
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
6 years agocmd/compile: for location lists, handle case where prev block is not a pred
David Chase [Thu, 1 Nov 2018 19:26:02 +0000 (15:26 -0400)]
cmd/compile: for location lists, handle case where prev block is not a pred

Before this change, location list construction would extend
from the previous (in linear order) block, even if was not a
flow predecessor.  This can cause a debugger to tell lies.

Fix accounts for this in block merging code by (crudely)
"changing" all variables live from a previous block if it
is not also a predecessor.

Fixes #28486.

Change-Id: I11336b0b969f0cd09f40f4e5f2bdfdeb02f377a4
Reviewed-on: https://go-review.googlesource.com/c/146718
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
6 years agoall: use "reports whether" consistently instead of "returns whether"
Tobias Klauser [Thu, 22 Nov 2018 10:46:44 +0000 (11:46 +0100)]
all: use "reports whether" consistently instead of "returns whether"

Follow-up for CL 147037 and after Brad noticed the "returns whether"
pattern during the review of CL 150621.

Go documentation style for boolean funcs is to say:

    // Foo reports whether ...
    func Foo() bool

(rather than "returns whether")

Created with:

    $ perl -i -npe 's/returns whether/reports whether/' $(git grep -l "returns whether" | grep -v vendor)

Change-Id: I15fe9ff99180ad97750cd05a10eceafdb12dc0b4
Reviewed-on: https://go-review.googlesource.com/c/150918
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
6 years agocmd/compile: add Buffer.Grow to TestIntendedInlining
Daniel Martí [Sat, 1 Dec 2018 16:28:27 +0000 (16:28 +0000)]
cmd/compile: add Buffer.Grow to TestIntendedInlining

golang.org/cl/151977 slightly decreased the cost of inlining an extra
call from 60 to 57, since it was a safe change that could help in some
scenarios.

One notable change spotted in that CL is that bytes.Buffer.Grow is now
inlinable, meaning that a fixedbugs test needed updating.

For consistency, add the test case to TestIntendedInlining too,
alongside other commonly used bytes.Buffer methods.

Change-Id: I4fb402fc684ef4c543fc65aea343ca1a4d73a189
Reviewed-on: https://go-review.googlesource.com/c/151979
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
6 years agocmd/compile: decrease inlining call cost from 60 to 57
David Chase [Fri, 30 Nov 2018 13:36:00 +0000 (08:36 -0500)]
cmd/compile: decrease inlining call cost from 60 to 57

A Go user made a well-documented request for a slightly
lower threshold.  I tested against a selection of other
people's benchmarks, and saw a tiny benefit (possibly noise)
at equally tiny cost, and no unpleasant surprises observed
in benchmarking.

I.e., might help, doesn't hurt, low risk, request was
delivered on a silver platter.

It did, however, change the behavior of one test because
now bytes.Buffer.Grow is eligible for inlining.

Updates #19348.

Change-Id: I85e3088a4911290872b8c6bda9601b5354c48695
Reviewed-on: https://go-review.googlesource.com/c/151977
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
6 years agocmd/cgo: use preprocessor macros to avoid prolog redefinitions
Ian Lance Taylor [Fri, 30 Nov 2018 22:21:33 +0000 (14:21 -0800)]
cmd/cgo: use preprocessor macros to avoid prolog redefinitions

Avoid redefinition errors when a Go file uses a cgo comment to
There is no particularly good reason to do this, but there is also no
particularly good reason that it should fail.

Fixes #27019

Change-Id: Icd6f8197a89be4ee6b03ddae675667998a8b4189
Reviewed-on: https://go-review.googlesource.com/c/152079
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
6 years agotest/codegen: add arithmetic tests for 386/amd64/arm/arm64
Ben Shi [Fri, 30 Nov 2018 09:30:36 +0000 (09:30 +0000)]
test/codegen: add arithmetic tests for 386/amd64/arm/arm64

This CL adds several test cases of arithmetic operations for
386/amd64/arm/arm64.

Change-Id: I362687c06249f31091458a1d8c45fc4d006b616a
Reviewed-on: https://go-review.googlesource.com/c/151897
Run-TryBot: Ben Shi <powerman1st@163.com>
Reviewed-by: Keith Randall <khr@golang.org>
6 years agonet/http: update bundled x/net/http2
Brad Fitzpatrick [Sat, 1 Dec 2018 00:21:29 +0000 (00:21 +0000)]
net/http: update bundled x/net/http2

This updates x/net/http2 to x/net git rev 351d144f for:

   http2: revert Transport's strict interpretation of MAX_CONCURRENT_STREAMS
   https://golang.org/cl/151857

   http2: don't leak streams on broken body
   https://golang.org/cl/132715

   http2: remove support for Go 1.8 and earlier
   https://golang.org/cl/145677

   http2: reduce init-time work & allocations
   https://golang.org/cl/127664

And some CLs fixing typos.

Fixes #27044
Fixes #27208

Change-Id: I11cc32576c690199ceb4c0bd1448d01e3cab3097
Reviewed-on: https://go-review.googlesource.com/c/152080
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
6 years agosyscall: avoid "64"-postfixed libSystem syscalls on iOS
Elias Naur [Fri, 30 Nov 2018 11:25:18 +0000 (12:25 +0100)]
syscall: avoid "64"-postfixed libSystem syscalls on iOS

The stat(2) man page contain this comment about the 64-bit versions
of the system file functions:

"Platforms that were released after these updates only have the
newer variants available to them.  These platforms have the macro
_DARWIN_FEATURE_ONLY_64_BIT_INODE defined."

It turns out that on iOS the _DARWIN_FEATURE_ONLY_64_BIT_INODE is
defined and that even though the "64"-postfixed versions are
accessible they are deemed private. Apps that refer to private
API are not admissible on App Store, and after the Go runtime
started using libSystem instead of direct syscalls, the App Store
submission checks reject apps built with Go tip.

The fix is simple: use the non-postfixed versions on iOS.

getdirentries(2) is not changed; it is not available at all on iOS
and needs replacement.

Updates #28984

Change-Id: Icb8d44e271456acaa1913ba486fcf5b569722fa9
Reviewed-on: https://go-review.googlesource.com/c/151938
Run-TryBot: Elias Naur <elias.naur@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
6 years agocmd/compile: fix constant index bounds check and error message
Robert Griesemer [Wed, 28 Nov 2018 22:34:45 +0000 (14:34 -0800)]
cmd/compile: fix constant index bounds check and error message

While here, rename nonnegintconst to indexconst (because that's
what it is) and add Fatalf calls where we are not expecting the
indexconst call to fail, and fixed wrong comparison in smallintconst.

Fixes #23781.

Change-Id: I86eb13081c450943b1806dfe3ae368872f76639a
Reviewed-on: https://go-review.googlesource.com/c/151599
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
6 years agoruntime: fix heap pointer invariant rules in HACKING.md
Michael Anthony Knyszek [Wed, 28 Nov 2018 18:52:35 +0000 (18:52 +0000)]
runtime: fix heap pointer invariant rules in HACKING.md

This change fixes an error in HACKING.md which claims all pointers
which live in unmanaged memory but point to the heap must be marked
as GC roots explicitly by runtime.markroot. This isn't technically
necessary if the pointer is accessible through a global variable.

Change-Id: I632b25272fdb2f789c5259dd1685d517f45fd435
Reviewed-on: https://go-review.googlesource.com/c/151539
Reviewed-by: Rick Hudson <rlh@golang.org>
6 years agogo/internal/gccgoimporter: fix test when using gccgo before GCC 7
Ian Lance Taylor [Fri, 30 Nov 2018 20:44:34 +0000 (12:44 -0800)]
go/internal/gccgoimporter: fix test when using gccgo before GCC 7

In TestObjImporter skip tests that use type aliases when using a
version of gccgo before GCC 7, since that is when type aliases were
added.

Fixes #29006

Change-Id: I676bae9f023931cf95ac9b4d4de893fe8517af9b
Reviewed-on: https://go-review.googlesource.com/c/152078
Reviewed-by: Than McIntosh <thanm@google.com>
6 years agogo/internal/gccgoimporter: fix test when using gccgo 4.7
Ian Lance Taylor [Fri, 30 Nov 2018 20:26:10 +0000 (12:26 -0800)]
go/internal/gccgoimporter: fix test when using gccgo 4.7

TestInstallationImporter checks that it can read the export data for a
list of known standard library packages. It was failing on the SmartOS
builder which has GCC 4.7 installed. Skip packages that did not exist
in GCC 4.7. Most packages are still there and the missing packages are
fairly simple, so this doesn't really affect test quality.

Updates #29006

Change-Id: If7ae6f83d51d40168a9692acb0b99c9bf21f2a4d
Reviewed-on: https://go-review.googlesource.com/c/152077
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

6 years agogo/internal/gccgoimporter: fix bug reading V1 export data
Than McIntosh [Fri, 30 Nov 2018 14:50:05 +0000 (09:50 -0500)]
go/internal/gccgoimporter: fix bug reading V1 export data

Fix a bug in the reading of elderly export data. In such export data
when reading type information it's possible to encounter a named type N1
defined as a typedef of some other named type N2 at a point when the
underying type of N1 has not yet been finalized. Handle this case by
generating a fixup, then process fixups at the end of parsing to
set the correct underlying type.

Fixes #29006.

Change-Id: I6a505c897bd95eb161ee04637bb6eebad9f20d52
Reviewed-on: https://go-review.googlesource.com/c/151997
Run-TryBot: Than McIntosh <thanm@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

6 years agocrypto/tls: improve error message for unsupported certificates in TLS 1.3
Filippo Valsorda [Thu, 29 Nov 2018 07:30:26 +0000 (02:30 -0500)]
crypto/tls: improve error message for unsupported certificates in TLS 1.3

Fixes #28960

Change-Id: I0d049d4776dc42ef165a1da15f63de08677fbb85
Reviewed-on: https://go-review.googlesource.com/c/151661
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Adam Langley <agl@golang.org>
6 years agocrypto/tls: fix client certificates support for legacy servers
Filippo Valsorda [Thu, 29 Nov 2018 06:38:07 +0000 (01:38 -0500)]
crypto/tls: fix client certificates support for legacy servers

signatureSchemesForCertificate was written to be used with TLS 1.3, but
ended up used for TLS 1.2 client certificates in a refactor. Since it
only supported TLS 1.3 signature algorithms, it would lead to no RSA
client certificates being sent to servers that didn't support RSA-PSS.

TestHandshakeClientCertRSAPKCS1v15 was testing *specifically* for this,
but alas the OpenSSL flag -verify accepts an empty certificates list as
valid, as opposed to -Verify...

Fixes #28925

Change-Id: I61afc02ca501d3d64ab4ad77bbb4cf10931e6f93
Reviewed-on: https://go-review.googlesource.com/c/151660
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Adam Langley <agl@golang.org>
6 years agonet: skip flaky TestLookupDotsWithRemoteSource on darwin
Andrew Bonventre [Thu, 29 Nov 2018 23:41:03 +0000 (18:41 -0500)]
net: skip flaky TestLookupDotsWithRemoteSource on darwin

Updates golang/go#27992

Change-Id: Ic327df7cc5002a3d537f9117559c25f30e1eab9c
Reviewed-on: https://go-review.googlesource.com/c/151799
Run-TryBot: Andrew Bonventre <andybons@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
6 years agocmd/go/internal/modfetch: make directories read-only after renaming, not before
Bryan C. Mills [Thu, 29 Nov 2018 22:46:14 +0000 (17:46 -0500)]
cmd/go/internal/modfetch: make directories read-only after renaming, not before

The call to os.Rename was failing on the darwin builders, despite having passed in the TryBots.
(I tested this change by running 'go test cmd/go' manually on a darwin gomote.)

This fixes the builder failures after CL 146382.

Updates #26794
Fixes #29030

Change-Id: I3644773421789f65e56f183d077b4e4fd17b8325
Reviewed-on: https://go-review.googlesource.com/c/151798
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

6 years agocmd/go/internal/lockedfile/internal/filelock: fix test on iOS
Elias Naur [Fri, 30 Nov 2018 11:09:59 +0000 (12:09 +0100)]
cmd/go/internal/lockedfile/internal/filelock: fix test on iOS

Change-Id: I0390b382db0ca36de20af0ef15204c5bfc084d3d
Reviewed-on: https://go-review.googlesource.com/c/151937
Run-TryBot: Elias Naur <elias.naur@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
6 years agocmd/compile: eliminate write barriers when writing non-heap ptrs
Keith Randall [Tue, 27 Nov 2018 20:40:16 +0000 (12:40 -0800)]
cmd/compile: eliminate write barriers when writing non-heap ptrs

We don't need a write barrier if:
1) The location we're writing to doesn't hold a heap pointer, and
2) The value we're writing isn't a heap pointer.

The freshly returned value from runtime.newobject satisfies (1).
Pointers to globals, and the contents of the read-only data section satisfy (2).

This is particularly helpful for code like:
p := []string{"abc", "def", "ghi"}

Where the compiler generates:
   a := new([3]string)
   move(a, statictmp_)  // eliminates write barriers here
   p := a[:]

For big slice literals, this makes the code a smaller and faster to
compile.

Update #13554. Reduces the compile time by ~10% and RSS by ~30%.

Change-Id: Icab81db7591c8777f68e5d528abd48c7e44c87eb
Reviewed-on: https://go-review.googlesource.com/c/151498
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
6 years agoruntime: check more work flushing races
Austin Clements [Mon, 26 Nov 2018 19:41:23 +0000 (14:41 -0500)]
runtime: check more work flushing races

This adds several new checks to help debug #27993. It adds a mechanism
for freezing write barriers and gcWork puts during the mark completion
algorithm. This way, if we do detect mark completion, we can catch any
puts that happened during the completion algorithm. Based on build
dashboard failures, this seems to be the window of time when these are
happening.

This also double-checks that all work buffers are empty immediately
upon entering mark termination (much earlier than the current check).
This is unlikely to trigger based on the current failures, but is a
good safety net.

Change-Id: I03f56c48c4322069e28c50fbc3c15b2fee2130c2
Reviewed-on: https://go-review.googlesource.com/c/151797
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
6 years agocmd/cgo: use field alignment when setting field offset
Ian Lance Taylor [Tue, 20 Nov 2018 23:55:02 +0000 (15:55 -0800)]
cmd/cgo: use field alignment when setting field offset

The old code ignored the field alignment, and only looked at the field
offset: if the field offset required padding, cgo added padding. But
while that approach works for Go (at least with the gc toolchain) it
doesn't work for C code using packed structs. With a packed struct the
added padding may leave the struct at a misaligned position, and the
inserted alignment, which cgo is not considering, may introduce
additional, unexpected, padding. Padding that ignores alignment is not
a good idea when the struct is not packed, and Go structs are never
packed. So don't ignore alignment.

Fixes #28896

Change-Id: Ie50ea15fa6dc35557497097be9fecfecb11efd8a
Reviewed-on: https://go-review.googlesource.com/c/150602
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
6 years agogo/doc: convert to unicode quotes for ToText and Synopsis
Agniva De Sarker [Tue, 20 Nov 2018 05:43:03 +0000 (11:13 +0530)]
go/doc: convert to unicode quotes for ToText and Synopsis

We refactor the conversion of quotes to their unicode equivalent
to a separate function so that it can be called from ToText and Synopsis.

And we introduce a temp buffer to write the escaped HTML and convert
the unicode quotes back to html escaped entities. This simplifies the logic
and gets rid of the need to track the index of the escaped text.

Fixes #27759

Change-Id: I71cf47ddcd4c6794ccdf2898ac25539388b393c1
Reviewed-on: https://go-review.googlesource.com/c/150377
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
6 years agoruntime: node ordering in mTreap; adjust code to reflect description.
Gergely Brautigam [Wed, 28 Nov 2018 18:10:28 +0000 (18:10 +0000)]
runtime: node ordering in mTreap; adjust code to reflect description.

Adjust mTreap ordering logic to reflect the description of mTreap ordering.
Before it was using unsafe.Pointer in order to gather the base address of
a span. This has been changed to use base, which is the startAddress of a
span as the description is telling us in mgclarge.go.

Fixes: golang/go#28805
Change-Id: Ib3cd94a0757e23d135b5d41830f38fc08bcf16a3
GitHub-Last-Rev: 93f749b6700b1e179de16607a18395d5e162ecc1
GitHub-Pull-Request: golang/go#28973
Reviewed-on: https://go-review.googlesource.com/c/151499
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>

6 years agocmd/doc: treat any non-empty GOMOD as module mode
Bryan C. Mills [Wed, 28 Nov 2018 21:22:05 +0000 (16:22 -0500)]
cmd/doc: treat any non-empty GOMOD as module mode

Previously, we were looking for the string go.mod specifically, but
the module-mode-outside-a-module logic added in CL 148517 sets GOMOD
to os.DevNull

Updates #28992

Change-Id: I62a4baaa911a495350294d78bae96be3fe4866cb
Reviewed-on: https://go-review.googlesource.com/c/151617
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
6 years agocmd/go/internal/modfetch: document DownloadDir
Bryan C. Mills [Thu, 8 Nov 2018 15:23:53 +0000 (10:23 -0500)]
cmd/go/internal/modfetch: document DownloadDir

Change-Id: I4717964234fca0c8c5889ed710b66f39eb53a809
Reviewed-on: https://go-review.googlesource.com/c/151562
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
6 years agocmd/go/testdata/mod: remove unused research.swtch.com/vgo-tour
Bryan C. Mills [Mon, 5 Nov 2018 15:49:22 +0000 (10:49 -0500)]
cmd/go/testdata/mod: remove unused research.swtch.com/vgo-tour

The test that used that module was removed in
https://golang.org/cl/128900.

Change-Id: Id96270a52398c8ccc09821efb2a6a6b4764f44d9
Reviewed-on: https://go-review.googlesource.com/c/151560
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
6 years agocmd/go/internal/load: remove redundant assignment to BinDir
Bryan C. Mills [Thu, 8 Nov 2018 14:46:24 +0000 (09:46 -0500)]
cmd/go/internal/load: remove redundant assignment to BinDir

This assignment became a no-op in CL 36196, where both it and the
preceding assignment were changed to cfg.GOROOTbin (from gorootBin and
gobin respectively).

Change-Id: If74969c4cc3ffc5d8394ff9d8e8bcec9e0a4e3b0
Reviewed-on: https://go-review.googlesource.com/c/151561
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
6 years agocmd/go/internal/modcmd: check for errors in Download
Bryan C. Mills [Wed, 28 Nov 2018 16:28:47 +0000 (11:28 -0500)]
cmd/go/internal/modcmd: check for errors in Download

Also test that Download restores deleted files.

Updates #27783

Change-Id: If50074dbcffd74ff08fbaa9ad8c314cfdce0b02d
Reviewed-on: https://go-review.googlesource.com/c/151559
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
6 years agocmd/go: enable module mode without a main module when GO111MODULE=on
Bryan C. Mills [Thu, 8 Nov 2018 15:29:40 +0000 (10:29 -0500)]
cmd/go: enable module mode without a main module when GO111MODULE=on

This is as minimal a change as I could comfortably make to enable 'go
get' outside of a module for 1.12.

In general, commands invoked in module mode while outside of a module
operate as though they are in a module with an initially-empty go.mod
file. ('go env GOMOD' reports os.DevNull.)

Commands that operate on the current directory (such as 'go list' and
'go get -u' without arguments) fail: without a module definition, we
don't know the package path. Likewise, commands whose sole purpose is
to write files within the main module (such as 'go mod edit' and 'go
mod vendor') fail, since we don't know where to write their output.

Since the go.sum file for the main module is authoritative, we do not
check go.sum files when operating outside of a module. I plan to
revisit that when the tree opens for 1.13.

We may also want to revisit the behavior of 'go list': it would be
useful to be able to query individual packages (and dependencies of
those packages) within versioned modules, but today we only allow
versioned paths in conjunction with the '-m' flag.

Fixes #24250

RELNOTE=yes

Change-Id: I028c323ddea27693a92ad0aa4a6a55d5e3f43f2c
Reviewed-on: https://go-review.googlesource.com/c/148517
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
6 years agocmd/go/internal/modfetch/codehost: add lockfiles for repos
Bryan C. Mills [Thu, 25 Oct 2018 20:42:26 +0000 (16:42 -0400)]
cmd/go/internal/modfetch/codehost: add lockfiles for repos

The lockfile guards calls that may change the repo's filesystem contents.

We don't know how robust VCS implementations are to running
simultaneous commands, and this way we don't need to care: only one
'go' command at a time will modify any given repository.

If we can guarantee that particular VCS implementations are robust
enough across all of the VCS tool versions we support, we may be able
to remove some of this locking to improve parallelism.

Updates #26794

Change-Id: I578524974f5015629239cef43d3793aee2b9075c
Reviewed-on: https://go-review.googlesource.com/c/146381
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
6 years agocmd/go/internal/{modcmd,modload}: lock edits to go.mod
Bryan C. Mills [Tue, 23 Oct 2018 19:51:42 +0000 (15:51 -0400)]
cmd/go/internal/{modcmd,modload}: lock edits to go.mod

Use an arbitrary lockfile to serialize edits, and use atomic renames
to actually write the go.mod file so that we never drop version
requirements due to a command failing partway through a write.

Multiple invocations of the 'go' command may read the go.mod file
concurrently, and will see some consistent version even if some other
invocation changes it concurrently.

Multiple commands may attempt to write the go.mod file concurrently.
One writer will succeed and write a consistent, complete go.mod file.
The others will detect the changed contents and fail explicitly: it is
not, in general, possible to resolve two conflicting changes to module
requirements, so we surface the problem to the user rather than trying
to solve the problem heuristically.

Updates #26794

Change-Id: Ia1a06a01ef93fa9be664f560eb83bb86b0207443
Reviewed-on: https://go-review.googlesource.com/c/146380
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
6 years agocmd/go/internal/modfetch: lock files and directories
Bryan C. Mills [Mon, 15 Oct 2018 19:52:01 +0000 (15:52 -0400)]
cmd/go/internal/modfetch: lock files and directories

We employ the following new locking mechanisms:

• Zip files and list files within the module cache are written using
  atomic renames of temporary files, so that GOPROXY servers reading
  from the cache will never serve incomplete content.

• A lock file for each module version guards downloading and extraction of
  (immutable) module contents.

• A lock file alongside each version list (named 'list.lock')
  guards updates to the list.

• A single lock file in the module cache guards updates to all go.sum
  files. The go.sum files themselves are written using an atomic
  rename to ensure that we never accidentally discard existing sums.

Updates #26794

RELNOTE=yes

Change-Id: I16ef8b06ee4bd7b94d0c0a6f5d17e1cecc379076
Reviewed-on: https://go-review.googlesource.com/c/146382
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
6 years agocmd/go/internal/modfetch: make Repo.Zip write to an io.Writer instead of a temporary...
Bryan C. Mills [Tue, 27 Nov 2018 13:50:28 +0000 (08:50 -0500)]
cmd/go/internal/modfetch: make Repo.Zip write to an io.Writer instead of a temporary file

This will be used to eliminate a redundant copy in CL 145178.

(It also decouples two design points that were previously coupled: the
destination of the zip output and the program logic to write that
output.)

Updates #26794

Change-Id: I6cfd5a33c162c0016a1b83a278003684560a3772
Reviewed-on: https://go-review.googlesource.com/c/151341
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
6 years agocmd/go/internal/{clean,test}: lock testexpire.txt
Bryan C. Mills [Tue, 23 Oct 2018 19:39:07 +0000 (15:39 -0400)]
cmd/go/internal/{clean,test}: lock testexpire.txt

Also check to make sure we don't overwrite a newer timestamp with an
older one.

testexpire.txt may be written concurrently, and a partially-written
timestamp may appear much older than the actual intended one. We don't
want to re-run tests that should still be cached.

Updates #26794

Change-Id: If56348e799f0e7be3c5bc91b4a336e23ad99f791
Reviewed-on: https://go-review.googlesource.com/c/146379
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
6 years agocmd/go/internal/lockedfile: add package and support library
Bryan C. Mills [Tue, 16 Oct 2018 14:42:58 +0000 (10:42 -0400)]
cmd/go/internal/lockedfile: add package and support library

lockedfile.File passes through to os.File, with Open, Create, and OpenFile
functions that mimic the corresponding os functions but acquire locks
automatically, releasing them when the file is closed.

lockedfile.Sentinel is a simplified wrapper around lockedfile.OpenFile for the
common use-case of files that signal the status of idempotent tasks.

lockedfile.Mutex is a Mutex-like synchronization primitive implemented in terms
of file locks.

lockedfile.Read is like ioutil.Read, but obtains a read-lock.

lockedfile.Write is like ioutil.Write, but obtains a write-lock and can be used
for read-only files with idempotent contents.

Updates #26794

Change-Id: I50f7132c71d2727862eed54411f3f27e1af55cad
Reviewed-on: https://go-review.googlesource.com/c/145178
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
6 years agodoc: add relnotes for stack objects and mid-stack inlining
Keith Randall [Thu, 29 Nov 2018 17:47:11 +0000 (09:47 -0800)]
doc: add relnotes for stack objects and mid-stack inlining

Change-Id: Ief11612b67def93311707165910124d3ce28fb89
Reviewed-on: https://go-review.googlesource.com/c/151777
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
6 years agocmd/go/internal/cache: write shared mutable files atomically
Bryan C. Mills [Tue, 23 Oct 2018 18:48:59 +0000 (14:48 -0400)]
cmd/go/internal/cache: write shared mutable files atomically

Updates #26794

Change-Id: I2a50e3b756ff6a2bbaee4737ca7ed053b01c8d0e
Reviewed-on: https://go-review.googlesource.com/c/146378
Reviewed-by: Russ Cox <rsc@golang.org>
6 years agocmd/go/internal/renameio: add package
Bryan C. Mills [Wed, 31 Oct 2018 19:42:44 +0000 (15:42 -0400)]
cmd/go/internal/renameio: add package

renameio.WriteFile writes files atomically by renaming temporary files.

See the subsequent changes for usage examples.

Updates #26794
Updates #22397

Change-Id: I4bfe3125a53f58060587f98afbb4260bb1cc3d32
Reviewed-on: https://go-review.googlesource.com/c/146377
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Giovanni Bajo <rasky@develer.com>
Reviewed-by: Russ Cox <rsc@golang.org>
6 years agovendor/golang_org/x: move to internal/x
Bryan C. Mills [Mon, 5 Nov 2018 20:01:53 +0000 (15:01 -0500)]
vendor/golang_org/x: move to internal/x

Packages in vendor/ directories have a "vendor/" path prefix in GOPATH
mode, but intentionally do not in module mode. Since the import path
is embedded in the compiled output, changing that path invalidates
cache entries and causes cmd/go to try to rebuild (and reinstall) the
vendored libraries, which will fail if the directory containing those
libraries is read-only.

If I understood correctly, this is the approach Russ suggested as an
alternative to https://golang.org/cl/136138.

Fixes #27285
Fixes #26988

Change-Id: I8a2507fa892b84cde0a803aaa79e460723da572b
Reviewed-on: https://go-review.googlesource.com/c/147443
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
6 years agogo/internal/gccgoimporter: additional V3 export data changes
Than McIntosh [Wed, 28 Nov 2018 15:50:54 +0000 (10:50 -0500)]
go/internal/gccgoimporter: additional V3 export data changes

This patch merges in support for reading the most recent
incarnation of V3 export data (initial inline function bodies),
from the importer portions of https://golang.org/cl/150061 and
https://golang.org/cl/150067.

Updates #28961.

Change-Id: I34e837acbf48b8fd1a4896a1a977d2241adfb28d
Reviewed-on: https://go-review.googlesource.com/c/151557
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
6 years agocmd/compile: begin OpArg and OpPhi location lists at block start
David Chase [Fri, 26 Oct 2018 16:00:07 +0000 (12:00 -0400)]
cmd/compile: begin OpArg and OpPhi location lists at block start

For the entry block, make the "first instruction" be truly
the first instruction.  This allows printing of incoming
parameters with Delve.

Also be sure Phis are marked as being at the start of their
block.  This is observed to move location list pointers,
and where moved, they become correct.

Leading zero-width instructions include LoweredGetClosurePtr.
Because this instruction is actually architecture-specific,
and it is now tested for in 3 different places, also created
Op.isLoweredGetClosurePtr() to reduce future surprises.

Change-Id: Ic043b7265835cf1790382a74334b5714ae4060af
Reviewed-on: https://go-review.googlesource.com/c/145179
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
6 years agodebug/pe: use ws2_32.dll in TestImportTableInUnknownSection
Alex Brainman [Wed, 28 Nov 2018 08:57:13 +0000 (19:57 +1100)]
debug/pe: use ws2_32.dll in TestImportTableInUnknownSection

Apparently (see
https://github.com/golang/go/issues/27904#issuecomment-442140627
for details) kernel32.dll file is not present on windows/arm, so
use ws2_32.dll instead. ws2_32.dll imports table also lives in
'.rdata' section, so ws2_32.dll is as good as kernel32.dll for
testing issue #16103.

Updates #27904

Change-Id: Ibc72b24eea9a4d85abd371ffdcf00442e711b745
Reviewed-on: https://go-review.googlesource.com/c/151480
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>

6 years agocrypto/tls: prevent the test server from sending session tickets
Filippo Valsorda [Thu, 29 Nov 2018 03:05:08 +0000 (22:05 -0500)]
crypto/tls: prevent the test server from sending session tickets

Since they are sent after the handshake in TLS 1.3, the client was not
actually consuming them, as it doesn't make any Read calls. They were
then sitting in the kernel receive buffer when the client would call
Close. The kernel would see that and send a RST, which would race the
closeNotify, causing errors.

Also, we get to trim 600 lines of useless test data.

Fixes #28852

Change-Id: I7517feab77dabab7504bfc111098ba09ea07ae5e
Reviewed-on: https://go-review.googlesource.com/c/151659
Reviewed-by: Ian Lance Taylor <iant@golang.org>
6 years agocmd/cgo: recognize untyped constants defined in different files
Ian Lance Taylor [Thu, 29 Nov 2018 00:02:15 +0000 (16:02 -0800)]
cmd/cgo: recognize untyped constants defined in different files

An untyped constant can be defined in any input file, we shouldn't
segregate them by file.

Updates #28772

Change-Id: I0347f15236833bb511eb49f86c449ee9241b0a25
Reviewed-on: https://go-review.googlesource.com/c/151600
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
6 years agocmd/asm,cmd/internal/obj/ppc64: add VPERMXOR to ppc64 assembler
Lynn Boger [Tue, 13 Nov 2018 21:05:15 +0000 (16:05 -0500)]
cmd/asm,cmd/internal/obj/ppc64: add VPERMXOR to ppc64 assembler

VPERMXOR is missing from the Go assembler for ppc64. It has the
same format as VPERM. It was requested by an external user so
they could write an optimized algorithm in asm.

Change-Id: Icf4c682f7f46716ccae64e6ae3d62e8cec67f6c1
Reviewed-on: https://go-review.googlesource.com/c/151578
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
6 years agonet/http: prevent transport sends two "Connection: close" headers
Meng Zhuo [Tue, 27 Nov 2018 08:16:43 +0000 (16:16 +0800)]
net/http: prevent transport sends two "Connection: close" headers

There are three functions that do Connection header write:
1. transport.go/ persistConn.roundTrip
2. transfer.go/ transferWriter.writeHeader
3. request.go/ Request.write

The root cause is roundTrip didn't lookup into request.Close and
transferWriter
didn't take care of extraHeaders.

Fixes #28886

Change-Id: I1d131019c7cd42eb1bcc972c631b7df7511c1f39
Reviewed-on: https://go-review.googlesource.com/c/150722
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
6 years agocmd/compile: ensure S390X moves don't overflow int32
Keith Randall [Wed, 28 Nov 2018 20:41:23 +0000 (12:41 -0800)]
cmd/compile: ensure S390X moves don't overflow int32

Break ADDconst into ADD + MOVDconst, so that if the constant
is too big it won't overflow ADDconst's constant field.

For normal sizes, other rules will recombine into an ADDconst.

Fixes S390X breakage from CL 33909.

Change-Id: Id804ee052365527efb580f797688b0ce83c47915
Reviewed-on: https://go-review.googlesource.com/c/151597
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Michael Munday <mike.munday@ibm.com>
6 years agodoc: fix typo in FAQ
James Craig Burley [Wed, 28 Nov 2018 18:53:16 +0000 (18:53 +0000)]
doc: fix typo in FAQ

Change-Id: I956d6d1dbf8516cb65eb3a0686a3b0584b4a6840
GitHub-Last-Rev: 1c928f3c67eceae424cbcd6b0935605a78728604
GitHub-Pull-Request: golang/go#28991
Reviewed-on: https://go-review.googlesource.com/c/151324
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
6 years agoplugin: fix build constraint to disable test on linux/arm64
Tobias Klauser [Wed, 28 Nov 2018 15:50:57 +0000 (16:50 +0100)]
plugin: fix build constraint to disable test on linux/arm64

CL 151478 was suppose to fix the build failure on linux/arm64 but the
build constraint didn't exclude linux/arm64 properly.

Fixes #28982

Change-Id: Ia80265b0adba0384cd28bc2deb1726418664975a
Reviewed-on: https://go-review.googlesource.com/c/151303
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
6 years agomath/big: allocate less for single-Word nats
Josh Bleecher Snyder [Thu, 22 Nov 2018 17:51:36 +0000 (09:51 -0800)]
math/big: allocate less for single-Word nats

For many uses of math/big, most numbers are small in practice.
Prior to this change, big.NewInt allocated a minimum of five Words:
one to hold the value, and four as extra capacity.
In most cases, this extra capacity is waste.
Worse, allocating a single Word uses a fast malloc path for tiny allocs;
allocating five Words is more expensive in CPU as well as memory.

This change is a simple fix: Treat a request for one Word at its word.
I experimented with more complicated fixes and did not find anything
that outperformed this easy fix.

On some real world programs, this is a clear win.

The compiler:

name        old alloc/op      new alloc/op      delta
Template         37.1MB ± 0%       37.0MB ± 0%  -0.23%  (p=0.008 n=5+5)
Unicode          29.2MB ± 0%       28.5MB ± 0%  -2.48%  (p=0.008 n=5+5)
GoTypes           133MB ± 0%        133MB ± 0%  -0.05%  (p=0.008 n=5+5)
Compiler          628MB ± 0%        628MB ± 0%  -0.06%  (p=0.008 n=5+5)
SSA              2.04GB ± 0%       2.03GB ± 0%  -0.14%  (p=0.008 n=5+5)
Flate            24.7MB ± 0%       24.6MB ± 0%  -0.23%  (p=0.008 n=5+5)
GoParser         29.6MB ± 0%       29.6MB ± 0%  -0.07%  (p=0.008 n=5+5)
Reflect          82.3MB ± 0%       82.2MB ± 0%  -0.05%  (p=0.008 n=5+5)
Tar              36.2MB ± 0%       36.2MB ± 0%  -0.12%  (p=0.008 n=5+5)
XML              49.5MB ± 0%       49.4MB ± 0%  -0.23%  (p=0.008 n=5+5)
[Geo mean]       85.1MB            84.8MB       -0.37%

name        old allocs/op     new allocs/op     delta
Template           364k ± 0%         364k ± 0%    ~     (p=0.476 n=5+5)
Unicode            341k ± 0%         341k ± 0%    ~     (p=0.690 n=5+5)
GoTypes           1.37M ± 0%        1.37M ± 0%    ~     (p=0.444 n=5+5)
Compiler          5.50M ± 0%        5.50M ± 0%  +0.02%  (p=0.008 n=5+5)
SSA               16.0M ± 0%        16.0M ± 0%  +0.01%  (p=0.008 n=5+5)
Flate              238k ± 0%         238k ± 0%    ~     (p=0.222 n=5+5)
GoParser           305k ± 0%         305k ± 0%    ~     (p=0.841 n=5+5)
Reflect            976k ± 0%         976k ± 0%    ~     (p=0.222 n=5+5)
Tar                354k ± 0%         354k ± 0%    ~     (p=0.103 n=5+5)
XML                450k ± 0%         450k ± 0%    ~     (p=0.151 n=5+5)
[Geo mean]         837k              837k       +0.01%

go.skylark.net (at ea6d2813de75ded8d157b9540bc3d3ad0b688623):

name                     old alloc/op   new alloc/op   delta
Hashtable-8                 456kB ± 0%     299kB ± 0%  -34.33%  (p=0.000 n=9+9)
/bench_builtin_method-8     220kB ± 0%     190kB ± 0%  -13.55%  (p=0.000 n=9+10)

name                     old allocs/op  new allocs/op  delta
Hashtable-8                 7.84k ± 0%     7.84k ± 0%     ~     (all equal)
/bench_builtin_method-8     7.49k ± 0%     7.49k ± 0%     ~     (all equal)

The math/big benchmarks are messy, which is predictable, since they
naturally exercise the bigger-than-one-word code more.
Also worth noting is that many of the benchmarks have very high variance.
I've omitted the opVV and opVW benchmarks, as they are unrelated.

name                              old time/op    new time/op    delta
DecimalConversion-8                 92.5µs ± 1%    90.6µs ± 0%   -2.12%  (p=0.000 n=17+19)
FloatString/100-8                    867ns ± 0%     871ns ± 0%   +0.50%  (p=0.000 n=18+18)
FloatString/1000-8                  26.4µs ± 1%    26.5µs ± 1%     ~     (p=0.396 n=20+19)
FloatString/10000-8                 2.15ms ± 2%    2.16ms ± 2%     ~     (p=0.089 n=19+20)
FloatString/100000-8                 209ms ± 1%     209ms ± 1%     ~     (p=0.583 n=19+19)
FloatAdd/10-8                       63.5ns ± 2%    64.1ns ± 6%     ~     (p=0.389 n=19+19)
FloatAdd/100-8                      66.0ns ± 2%    65.8ns ± 2%     ~     (p=0.825 n=20+20)
FloatAdd/1000-8                     93.9ns ± 1%    94.3ns ± 1%     ~     (p=0.273 n=19+20)
FloatAdd/10000-8                     347ns ± 2%     342ns ± 1%   -1.50%  (p=0.000 n=18+18)
FloatAdd/100000-8                   2.78µs ± 1%    2.78µs ± 2%     ~     (p=0.961 n=20+19)
FloatSub/10-8                       56.9ns ± 2%    57.8ns ± 3%   +1.59%  (p=0.001 n=19+19)
FloatSub/100-8                      58.2ns ± 2%    58.9ns ± 2%   +1.25%  (p=0.004 n=20+20)
FloatSub/1000-8                     74.9ns ± 1%    74.4ns ± 1%   -0.76%  (p=0.000 n=19+20)
FloatSub/10000-8                     223ns ± 1%     220ns ± 2%   -1.29%  (p=0.000 n=16+20)
FloatSub/100000-8                   1.66µs ± 1%    1.66µs ± 2%     ~     (p=0.147 n=20+20)
ParseFloatSmallExp-8                8.38µs ± 0%    8.59µs ± 0%   +2.48%  (p=0.000 n=19+19)
ParseFloatLargeExp-8                31.1µs ± 0%    32.0µs ± 0%   +3.04%  (p=0.000 n=16+17)
GCD10x10/WithoutXY-8                 115ns ± 1%      99ns ± 3%  -14.07%  (p=0.000 n=20+20)
GCD10x10/WithXY-8                    322ns ± 0%     312ns ± 0%   -3.11%  (p=0.000 n=18+13)
GCD10x100/WithoutXY-8                233ns ± 1%     219ns ± 1%   -5.73%  (p=0.000 n=19+17)
GCD10x100/WithXY-8                   709ns ± 0%     759ns ± 0%   +7.04%  (p=0.000 n=19+19)
GCD10x1000/WithoutXY-8               653ns ± 1%     642ns ± 1%   -1.69%  (p=0.000 n=17+20)
GCD10x1000/WithXY-8                 1.35µs ± 0%    1.35µs ± 1%     ~     (p=0.255 n=20+16)
GCD10x10000/WithoutXY-8             4.57µs ± 1%    4.61µs ± 1%   +0.95%  (p=0.000 n=18+17)
GCD10x10000/WithXY-8                6.82µs ± 0%    6.84µs ± 0%   +0.27%  (p=0.000 n=16+17)
GCD10x100000/WithoutXY-8            43.9µs ± 1%    44.0µs ± 1%   +0.28%  (p=0.000 n=18+17)
GCD10x100000/WithXY-8               60.6µs ± 0%    60.6µs ± 0%     ~     (p=0.907 n=18+18)
GCD100x100/WithoutXY-8              1.13µs ± 0%    1.21µs ± 0%   +6.39%  (p=0.000 n=19+19)
GCD100x100/WithXY-8                 1.82µs ± 0%    1.92µs ± 0%   +5.24%  (p=0.000 n=19+17)
GCD100x1000/WithoutXY-8             2.00µs ± 0%    2.03µs ± 1%   +1.61%  (p=0.000 n=18+16)
GCD100x1000/WithXY-8                3.22µs ± 0%    3.20µs ± 1%   -0.83%  (p=0.000 n=19+19)
GCD100x10000/WithoutXY-8            9.28µs ± 1%    9.17µs ± 1%   -1.25%  (p=0.000 n=18+19)
GCD100x10000/WithXY-8               13.5µs ± 0%    13.3µs ± 0%   -1.12%  (p=0.000 n=18+19)
GCD100x100000/WithoutXY-8           80.4µs ± 0%    78.6µs ± 0%   -2.25%  (p=0.000 n=19+19)
GCD100x100000/WithXY-8               114µs ± 0%     112µs ± 0%   -1.46%  (p=0.000 n=19+17)
GCD1000x1000/WithoutXY-8            12.9µs ± 1%    12.9µs ± 2%   -0.50%  (p=0.014 n=20+19)
GCD1000x1000/WithXY-8               19.6µs ± 1%    19.6µs ± 2%   -0.28%  (p=0.040 n=17+18)
GCD1000x10000/WithoutXY-8           22.4µs ± 0%    22.4µs ± 2%     ~     (p=0.220 n=19+19)
GCD1000x10000/WithXY-8              57.0µs ± 0%    56.5µs ± 0%   -0.87%  (p=0.000 n=20+20)
GCD1000x100000/WithoutXY-8           116µs ± 0%     115µs ± 0%   -0.49%  (p=0.000 n=18+19)
GCD1000x100000/WithXY-8              410µs ± 0%     411µs ± 0%     ~     (p=0.052 n=19+19)
GCD10000x10000/WithoutXY-8           247µs ± 1%     244µs ± 1%   -0.92%  (p=0.000 n=19+19)
GCD10000x10000/WithXY-8              476µs ± 1%     473µs ± 1%   -0.48%  (p=0.009 n=19+19)
GCD10000x100000/WithoutXY-8          573µs ± 1%     571µs ± 1%   -0.45%  (p=0.012 n=20+20)
GCD10000x100000/WithXY-8            3.35ms ± 1%    3.35ms ± 1%     ~     (p=0.444 n=20+19)
GCD100000x100000/WithoutXY-8        12.0ms ± 2%    11.9ms ± 2%     ~     (p=0.276 n=18+20)
GCD100000x100000/WithXY-8           27.3ms ± 1%    27.3ms ± 1%     ~     (p=0.792 n=20+19)
Hilbert-8                            672µs ± 0%     611µs ± 0%   -9.02%  (p=0.000 n=19+19)
Binomial-8                          1.40µs ± 0%    1.18µs ± 0%  -15.69%  (p=0.000 n=16+14)
QuoRem-8                            2.20µs ± 1%    2.17µs ± 1%   -1.13%  (p=0.000 n=19+19)
Exp-8                               4.10ms ± 1%    4.11ms ± 1%     ~     (p=0.296 n=20+19)
Exp2-8                              4.11ms ± 1%    4.12ms ± 1%     ~     (p=0.429 n=20+20)
Bitset-8                            8.67ns ± 6%    8.74ns ± 4%     ~     (p=0.139 n=19+17)
BitsetNeg-8                         43.6ns ± 1%    43.8ns ± 2%   +0.61%  (p=0.036 n=20+20)
BitsetOrig-8                        77.5ns ± 1%    68.4ns ± 1%  -11.77%  (p=0.000 n=19+20)
BitsetNegOrig-8                      145ns ± 1%     141ns ± 1%   -2.87%  (p=0.000 n=19+20)
ModSqrt225_Tonelli-8                 324µs ± 1%     324µs ± 1%     ~     (p=0.409 n=18+20)
ModSqrt225_3Mod4-8                  98.9µs ± 1%    99.1µs ± 1%     ~     (p=0.298 n=19+18)
ModSqrt231_Tonelli-8                 337µs ± 1%     337µs ± 1%     ~     (p=0.718 n=20+18)
ModSqrt231_5Mod8-8                   115µs ± 1%     114µs ± 1%   -0.22%  (p=0.050 n=20+20)
ModInverse-8                         895ns ± 0%     869ns ± 1%   -2.83%  (p=0.000 n=17+17)
Sqrt-8                              28.1µs ± 1%    28.1µs ± 0%   -0.28%  (p=0.000 n=16+20)
IntSqr/1-8                          10.8ns ± 3%    10.5ns ± 3%   -2.51%  (p=0.000 n=19+17)
IntSqr/2-8                          30.5ns ± 2%    30.3ns ± 4%   -0.71%  (p=0.035 n=18+18)
IntSqr/3-8                          40.1ns ± 1%    40.1ns ± 1%     ~     (p=0.710 n=20+17)
IntSqr/5-8                          65.3ns ± 1%    65.4ns ± 2%     ~     (p=0.744 n=19+19)
IntSqr/8-8                           101ns ± 1%     102ns ± 0%     ~     (p=0.234 n=19+20)
IntSqr/10-8                          138ns ± 0%     138ns ± 2%     ~     (p=0.827 n=18+18)
IntSqr/20-8                          378ns ± 1%     378ns ± 1%     ~     (p=0.479 n=18+18)
IntSqr/30-8                          637ns ± 0%     638ns ± 1%     ~     (p=0.051 n=18+20)
IntSqr/50-8                         1.34µs ± 2%    1.34µs ± 1%     ~     (p=0.970 n=18+19)
IntSqr/80-8                         2.78µs ± 0%    2.78µs ± 1%   -0.18%  (p=0.006 n=19+17)
IntSqr/100-8                        3.98µs ± 0%    3.98µs ± 0%     ~     (p=0.057 n=17+19)
IntSqr/200-8                        13.5µs ± 0%    13.5µs ± 1%   -0.33%  (p=0.000 n=19+17)
IntSqr/300-8                        25.3µs ± 1%    25.3µs ± 1%     ~     (p=0.361 n=19+20)
IntSqr/500-8                        62.9µs ± 0%    62.9µs ± 1%     ~     (p=0.899 n=17+17)
IntSqr/800-8                         128µs ± 1%     127µs ± 1%   -0.32%  (p=0.016 n=18+20)
IntSqr/1000-8                        192µs ± 0%     192µs ± 1%     ~     (p=0.916 n=17+18)
Div/20/10-8                         34.9ns ± 2%    35.6ns ± 1%   +2.01%  (p=0.000 n=20+20)
Div/200/100-8                        218ns ± 1%     215ns ± 2%   -1.43%  (p=0.000 n=18+18)
Div/2000/1000-8                     1.16µs ± 1%    1.15µs ± 1%   -1.04%  (p=0.000 n=19+20)
Div/20000/10000-8                   35.7µs ± 1%    35.4µs ± 1%   -0.69%  (p=0.000 n=19+18)
Div/200000/100000-8                 2.89ms ± 1%    2.88ms ± 1%   -0.62%  (p=0.007 n=19+20)
Mul-8                               9.28ms ± 1%    9.27ms ± 1%     ~     (p=0.563 n=18+18)
ZeroShifts/Shl-8                     712ns ± 6%     716ns ± 7%     ~     (p=0.597 n=20+20)
ZeroShifts/ShlSame-8                4.00ns ± 1%    4.06ns ± 5%     ~     (p=0.162 n=18+20)
ZeroShifts/Shr-8                     714ns ±10%   1285ns ±156%     ~     (p=0.250 n=20+20)
ZeroShifts/ShrSame-8                4.00ns ± 1%    4.09ns ±10%   +2.34%  (p=0.048 n=16+19)
Exp3Power/0x10-8                     154ns ± 0%     159ns ±13%     ~     (p=0.197 n=14+20)
Exp3Power/0x40-8                     171ns ± 1%     175ns ± 8%     ~     (p=0.058 n=16+19)
Exp3Power/0x100-8                    287ns ± 0%     316ns ± 4%  +10.03%  (p=0.000 n=17+19)
Exp3Power/0x400-8                    698ns ± 1%     801ns ± 6%  +14.75%  (p=0.000 n=19+20)
Exp3Power/0x1000-8                  2.87µs ± 0%    3.65µs ± 6%  +27.24%  (p=0.000 n=18+18)
Exp3Power/0x4000-8                  21.9µs ± 1%    28.7µs ± 8%  +31.09%  (p=0.000 n=18+20)
Exp3Power/0x10000-8                  204µs ± 0%     267µs ± 9%  +30.81%  (p=0.000 n=20+20)
Exp3Power/0x40000-8                 1.86ms ± 0%    2.26ms ± 5%  +21.68%  (p=0.000 n=18+19)
Exp3Power/0x100000-8                17.5ms ± 1%    20.7ms ± 7%  +18.39%  (p=0.000 n=19+20)
Exp3Power/0x400000-8                 156ms ± 0%     172ms ± 6%  +10.54%  (p=0.000 n=19+20)
Fibo-8                              26.9ms ± 1%    27.5ms ± 3%   +2.32%  (p=0.000 n=19+19)
NatSqr/1-8                          31.0ns ± 4%    39.5ns ±29%  +27.25%  (p=0.000 n=20+19)
NatSqr/2-8                          54.1ns ± 1%    69.0ns ±28%  +27.52%  (p=0.000 n=20+20)
NatSqr/3-8                          66.6ns ± 1%    83.0ns ±25%  +24.59%  (p=0.000 n=20+20)
NatSqr/5-8                          97.1ns ± 1%   119.9ns ±12%  +23.50%  (p=0.000 n=16+20)
NatSqr/8-8                           138ns ± 1%     171ns ± 9%  +24.20%  (p=0.000 n=19+20)
NatSqr/10-8                          182ns ± 0%     225ns ± 9%  +23.50%  (p=0.000 n=16+20)
NatSqr/20-8                          447ns ± 1%     624ns ± 6%  +39.64%  (p=0.000 n=19+19)
NatSqr/30-8                          736ns ± 2%     986ns ± 9%  +33.94%  (p=0.000 n=19+20)
NatSqr/50-8                         1.51µs ± 2%    1.97µs ± 9%  +30.42%  (p=0.000 n=20+20)
NatSqr/80-8                         3.03µs ± 1%    3.67µs ± 7%  +21.08%  (p=0.000 n=20+20)
NatSqr/100-8                        4.31µs ± 1%    5.20µs ± 7%  +20.52%  (p=0.000 n=19+20)
NatSqr/200-8                        14.2µs ± 0%    16.3µs ± 4%  +14.92%  (p=0.000 n=19+20)
NatSqr/300-8                        27.8µs ± 1%    33.2µs ± 7%  +19.28%  (p=0.000 n=20+18)
NatSqr/500-8                        66.6µs ± 1%    74.5µs ± 3%  +11.87%  (p=0.000 n=18+18)
NatSqr/800-8                         135µs ± 1%     165µs ± 7%  +22.33%  (p=0.000 n=20+20)
NatSqr/1000-8                        200µs ± 0%     228µs ± 3%  +14.39%  (p=0.000 n=19+20)
NatSetBytes/8-8                     8.87ns ± 4%    8.77ns ± 2%   -1.17%  (p=0.020 n=20+16)
NatSetBytes/24-8                    38.6ns ± 3%    49.5ns ±29%  +28.32%  (p=0.000 n=18+19)
NatSetBytes/128-8                   75.2ns ± 1%   120.7ns ±29%  +60.60%  (p=0.000 n=17+20)
NatSetBytes/7-8                     16.2ns ± 2%    16.5ns ± 2%   +1.76%  (p=0.000 n=20+20)
NatSetBytes/23-8                    46.5ns ± 1%    60.2ns ±24%  +29.59%  (p=0.000 n=20+20)
NatSetBytes/127-8                   83.1ns ± 1%   118.2ns ±20%  +42.33%  (p=0.000 n=18+20)
ScanPi-8                            89.1µs ± 1%   117.4µs ±12%  +31.75%  (p=0.000 n=18+20)
StringPiParallel-8                  35.1µs ± 9%    40.2µs ±12%  +14.53%  (p=0.000 n=20+20)
Scan/10/Base2-8                      410ns ±14%     429ns ±10%   +4.47%  (p=0.018 n=19+20)
Scan/100/Base2-8                    3.05µs ±20%    2.97µs ±14%     ~     (p=0.449 n=20+20)
Scan/1000/Base2-8                   29.3µs ± 8%    30.1µs ±23%     ~     (p=0.355 n=20+20)
Scan/10000/Base2-8                   402µs ±13%     395µs ±14%     ~     (p=0.355 n=20+20)
Scan/100000/Base2-8                 11.8ms ±10%    11.6ms ± 1%     ~     (p=0.245 n=17+18)
Scan/10/Base8-8                      194ns ± 6%     196ns ±12%     ~     (p=0.829 n=20+19)
Scan/100/Base8-8                    1.11µs ±15%    1.11µs ±12%     ~     (p=0.743 n=20+20)
Scan/1000/Base8-8                   11.7µs ±10%    11.7µs ±12%     ~     (p=0.904 n=20+20)
Scan/10000/Base8-8                   209µs ± 7%     210µs ± 8%     ~     (p=0.478 n=20+20)
Scan/100000/Base8-8                 10.6ms ± 7%    10.4ms ± 6%     ~     (p=0.112 n=20+18)
Scan/10/Base10-8                     182ns ±12%     188ns ±11%   +3.52%  (p=0.044 n=20+20)
Scan/100/Base10-8                   1.01µs ± 8%    1.00µs ±13%     ~     (p=0.588 n=20+20)
Scan/1000/Base10-8                  10.7µs ±20%    10.6µs ±14%     ~     (p=0.560 n=20+20)
Scan/10000/Base10-8                  195µs ±10%     194µs ± 9%     ~     (p=0.883 n=20+20)
Scan/100000/Base10-8                10.6ms ± 2%    10.6ms ± 2%     ~     (p=0.495 n=20+20)
Scan/10/Base16-8                     166ns ±10%     174ns ±17%     ~     (p=0.072 n=20+20)
Scan/100/Base16-8                    836ns ±10%     826ns ±12%     ~     (p=0.562 n=20+17)
Scan/1000/Base16-8                  8.96µs ±13%    8.65µs ± 9%     ~     (p=0.203 n=20+18)
Scan/10000/Base16-8                  198µs ± 3%     198µs ± 5%     ~     (p=0.718 n=20+20)
Scan/100000/Base16-8                11.1ms ± 3%    11.0ms ± 4%     ~     (p=0.512 n=20+20)
String/10/Base2-8                   88.1ns ± 7%    94.1ns ±11%   +6.80%  (p=0.000 n=19+20)
String/100/Base2-8                   577ns ± 4%     598ns ± 5%   +3.72%  (p=0.000 n=20+20)
String/1000/Base2-8                 5.25µs ± 2%    5.62µs ± 5%   +7.04%  (p=0.000 n=19+20)
String/10000/Base2-8                55.6µs ± 1%    60.1µs ± 2%   +8.12%  (p=0.000 n=19+19)
String/100000/Base2-8                519µs ± 2%     560µs ± 2%   +7.91%  (p=0.000 n=18+17)
String/10/Base8-8                   52.2ns ± 8%    53.3ns ±12%     ~     (p=0.188 n=20+18)
String/100/Base8-8                   218ns ± 3%     232ns ±10%   +6.66%  (p=0.000 n=20+20)
String/1000/Base8-8                 1.84µs ± 3%    1.94µs ± 4%   +5.07%  (p=0.000 n=20+18)
String/10000/Base8-8                18.1µs ± 2%    19.1µs ± 3%   +5.84%  (p=0.000 n=20+19)
String/100000/Base8-8                184µs ± 2%     197µs ± 1%   +7.15%  (p=0.000 n=19+19)
String/10/Base10-8                   158ns ± 7%     146ns ± 6%   -7.65%  (p=0.000 n=20+19)
String/100/Base10-8                  807ns ± 2%     845ns ± 4%   +4.79%  (p=0.000 n=20+19)
String/1000/Base10-8                3.99µs ± 3%    3.99µs ± 7%     ~     (p=0.920 n=20+20)
String/10000/Base10-8               20.8µs ± 6%    22.1µs ±10%   +6.11%  (p=0.000 n=19+20)
String/100000/Base10-8              5.60ms ± 2%    5.59ms ± 2%     ~     (p=0.749 n=20+19)
String/10/Base16-8                  49.0ns ±13%    49.3ns ±16%     ~     (p=0.581 n=19+20)
String/100/Base16-8                  173ns ± 5%     185ns ± 6%   +6.63%  (p=0.000 n=20+18)
String/1000/Base16-8                1.38µs ± 3%    1.49µs ±10%   +8.27%  (p=0.000 n=19+20)
String/10000/Base16-8               13.5µs ± 2%    14.5µs ± 3%   +7.08%  (p=0.000 n=20+20)
String/100000/Base16-8               138µs ± 4%     148µs ± 4%   +7.57%  (p=0.000 n=19+20)
LeafSize/0-8                        2.74ms ± 1%    2.79ms ± 2%   +2.00%  (p=0.000 n=19+19)
LeafSize/1-8                        24.8µs ± 4%    26.1µs ± 8%   +5.33%  (p=0.000 n=18+19)
LeafSize/2-8                        24.9µs ± 7%    25.0µs ± 8%     ~     (p=0.989 n=20+19)
LeafSize/3-8                        97.6µs ± 3%   100.2µs ± 5%   +2.66%  (p=0.001 n=20+19)
LeafSize/4-8                        25.2µs ± 5%    25.4µs ± 5%     ~     (p=0.173 n=19+20)
LeafSize/5-8                         118µs ± 2%     119µs ± 5%     ~     (p=0.478 n=20+20)
LeafSize/6-8                        97.6µs ± 3%   100.1µs ± 8%   +2.65%  (p=0.021 n=20+19)
LeafSize/7-8                        65.6µs ± 5%    67.5µs ± 6%   +2.92%  (p=0.003 n=20+19)
LeafSize/8-8                        25.5µs ± 5%    25.6µs ± 6%     ~     (p=0.461 n=19+20)
LeafSize/9-8                         134µs ± 4%     136µs ± 5%     ~     (p=0.194 n=19+20)
LeafSize/10-8                        119µs ± 3%     122µs ± 3%   +2.52%  (p=0.000 n=20+19)
LeafSize/11-8                        115µs ± 5%     116µs ± 5%     ~     (p=0.158 n=20+19)
LeafSize/12-8                       97.4µs ± 4%   100.3µs ± 5%   +2.91%  (p=0.003 n=19+20)
LeafSize/13-8                       93.1µs ± 4%    93.0µs ± 6%     ~     (p=0.698 n=20+20)
LeafSize/14-8                       67.0µs ± 3%    69.7µs ± 6%   +4.10%  (p=0.000 n=20+20)
LeafSize/15-8                       48.3µs ± 2%    49.3µs ± 6%   +1.91%  (p=0.014 n=19+20)
LeafSize/16-8                       25.6µs ± 5%    25.6µs ± 6%     ~     (p=0.947 n=20+20)
LeafSize/32-8                       30.1µs ± 4%    30.3µs ± 5%     ~     (p=0.685 n=18+19)
LeafSize/64-8                       53.4µs ± 2%    54.0µs ± 3%     ~     (p=0.053 n=19+19)
ProbablyPrime/n=0-8                 3.59ms ± 1%    3.55ms ± 1%   -1.12%  (p=0.000 n=20+18)
ProbablyPrime/n=1-8                 4.21ms ± 2%    4.17ms ± 2%   -0.73%  (p=0.018 n=20+19)
ProbablyPrime/n=5-8                 6.74ms ± 1%    6.72ms ± 1%     ~     (p=0.102 n=20+20)
ProbablyPrime/n=10-8                9.91ms ± 1%    9.89ms ± 2%     ~     (p=0.322 n=19+20)
ProbablyPrime/n=20-8                16.2ms ± 1%    16.1ms ± 2%   -0.52%  (p=0.006 n=19+19)
ProbablyPrime/Lucas-8               2.94ms ± 1%    2.95ms ± 1%   +0.52%  (p=0.002 n=18+19)
ProbablyPrime/MillerRabinBase2-8     641µs ± 2%     640µs ± 2%     ~     (p=0.607 n=19+20)
FloatSqrt/64-8                       653ns ± 5%     704ns ± 5%   +7.82%  (p=0.000 n=19+20)
FloatSqrt/128-8                     1.32µs ± 3%    1.42µs ± 5%   +7.29%  (p=0.000 n=18+20)
FloatSqrt/256-8                     1.44µs ± 2%    1.45µs ± 4%     ~     (p=0.089 n=19+19)
FloatSqrt/1000-8                    3.36µs ± 3%    3.42µs ± 5%   +1.82%  (p=0.012 n=20+20)
FloatSqrt/10000-8                   25.5µs ± 2%    27.5µs ± 7%   +7.91%  (p=0.000 n=18+19)
FloatSqrt/100000-8                   629µs ± 6%     663µs ± 9%   +5.32%  (p=0.000 n=18+20)
FloatSqrt/1000000-8                 46.4ms ± 2%    46.6ms ± 5%     ~     (p=0.351 n=20+19)
[Geo mean]                          9.60µs        10.01µs        +4.28%

name                              old alloc/op   new alloc/op   delta
DecimalConversion-8                 54.0kB ± 0%    43.6kB ± 0%  -19.40%  (p=0.000 n=20+20)
FloatString/100-8                     400B ± 0%      400B ± 0%     ~     (all equal)
FloatString/1000-8                  3.10kB ± 0%    3.10kB ± 0%     ~     (all equal)
FloatString/10000-8                 52.1kB ± 0%    52.1kB ± 0%     ~     (p=0.153 n=20+20)
FloatString/100000-8                 582kB ± 0%     582kB ± 0%     ~     (all equal)
FloatAdd/10-8                        0.00B          0.00B          ~     (all equal)
FloatAdd/100-8                       0.00B          0.00B          ~     (all equal)
FloatAdd/1000-8                      0.00B          0.00B          ~     (all equal)
FloatAdd/10000-8                     0.00B          0.00B          ~     (all equal)
FloatAdd/100000-8                    0.00B          0.00B          ~     (all equal)
FloatSub/10-8                        0.00B          0.00B          ~     (all equal)
FloatSub/100-8                       0.00B          0.00B          ~     (all equal)
FloatSub/1000-8                      0.00B          0.00B          ~     (all equal)
FloatSub/10000-8                     0.00B          0.00B          ~     (all equal)
FloatSub/100000-8                    0.00B          0.00B          ~     (all equal)
ParseFloatSmallExp-8                4.18kB ± 0%    3.60kB ± 0%  -13.79%  (p=0.000 n=20+20)
ParseFloatLargeExp-8                18.9kB ± 0%    19.3kB ± 0%   +2.25%  (p=0.000 n=20+20)
GCD10x10/WithoutXY-8                 96.0B ± 0%     16.0B ± 0%  -83.33%  (p=0.000 n=20+20)
GCD10x10/WithXY-8                     240B ± 0%       88B ± 0%  -63.33%  (p=0.000 n=20+20)
GCD10x100/WithoutXY-8                 192B ± 0%      112B ± 0%  -41.67%  (p=0.000 n=20+20)
GCD10x100/WithXY-8                    464B ± 0%      424B ± 0%   -8.62%  (p=0.000 n=20+20)
GCD10x1000/WithoutXY-8                416B ± 0%      336B ± 0%  -19.23%  (p=0.000 n=20+20)
GCD10x1000/WithXY-8                 1.25kB ± 0%    1.10kB ± 0%  -12.18%  (p=0.000 n=20+20)
GCD10x10000/WithoutXY-8             2.91kB ± 0%    2.83kB ± 0%   -2.75%  (p=0.000 n=20+20)
GCD10x10000/WithXY-8                8.70kB ± 0%    8.55kB ± 0%   -1.76%  (p=0.000 n=16+16)
GCD10x100000/WithoutXY-8            27.2kB ± 0%    27.2kB ± 0%   -0.29%  (p=0.000 n=20+20)
GCD10x100000/WithXY-8               82.4kB ± 0%    82.3kB ± 0%   -0.17%  (p=0.000 n=20+19)
GCD100x100/WithoutXY-8                288B ± 0%      384B ± 0%  +33.33%  (p=0.000 n=20+20)
GCD100x100/WithXY-8                   464B ± 0%      576B ± 0%  +24.14%  (p=0.000 n=20+20)
GCD100x1000/WithoutXY-8               640B ± 0%      688B ± 0%   +7.50%  (p=0.000 n=20+20)
GCD100x1000/WithXY-8                1.52kB ± 0%    1.46kB ± 0%   -3.68%  (p=0.000 n=20+20)
GCD100x10000/WithoutXY-8            4.24kB ± 0%    4.29kB ± 0%   +1.13%  (p=0.000 n=20+20)
GCD100x10000/WithXY-8               11.1kB ± 0%    11.0kB ± 0%   -0.51%  (p=0.000 n=15+20)
GCD100x100000/WithoutXY-8           40.9kB ± 0%    40.9kB ± 0%   +0.12%  (p=0.000 n=20+19)
GCD100x100000/WithXY-8               110kB ± 0%     109kB ± 0%   -0.08%  (p=0.000 n=20+20)
GCD1000x1000/WithoutXY-8            1.22kB ± 0%    1.06kB ± 0%  -13.16%  (p=0.000 n=20+20)
GCD1000x1000/WithXY-8               2.37kB ± 0%    2.11kB ± 0%  -10.83%  (p=0.000 n=20+20)
GCD1000x10000/WithoutXY-8           4.71kB ± 0%    4.63kB ± 0%   -1.70%  (p=0.000 n=20+19)
GCD1000x10000/WithXY-8              28.2kB ± 0%    28.0kB ± 0%   -0.43%  (p=0.000 n=20+15)
GCD1000x100000/WithoutXY-8          41.3kB ± 0%    41.2kB ± 0%   -0.20%  (p=0.000 n=20+16)
GCD1000x100000/WithXY-8              301kB ± 0%     301kB ± 0%   -0.13%  (p=0.000 n=20+20)
GCD10000x10000/WithoutXY-8          8.64kB ± 0%    8.48kB ± 0%   -1.85%  (p=0.000 n=20+20)
GCD10000x10000/WithXY-8             57.2kB ± 0%    57.7kB ± 0%   +0.80%  (p=0.000 n=20+20)
GCD10000x100000/WithoutXY-8         43.8kB ± 0%    43.7kB ± 0%   -0.19%  (p=0.000 n=20+18)
GCD10000x100000/WithXY-8            2.08MB ± 0%    2.08MB ± 0%   -0.02%  (p=0.000 n=15+19)
GCD100000x100000/WithoutXY-8        81.6kB ± 0%    81.4kB ± 0%   -0.20%  (p=0.000 n=20+20)
GCD100000x100000/WithXY-8           4.32MB ± 0%    4.33MB ± 0%   +0.12%  (p=0.000 n=20+20)
Hilbert-8                            653kB ± 0%     313kB ± 0%  -52.13%  (p=0.000 n=19+20)
Binomial-8                          1.82kB ± 0%    1.02kB ± 0%  -43.86%  (p=0.000 n=20+20)
QuoRem-8                             0.00B          0.00B          ~     (all equal)
Exp-8                               11.1kB ± 0%    11.0kB ± 0%   -0.34%  (p=0.000 n=19+20)
Exp2-8                              11.3kB ± 0%    11.3kB ± 0%   -0.35%  (p=0.000 n=19+20)
Bitset-8                             0.00B          0.00B          ~     (all equal)
BitsetNeg-8                          0.00B          0.00B          ~     (all equal)
BitsetOrig-8                          103B ± 0%       63B ± 0%  -38.83%  (p=0.000 n=20+20)
BitsetNegOrig-8                       215B ± 0%      175B ± 0%  -18.60%  (p=0.000 n=20+20)
ModSqrt225_Tonelli-8                11.3kB ± 0%    11.0kB ± 0%   -2.76%  (p=0.000 n=20+17)
ModSqrt225_3Mod4-8                  3.57kB ± 0%    3.53kB ± 0%   -1.12%  (p=0.000 n=20+20)
ModSqrt231_Tonelli-8                11.0kB ± 0%    10.7kB ± 0%   -2.55%  (p=0.000 n=20+20)
ModSqrt231_5Mod8-8                  4.21kB ± 0%    4.09kB ± 0%   -2.85%  (p=0.000 n=16+20)
ModInverse-8                        1.44kB ± 0%    1.28kB ± 0%  -11.11%  (p=0.000 n=20+20)
Sqrt-8                              6.00kB ± 0%    6.00kB ± 0%     ~     (all equal)
IntSqr/1-8                           0.00B          0.00B          ~     (all equal)
IntSqr/2-8                           0.00B          0.00B          ~     (all equal)
IntSqr/3-8                           0.00B          0.00B          ~     (all equal)
IntSqr/5-8                           0.00B          0.00B          ~     (all equal)
IntSqr/8-8                           0.00B          0.00B          ~     (all equal)
IntSqr/10-8                          0.00B          0.00B          ~     (all equal)
IntSqr/20-8                           320B ± 0%      320B ± 0%     ~     (all equal)
IntSqr/30-8                           480B ± 0%      480B ± 0%     ~     (all equal)
IntSqr/50-8                           896B ± 0%      896B ± 0%     ~     (all equal)
IntSqr/80-8                         1.28kB ± 0%    1.28kB ± 0%     ~     (all equal)
IntSqr/100-8                        1.79kB ± 0%    1.79kB ± 0%     ~     (all equal)
IntSqr/200-8                        3.20kB ± 0%    3.20kB ± 0%     ~     (all equal)
IntSqr/300-8                        8.06kB ± 0%    8.06kB ± 0%     ~     (all equal)
IntSqr/500-8                        12.3kB ± 0%    12.3kB ± 0%     ~     (all equal)
IntSqr/800-8                        28.8kB ± 0%    28.8kB ± 0%     ~     (all equal)
IntSqr/1000-8                       36.9kB ± 0%    36.9kB ± 0%     ~     (all equal)
Div/20/10-8                          0.00B          0.00B          ~     (all equal)
Div/200/100-8                        0.00B          0.00B          ~     (all equal)
Div/2000/1000-8                      0.00B          0.00B          ~     (all equal)
Div/20000/10000-8                    0.00B          0.00B          ~     (all equal)
Div/200000/100000-8                   690B ± 0%      690B ± 0%     ~     (all equal)
Mul-8                                565kB ± 0%     565kB ± 0%     ~     (all equal)
ZeroShifts/Shl-8                    6.53kB ± 0%    6.53kB ± 0%     ~     (all equal)
ZeroShifts/ShlSame-8                 0.00B          0.00B          ~     (all equal)
ZeroShifts/Shr-8                    6.53kB ± 0%    6.53kB ± 0%     ~     (all equal)
ZeroShifts/ShrSame-8                 0.00B          0.00B          ~     (all equal)
Exp3Power/0x10-8                      192B ± 0%      112B ± 0%  -41.67%  (p=0.000 n=20+20)
Exp3Power/0x40-8                      192B ± 0%      112B ± 0%  -41.67%  (p=0.000 n=20+20)
Exp3Power/0x100-8                     288B ± 0%      208B ± 0%  -27.78%  (p=0.000 n=20+20)
Exp3Power/0x400-8                     672B ± 0%      592B ± 0%  -11.90%  (p=0.000 n=20+20)
Exp3Power/0x1000-8                  3.33kB ± 0%    3.25kB ± 0%   -2.40%  (p=0.000 n=20+20)
Exp3Power/0x4000-8                  13.8kB ± 0%    13.7kB ± 0%   -0.58%  (p=0.000 n=20+20)
Exp3Power/0x10000-8                  117kB ± 0%     117kB ± 0%   -0.07%  (p=0.000 n=20+20)
Exp3Power/0x40000-8                  755kB ± 0%     755kB ± 0%   -0.01%  (p=0.000 n=19+20)
Exp3Power/0x100000-8                5.22MB ± 0%    5.22MB ± 0%   -0.00%  (p=0.000 n=20+20)
Exp3Power/0x400000-8                39.8MB ± 0%    39.8MB ± 0%   -0.00%  (p=0.000 n=20+19)
Fibo-8                              3.09MB ± 0%    3.08MB ± 0%   -0.28%  (p=0.000 n=20+16)
NatSqr/1-8                           48.0B ± 0%     48.0B ± 0%     ~     (all equal)
NatSqr/2-8                           64.0B ± 0%     64.0B ± 0%     ~     (all equal)
NatSqr/3-8                           80.0B ± 0%     80.0B ± 0%     ~     (all equal)
NatSqr/5-8                            112B ± 0%      112B ± 0%     ~     (all equal)
NatSqr/8-8                            160B ± 0%      160B ± 0%     ~     (all equal)
NatSqr/10-8                           192B ± 0%      192B ± 0%     ~     (all equal)
NatSqr/20-8                           672B ± 0%      672B ± 0%     ~     (all equal)
NatSqr/30-8                           992B ± 0%      992B ± 0%     ~     (all equal)
NatSqr/50-8                         1.79kB ± 0%    1.79kB ± 0%     ~     (all equal)
NatSqr/80-8                         2.69kB ± 0%    2.69kB ± 0%     ~     (all equal)
NatSqr/100-8                        3.58kB ± 0%    3.58kB ± 0%     ~     (all equal)
NatSqr/200-8                        6.66kB ± 0%    6.66kB ± 0%     ~     (all equal)
NatSqr/300-8                        24.4kB ± 0%    24.4kB ± 0%     ~     (all equal)
NatSqr/500-8                        36.9kB ± 0%    36.9kB ± 0%     ~     (all equal)
NatSqr/800-8                        69.8kB ± 0%    69.8kB ± 0%     ~     (all equal)
NatSqr/1000-8                       86.0kB ± 0%    86.0kB ± 0%     ~     (all equal)
NatSetBytes/8-8                      0.00B          0.00B          ~     (all equal)
NatSetBytes/24-8                     64.0B ± 0%     64.0B ± 0%     ~     (all equal)
NatSetBytes/128-8                     160B ± 0%      160B ± 0%     ~     (all equal)
NatSetBytes/7-8                      0.00B          0.00B          ~     (all equal)
NatSetBytes/23-8                     64.0B ± 0%     64.0B ± 0%     ~     (all equal)
NatSetBytes/127-8                     160B ± 0%      160B ± 0%     ~     (all equal)
ScanPi-8                            75.4kB ± 0%    75.7kB ± 0%   +0.41%  (p=0.000 n=20+20)
StringPiParallel-8                  20.4kB ± 0%    20.4kB ± 0%     ~     (p=0.223 n=20+20)
Scan/10/Base2-8                      48.0B ± 0%     48.0B ± 0%     ~     (all equal)
Scan/100/Base2-8                     48.0B ± 0%     48.0B ± 0%     ~     (all equal)
Scan/1000/Base2-8                    48.0B ± 0%     48.0B ± 0%     ~     (all equal)
Scan/10000/Base2-8                   48.0B ± 0%     48.0B ± 0%     ~     (all equal)
Scan/100000/Base2-8                  48.0B ± 0%     48.0B ± 0%     ~     (all equal)
Scan/10/Base8-8                      48.0B ± 0%     48.0B ± 0%     ~     (all equal)
Scan/100/Base8-8                     48.0B ± 0%     48.0B ± 0%     ~     (all equal)
Scan/1000/Base8-8                    48.0B ± 0%     48.0B ± 0%     ~     (all equal)
Scan/10000/Base8-8                   48.0B ± 0%     48.0B ± 0%     ~     (all equal)
Scan/100000/Base8-8                  48.0B ± 0%     48.0B ± 0%     ~     (all equal)
Scan/10/Base10-8                     48.0B ± 0%     48.0B ± 0%     ~     (all equal)
Scan/100/Base10-8                    48.0B ± 0%     48.0B ± 0%     ~     (all equal)
Scan/1000/Base10-8                   48.0B ± 0%     48.0B ± 0%     ~     (all equal)
Scan/10000/Base10-8                  48.0B ± 0%     48.0B ± 0%     ~     (all equal)
Scan/100000/Base10-8                 48.0B ± 0%     48.0B ± 0%     ~     (all equal)
Scan/10/Base16-8                     48.0B ± 0%     48.0B ± 0%     ~     (all equal)
Scan/100/Base16-8                    48.0B ± 0%     48.0B ± 0%     ~     (all equal)
Scan/1000/Base16-8                   48.0B ± 0%     48.0B ± 0%     ~     (all equal)
Scan/10000/Base16-8                  48.0B ± 0%     48.0B ± 0%     ~     (all equal)
Scan/100000/Base16-8                 48.0B ± 0%     48.0B ± 0%     ~     (all equal)
String/10/Base2-8                    48.0B ± 0%     48.0B ± 0%     ~     (all equal)
String/100/Base2-8                    352B ± 0%      352B ± 0%     ~     (all equal)
String/1000/Base2-8                 3.46kB ± 0%    3.46kB ± 0%     ~     (all equal)
String/10000/Base2-8                41.0kB ± 0%    41.0kB ± 0%     ~     (all equal)
String/100000/Base2-8                336kB ± 0%     336kB ± 0%     ~     (all equal)
String/10/Base8-8                    16.0B ± 0%     16.0B ± 0%     ~     (all equal)
String/100/Base8-8                    112B ± 0%      112B ± 0%     ~     (all equal)
String/1000/Base8-8                 1.15kB ± 0%    1.15kB ± 0%     ~     (all equal)
String/10000/Base8-8                12.3kB ± 0%    12.3kB ± 0%     ~     (all equal)
String/100000/Base8-8                115kB ± 0%     115kB ± 0%     ~     (all equal)
String/10/Base10-8                   64.0B ± 0%     24.0B ± 0%  -62.50%  (p=0.000 n=20+20)
String/100/Base10-8                   192B ± 0%      192B ± 0%     ~     (all equal)
String/1000/Base10-8                1.95kB ± 0%    1.95kB ± 0%     ~     (all equal)
String/10000/Base10-8               20.0kB ± 0%    20.0kB ± 0%     ~     (p=0.983 n=19+20)
String/100000/Base10-8               210kB ± 1%     211kB ± 1%   +0.82%  (p=0.000 n=19+20)
String/10/Base16-8                   16.0B ± 0%     16.0B ± 0%     ~     (all equal)
String/100/Base16-8                  96.0B ± 0%     96.0B ± 0%     ~     (all equal)
String/1000/Base16-8                  896B ± 0%      896B ± 0%     ~     (all equal)
String/10000/Base16-8               9.47kB ± 0%    9.47kB ± 0%     ~     (all equal)
String/100000/Base16-8              90.1kB ± 0%    90.1kB ± 0%     ~     (all equal)
LeafSize/0-8                        16.9kB ± 0%    16.8kB ± 0%   -0.44%  (p=0.000 n=20+20)
LeafSize/1-8                        22.4kB ± 0%    22.3kB ± 0%   -0.34%  (p=0.000 n=20+19)
LeafSize/2-8                        22.4kB ± 0%    22.3kB ± 0%   -0.34%  (p=0.000 n=20+19)
LeafSize/3-8                        22.4kB ± 0%    22.3kB ± 0%   -0.34%  (p=0.000 n=20+17)
LeafSize/4-8                        22.4kB ± 0%    22.3kB ± 0%   -0.34%  (p=0.000 n=20+19)
LeafSize/5-8                        22.4kB ± 0%    22.3kB ± 0%   -0.33%  (p=0.000 n=20+20)
LeafSize/6-8                        22.3kB ± 0%    22.2kB ± 0%   -0.34%  (p=0.000 n=20+20)
LeafSize/7-8                        22.3kB ± 0%    22.2kB ± 0%   -0.35%  (p=0.000 n=20+20)
LeafSize/8-8                        22.3kB ± 0%    22.2kB ± 0%   -0.34%  (p=0.000 n=16+20)
LeafSize/9-8                        22.3kB ± 0%    22.2kB ± 0%   -0.33%  (p=0.000 n=20+20)
LeafSize/10-8                       22.3kB ± 0%    22.2kB ± 0%   -0.33%  (p=0.000 n=20+20)
LeafSize/11-8                       22.3kB ± 0%    22.2kB ± 0%   -0.33%  (p=0.000 n=20+20)
LeafSize/12-8                       22.3kB ± 0%    22.2kB ± 0%   -0.33%  (p=0.000 n=20+20)
LeafSize/13-8                       22.3kB ± 0%    22.2kB ± 0%   -0.34%  (p=0.000 n=20+15)
LeafSize/14-8                       22.3kB ± 0%    22.2kB ± 0%   -0.33%  (p=0.000 n=20+20)
LeafSize/15-8                       22.3kB ± 0%    22.2kB ± 0%   -0.33%  (p=0.000 n=20+20)
LeafSize/16-8                       22.3kB ± 0%    22.2kB ± 0%   -0.33%  (p=0.000 n=19+20)
LeafSize/32-8                       22.3kB ± 0%    22.2kB ± 0%   -0.32%  (p=0.000 n=20+20)
LeafSize/64-8                       21.8kB ± 0%    21.7kB ± 0%   -0.33%  (p=0.000 n=18+19)
ProbablyPrime/n=0-8                 15.3kB ± 0%    14.9kB ± 0%   -2.35%  (p=0.000 n=20+20)
ProbablyPrime/n=1-8                 21.0kB ± 0%    20.7kB ± 0%   -1.71%  (p=0.000 n=20+20)
ProbablyPrime/n=5-8                 43.4kB ± 0%    42.9kB ± 0%   -1.20%  (p=0.000 n=20+20)
ProbablyPrime/n=10-8                71.5kB ± 0%    70.7kB ± 0%   -1.01%  (p=0.000 n=19+20)
ProbablyPrime/n=20-8                 127kB ± 0%     126kB ± 0%   -0.88%  (p=0.000 n=20+20)
ProbablyPrime/Lucas-8               3.07kB ± 0%    2.79kB ± 0%   -9.12%  (p=0.000 n=20+20)
ProbablyPrime/MillerRabinBase2-8    12.1kB ± 0%    12.0kB ± 0%   -0.66%  (p=0.000 n=20+20)
FloatSqrt/64-8                        416B ± 0%      360B ± 0%  -13.46%  (p=0.000 n=20+20)
FloatSqrt/128-8                       640B ± 0%      584B ± 0%   -8.75%  (p=0.000 n=20+20)
FloatSqrt/256-8                       512B ± 0%      472B ± 0%   -7.81%  (p=0.000 n=20+20)
FloatSqrt/1000-8                    1.47kB ± 0%    1.43kB ± 0%   -2.72%  (p=0.000 n=20+20)
FloatSqrt/10000-8                   18.2kB ± 0%    18.1kB ± 0%   -0.22%  (p=0.000 n=20+20)
FloatSqrt/100000-8                   204kB ± 0%     204kB ± 0%   -0.02%  (p=0.000 n=20+20)
FloatSqrt/1000000-8                 6.37MB ± 0%    6.37MB ± 0%   -0.00%  (p=0.000 n=19+20)
[Geo mean]                          3.42kB         3.24kB        -5.33%

name                              old allocs/op  new allocs/op  delta
DecimalConversion-8                  1.65k ± 0%     1.65k ± 0%     ~     (all equal)
FloatString/100-8                     8.00 ± 0%      8.00 ± 0%     ~     (all equal)
FloatString/1000-8                    9.00 ± 0%      9.00 ± 0%     ~     (all equal)
FloatString/10000-8                   22.0 ± 0%      22.0 ± 0%     ~     (all equal)
FloatString/100000-8                   136 ± 0%       136 ± 0%     ~     (all equal)
FloatAdd/10-8                         0.00           0.00          ~     (all equal)
FloatAdd/100-8                        0.00           0.00          ~     (all equal)
FloatAdd/1000-8                       0.00           0.00          ~     (all equal)
FloatAdd/10000-8                      0.00           0.00          ~     (all equal)
FloatAdd/100000-8                     0.00           0.00          ~     (all equal)
FloatSub/10-8                         0.00           0.00          ~     (all equal)
FloatSub/100-8                        0.00           0.00          ~     (all equal)
FloatSub/1000-8                       0.00           0.00          ~     (all equal)
FloatSub/10000-8                      0.00           0.00          ~     (all equal)
FloatSub/100000-8                     0.00           0.00          ~     (all equal)
ParseFloatSmallExp-8                   110 ± 0%       130 ± 0%  +18.18%  (p=0.000 n=20+20)
ParseFloatLargeExp-8                   319 ± 0%       371 ± 0%  +16.30%  (p=0.000 n=20+20)
GCD10x10/WithoutXY-8                  2.00 ± 0%      2.00 ± 0%     ~     (all equal)
GCD10x10/WithXY-8                     5.00 ± 0%      6.00 ± 0%  +20.00%  (p=0.000 n=20+20)
GCD10x100/WithoutXY-8                 4.00 ± 0%      4.00 ± 0%     ~     (all equal)
GCD10x100/WithXY-8                    9.00 ± 0%     12.00 ± 0%  +33.33%  (p=0.000 n=20+20)
GCD10x1000/WithoutXY-8                4.00 ± 0%      4.00 ± 0%     ~     (all equal)
GCD10x1000/WithXY-8                   11.0 ± 0%      12.0 ± 0%   +9.09%  (p=0.000 n=20+20)
GCD10x10000/WithoutXY-8               4.00 ± 0%      4.00 ± 0%     ~     (all equal)
GCD10x10000/WithXY-8                  11.0 ± 0%      12.0 ± 0%   +9.09%  (p=0.000 n=20+20)
GCD10x100000/WithoutXY-8              4.00 ± 0%      4.00 ± 0%     ~     (all equal)
GCD10x100000/WithXY-8                 11.0 ± 0%      12.0 ± 0%   +9.09%  (p=0.000 n=20+20)
GCD100x100/WithoutXY-8                6.00 ± 0%     10.00 ± 0%  +66.67%  (p=0.000 n=20+20)
GCD100x100/WithXY-8                   9.00 ± 0%     15.00 ± 0%  +66.67%  (p=0.000 n=20+20)
GCD100x1000/WithoutXY-8               6.00 ± 0%      8.00 ± 0%  +33.33%  (p=0.000 n=20+20)
GCD100x1000/WithXY-8                  12.0 ± 0%      13.0 ± 0%   +8.33%  (p=0.000 n=20+20)
GCD100x10000/WithoutXY-8              6.00 ± 0%      8.00 ± 0%  +33.33%  (p=0.000 n=20+20)
GCD100x10000/WithXY-8                 12.0 ± 0%      13.0 ± 0%   +8.33%  (p=0.000 n=20+20)
GCD100x100000/WithoutXY-8             6.00 ± 0%      8.00 ± 0%  +33.33%  (p=0.000 n=20+20)
GCD100x100000/WithXY-8                12.0 ± 0%      13.0 ± 0%   +8.33%  (p=0.000 n=20+20)
GCD1000x1000/WithoutXY-8              10.0 ± 0%      10.0 ± 0%     ~     (all equal)
GCD1000x1000/WithXY-8                 19.0 ± 0%      20.0 ± 0%   +5.26%  (p=0.000 n=20+20)
GCD1000x10000/WithoutXY-8             8.00 ± 0%      8.00 ± 0%     ~     (all equal)
GCD1000x10000/WithXY-8                26.0 ± 0%      26.0 ± 0%     ~     (all equal)
GCD1000x100000/WithoutXY-8            8.00 ± 0%      8.00 ± 0%     ~     (all equal)
GCD1000x100000/WithXY-8               27.0 ± 0%      27.0 ± 0%     ~     (all equal)
GCD10000x10000/WithoutXY-8            10.0 ± 0%      10.0 ± 0%     ~     (all equal)
GCD10000x10000/WithXY-8               76.0 ± 0%      78.0 ± 0%   +2.63%  (p=0.000 n=20+20)
GCD10000x100000/WithoutXY-8           8.00 ± 0%      8.00 ± 0%     ~     (all equal)
GCD10000x100000/WithXY-8               174 ± 0%       174 ± 0%     ~     (all equal)
GCD100000x100000/WithoutXY-8          10.0 ± 0%      10.0 ± 0%     ~     (all equal)
GCD100000x100000/WithXY-8              645 ± 0%       647 ± 0%   +0.31%  (p=0.000 n=20+20)
Hilbert-8                            14.1k ± 0%     14.3k ± 0%   +0.92%  (p=0.000 n=20+20)
Binomial-8                            38.0 ± 0%      38.0 ± 0%     ~     (all equal)
QuoRem-8                              0.00           0.00          ~     (all equal)
Exp-8                                 21.0 ± 0%      21.0 ± 0%     ~     (all equal)
Exp2-8                                22.0 ± 0%      22.0 ± 0%     ~     (all equal)
Bitset-8                              0.00           0.00          ~     (all equal)
BitsetNeg-8                           0.00           0.00          ~     (all equal)
BitsetOrig-8                          1.00 ± 0%      1.00 ± 0%     ~     (all equal)
BitsetNegOrig-8                       2.00 ± 0%      2.00 ± 0%     ~     (all equal)
ModSqrt225_Tonelli-8                  85.0 ± 0%      86.0 ± 0%   +1.18%  (p=0.000 n=20+20)
ModSqrt225_3Mod4-8                    25.0 ± 0%      25.0 ± 0%     ~     (all equal)
ModSqrt231_Tonelli-8                  80.0 ± 0%      80.0 ± 0%     ~     (all equal)
ModSqrt231_5Mod8-8                    32.0 ± 0%      32.0 ± 0%     ~     (all equal)
ModInverse-8                          11.0 ± 0%      11.0 ± 0%     ~     (all equal)
Sqrt-8                                13.0 ± 0%      13.0 ± 0%     ~     (all equal)
IntSqr/1-8                            0.00           0.00          ~     (all equal)
IntSqr/2-8                            0.00           0.00          ~     (all equal)
IntSqr/3-8                            0.00           0.00          ~     (all equal)
IntSqr/5-8                            0.00           0.00          ~     (all equal)
IntSqr/8-8                            0.00           0.00          ~     (all equal)
IntSqr/10-8                           0.00           0.00          ~     (all equal)
IntSqr/20-8                           1.00 ± 0%      1.00 ± 0%     ~     (all equal)
IntSqr/30-8                           1.00 ± 0%      1.00 ± 0%     ~     (all equal)
IntSqr/50-8                           1.00 ± 0%      1.00 ± 0%     ~     (all equal)
IntSqr/80-8                           1.00 ± 0%      1.00 ± 0%     ~     (all equal)
IntSqr/100-8                          1.00 ± 0%      1.00 ± 0%     ~     (all equal)
IntSqr/200-8                          1.00 ± 0%      1.00 ± 0%     ~     (all equal)
IntSqr/300-8                          3.00 ± 0%      3.00 ± 0%     ~     (all equal)
IntSqr/500-8                          3.00 ± 0%      3.00 ± 0%     ~     (all equal)
IntSqr/800-8                          9.00 ± 0%      9.00 ± 0%     ~     (all equal)
IntSqr/1000-8                         9.00 ± 0%      9.00 ± 0%     ~     (all equal)
Div/20/10-8                           0.00           0.00          ~     (all equal)
Div/200/100-8                         0.00           0.00          ~     (all equal)
Div/2000/1000-8                       0.00           0.00          ~     (all equal)
Div/20000/10000-8                     0.00           0.00          ~     (all equal)
Div/200000/100000-8                   0.00           0.00          ~     (all equal)
Mul-8                                 2.00 ± 0%      2.00 ± 0%     ~     (all equal)
ZeroShifts/Shl-8                      1.00 ± 0%      1.00 ± 0%     ~     (all equal)
ZeroShifts/ShlSame-8                  0.00           0.00          ~     (all equal)
ZeroShifts/Shr-8                      1.00 ± 0%      1.00 ± 0%     ~     (all equal)
ZeroShifts/ShrSame-8                  0.00           0.00          ~     (all equal)
Exp3Power/0x10-8                      4.00 ± 0%      4.00 ± 0%     ~     (all equal)
Exp3Power/0x40-8                      4.00 ± 0%      4.00 ± 0%     ~     (all equal)
Exp3Power/0x100-8                     5.00 ± 0%      5.00 ± 0%     ~     (all equal)
Exp3Power/0x400-8                     7.00 ± 0%      7.00 ± 0%     ~     (all equal)
Exp3Power/0x1000-8                    11.0 ± 0%      11.0 ± 0%     ~     (all equal)
Exp3Power/0x4000-8                    15.0 ± 0%      15.0 ± 0%     ~     (all equal)
Exp3Power/0x10000-8                   29.0 ± 0%      29.0 ± 0%     ~     (all equal)
Exp3Power/0x40000-8                    140 ± 0%       140 ± 0%     ~     (all equal)
Exp3Power/0x100000-8                 1.12k ± 0%     1.12k ± 0%     ~     (all equal)
Exp3Power/0x400000-8                 9.88k ± 0%     9.88k ± 0%     ~     (p=0.747 n=17+19)
Fibo-8                                 739 ± 0%       743 ± 0%   +0.54%  (p=0.000 n=20+20)
NatSqr/1-8                            1.00 ± 0%      1.00 ± 0%     ~     (all equal)
NatSqr/2-8                            1.00 ± 0%      1.00 ± 0%     ~     (all equal)
NatSqr/3-8                            1.00 ± 0%      1.00 ± 0%     ~     (all equal)
NatSqr/5-8                            1.00 ± 0%      1.00 ± 0%     ~     (all equal)
NatSqr/8-8                            1.00 ± 0%      1.00 ± 0%     ~     (all equal)
NatSqr/10-8                           1.00 ± 0%      1.00 ± 0%     ~     (all equal)
NatSqr/20-8                           2.00 ± 0%      2.00 ± 0%     ~     (all equal)
NatSqr/30-8                           2.00 ± 0%      2.00 ± 0%     ~     (all equal)
NatSqr/50-8                           2.00 ± 0%      2.00 ± 0%     ~     (all equal)
NatSqr/80-8                           2.00 ± 0%      2.00 ± 0%     ~     (all equal)
NatSqr/100-8                          2.00 ± 0%      2.00 ± 0%     ~     (all equal)
NatSqr/200-8                          2.00 ± 0%      2.00 ± 0%     ~     (all equal)
NatSqr/300-8                          4.00 ± 0%      4.00 ± 0%     ~     (all equal)
NatSqr/500-8                          4.00 ± 0%      4.00 ± 0%     ~     (all equal)
NatSqr/800-8                          10.0 ± 0%      10.0 ± 0%     ~     (all equal)
NatSqr/1000-8                         10.0 ± 0%      10.0 ± 0%     ~     (all equal)
NatSetBytes/8-8                       0.00           0.00          ~     (all equal)
NatSetBytes/24-8                      1.00 ± 0%      1.00 ± 0%     ~     (all equal)
NatSetBytes/128-8                     1.00 ± 0%      1.00 ± 0%     ~     (all equal)
NatSetBytes/7-8                       0.00           0.00          ~     (all equal)
NatSetBytes/23-8                      1.00 ± 0%      1.00 ± 0%     ~     (all equal)
NatSetBytes/127-8                     1.00 ± 0%      1.00 ± 0%     ~     (all equal)
ScanPi-8                              60.0 ± 0%      61.0 ± 0%   +1.67%  (p=0.000 n=20+20)
StringPiParallel-8                    24.0 ± 0%      24.0 ± 0%     ~     (all equal)
Scan/10/Base2-8                       1.00 ± 0%      1.00 ± 0%     ~     (all equal)
Scan/100/Base2-8                      1.00 ± 0%      1.00 ± 0%     ~     (all equal)
Scan/1000/Base2-8                     1.00 ± 0%      1.00 ± 0%     ~     (all equal)
Scan/10000/Base2-8                    1.00 ± 0%      1.00 ± 0%     ~     (all equal)
Scan/100000/Base2-8                   1.00 ± 0%      1.00 ± 0%     ~     (all equal)
Scan/10/Base8-8                       1.00 ± 0%      1.00 ± 0%     ~     (all equal)
Scan/100/Base8-8                      1.00 ± 0%      1.00 ± 0%     ~     (all equal)
Scan/1000/Base8-8                     1.00 ± 0%      1.00 ± 0%     ~     (all equal)
Scan/10000/Base8-8                    1.00 ± 0%      1.00 ± 0%     ~     (all equal)
Scan/100000/Base8-8                   1.00 ± 0%      1.00 ± 0%     ~     (all equal)
Scan/10/Base10-8                      1.00 ± 0%      1.00 ± 0%     ~     (all equal)
Scan/100/Base10-8                     1.00 ± 0%      1.00 ± 0%     ~     (all equal)
Scan/1000/Base10-8                    1.00 ± 0%      1.00 ± 0%     ~     (all equal)
Scan/10000/Base10-8                   1.00 ± 0%      1.00 ± 0%     ~     (all equal)
Scan/100000/Base10-8                  1.00 ± 0%      1.00 ± 0%     ~     (all equal)
Scan/10/Base16-8                      1.00 ± 0%      1.00 ± 0%     ~     (all equal)
Scan/100/Base16-8                     1.00 ± 0%      1.00 ± 0%     ~     (all equal)
Scan/1000/Base16-8                    1.00 ± 0%      1.00 ± 0%     ~     (all equal)
Scan/10000/Base16-8                   1.00 ± 0%      1.00 ± 0%     ~     (all equal)
Scan/100000/Base16-8                  1.00 ± 0%      1.00 ± 0%     ~     (all equal)
String/10/Base2-8                     1.00 ± 0%      1.00 ± 0%     ~     (all equal)
String/100/Base2-8                    1.00 ± 0%      1.00 ± 0%     ~     (all equal)
String/1000/Base2-8                   1.00 ± 0%      1.00 ± 0%     ~     (all equal)
String/10000/Base2-8                  1.00 ± 0%      1.00 ± 0%     ~     (all equal)
String/100000/Base2-8                 1.00 ± 0%      1.00 ± 0%     ~     (all equal)
String/10/Base8-8                     1.00 ± 0%      1.00 ± 0%     ~     (all equal)
String/100/Base8-8                    1.00 ± 0%      1.00 ± 0%     ~     (all equal)
String/1000/Base8-8                   1.00 ± 0%      1.00 ± 0%     ~     (all equal)
String/10000/Base8-8                  1.00 ± 0%      1.00 ± 0%     ~     (all equal)
String/100000/Base8-8                 1.00 ± 0%      1.00 ± 0%     ~     (all equal)
String/10/Base10-8                    2.00 ± 0%      2.00 ± 0%     ~     (all equal)
String/100/Base10-8                   2.00 ± 0%      2.00 ± 0%     ~     (all equal)
String/1000/Base10-8                  3.00 ± 0%      3.00 ± 0%     ~     (all equal)
String/10000/Base10-8                 3.00 ± 0%      3.00 ± 0%     ~     (all equal)
String/100000/Base10-8                3.00 ± 0%      3.00 ± 0%     ~     (all equal)
String/10/Base16-8                    1.00 ± 0%      1.00 ± 0%     ~     (all equal)
String/100/Base16-8                   1.00 ± 0%      1.00 ± 0%     ~     (all equal)
String/1000/Base16-8                  1.00 ± 0%      1.00 ± 0%     ~     (all equal)
String/10000/Base16-8                 1.00 ± 0%      1.00 ± 0%     ~     (all equal)
String/100000/Base16-8                1.00 ± 0%      1.00 ± 0%     ~     (all equal)
LeafSize/0-8                          10.0 ± 0%      10.0 ± 0%     ~     (all equal)
LeafSize/1-8                          13.0 ± 0%      13.0 ± 0%     ~     (all equal)
LeafSize/2-8                          13.0 ± 0%      13.0 ± 0%     ~     (all equal)
LeafSize/3-8                          13.0 ± 0%      13.0 ± 0%     ~     (all equal)
LeafSize/4-8                          13.0 ± 0%      13.0 ± 0%     ~     (all equal)
LeafSize/5-8                          13.0 ± 0%      13.0 ± 0%     ~     (all equal)
LeafSize/6-8                          12.0 ± 0%      12.0 ± 0%     ~     (all equal)
LeafSize/7-8                          12.0 ± 0%      12.0 ± 0%     ~     (all equal)
LeafSize/8-8                          12.0 ± 0%      12.0 ± 0%     ~     (all equal)
LeafSize/9-8                          12.0 ± 0%      12.0 ± 0%     ~     (all equal)
LeafSize/10-8                         12.0 ± 0%      12.0 ± 0%     ~     (all equal)
LeafSize/11-8                         12.0 ± 0%      12.0 ± 0%     ~     (all equal)
LeafSize/12-8                         12.0 ± 0%      12.0 ± 0%     ~     (all equal)
LeafSize/13-8                         12.0 ± 0%      12.0 ± 0%     ~     (all equal)
LeafSize/14-8                         12.0 ± 0%      12.0 ± 0%     ~     (all equal)
LeafSize/15-8                         12.0 ± 0%      12.0 ± 0%     ~     (all equal)
LeafSize/16-8                         12.0 ± 0%      12.0 ± 0%     ~     (all equal)
LeafSize/32-8                         12.0 ± 0%      12.0 ± 0%     ~     (all equal)
LeafSize/64-8                         11.0 ± 0%      11.0 ± 0%     ~     (all equal)
ProbablyPrime/n=0-8                   52.0 ± 0%      52.0 ± 0%     ~     (all equal)
ProbablyPrime/n=1-8                   73.0 ± 0%      73.0 ± 0%     ~     (all equal)
ProbablyPrime/n=5-8                    157 ± 0%       157 ± 0%     ~     (all equal)
ProbablyPrime/n=10-8                   262 ± 0%       262 ± 0%     ~     (all equal)
ProbablyPrime/n=20-8                   472 ± 0%       472 ± 0%     ~     (all equal)
ProbablyPrime/Lucas-8                 22.0 ± 0%      22.0 ± 0%     ~     (all equal)
ProbablyPrime/MillerRabinBase2-8      29.0 ± 0%      29.0 ± 0%     ~     (all equal)
FloatSqrt/64-8                        9.00 ± 0%     10.00 ± 0%  +11.11%  (p=0.000 n=20+20)
FloatSqrt/128-8                       12.0 ± 0%      13.0 ± 0%   +8.33%  (p=0.000 n=20+20)
FloatSqrt/256-8                       8.00 ± 0%      8.00 ± 0%     ~     (all equal)
FloatSqrt/1000-8                      9.00 ± 0%      9.00 ± 0%     ~     (all equal)
FloatSqrt/10000-8                     14.0 ± 0%      14.0 ± 0%     ~     (all equal)
FloatSqrt/100000-8                    33.0 ± 0%      33.0 ± 0%     ~     (all equal)
FloatSqrt/1000000-8                  1.16k ± 0%     1.16k ± 0%     ~     (all equal)
[Geo mean]                            6.62           6.76        +2.09%

Change-Id: Id9df4157cac1e07721e35cff7fcdefe60703873a
Reviewed-on: https://go-review.googlesource.com/c/150999
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
6 years agodoc: update go1.12.html using latest output from relnote tool
Andrew Bonventre [Wed, 28 Nov 2018 16:35:39 +0000 (11:35 -0500)]
doc: update go1.12.html using latest output from relnote tool

Change-Id: I6b20c3fd7f15f35d2288d9a0fd6512c541a62c92
Reviewed-on: https://go-review.googlesource.com/c/151558
Reviewed-by: Bryan C. Mills <bcmills@google.com>
6 years agocmd/compile: randomize value order in block for testing
Keith Randall [Mon, 5 Dec 2016 23:41:04 +0000 (15:41 -0800)]
cmd/compile: randomize value order in block for testing

A little bit of compiler stress testing. Randomize the order
of the values in a block before every phase. This randomization
makes sure that we're not implicitly depending on that order.

Currently the random seed is a hash of the function name.
It provides determinism, but sacrifices some coverage.
Other arrangements are possible (env var, ...) but require
more setup.

Fixes #20178

Change-Id: Idae792a23264bd9a3507db6ba49b6d591a608e83
Reviewed-on: https://go-review.googlesource.com/c/33909
Reviewed-by: Cherry Zhang <cherryyz@google.com>
6 years agocmd/compile: order nil checks by source position
Keith Randall [Tue, 27 Nov 2018 22:15:51 +0000 (14:15 -0800)]
cmd/compile: order nil checks by source position

There's nothing enforcing ordering between redundant nil checks when
they may occur during the same memory state. Commit to using the
earliest one in source order.

Otherwise the choice of which to remove depends on the ordering of
values in a block (before scheduling). That's unfortunate when trying
to ensure that the compiler doesn't depend on that ordering for
anything.

Update #20178

Change-Id: I2cdd5be10618accd9d91fa07406c90cbd023ffba
Reviewed-on: https://go-review.googlesource.com/c/151517
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
6 years agovendor: update x/net/internal/nettest for aix support
Tobias Klauser [Wed, 28 Nov 2018 08:33:19 +0000 (09:33 +0100)]
vendor: update x/net/internal/nettest for aix support

Update golang.org/x/net/internal/nettest to x/net git rev 9b4f9f5ad519
for:

   internal/nettest: add AIX operating system
   https://golang.org/cl/144077

This fixes the build failure of the vendored x/net/internal/nettest on
aix/ppc64.

Additionally this also pulls in:

  all: re-adjust build constraints for JS and NaCl
  https://golang.org/cl/122539

Updates #25893

Change-Id: I9abefc7d4ad158e9e68913362f7f1320321d6f5f
Reviewed-on: https://go-review.googlesource.com/c/151301
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
6 years agodoc: fix formatting for Darwin entry
Ian Lance Taylor [Wed, 28 Nov 2018 15:17:40 +0000 (07:17 -0800)]
doc: fix formatting for Darwin entry

Updates #23011

Change-Id: I38360501c772ddf7cc4bd1b5d7b0225387ead535
Reviewed-on: https://go-review.googlesource.com/c/151361
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
6 years agoplugin: skip building tests on linux/arm64
Alex Brainman [Tue, 27 Nov 2018 09:46:29 +0000 (20:46 +1100)]
plugin: skip building tests on linux/arm64

It appears that linux/arm64

https://build.golang.org/log/6808dbded6aebadf68cb65a0e30e4d1a62cd687b

fails with

/workdir/go/pkg/tool/linux_arm64/link: running gcc failed: exit status 1
/usr/bin/ld.gold: internal error in global, at ../../gold/aarch64.cc:4973
collect2: error: ld returned 1 exit status
FAIL plugin [build failed]

error. So stop building these tests on linux/arm64.

Fixes linux/arm64 build

Change-Id: I41eb3d9659f7967d80136513899a5203bbf03fb1
Reviewed-on: https://go-review.googlesource.com/c/151478
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
6 years agolib/time: update tzdata to 2018g
Tobias Klauser [Tue, 27 Nov 2018 09:47:02 +0000 (10:47 +0100)]
lib/time: update tzdata to 2018g

Now that the tree has been frozen for some time, update the tzdata
database to version 2018g (released 2018-10-26) for Go 1.12.

Updates #22487

Change-Id: I9e82bcdaef28d308643c08c9fd3472e4c14a196e
Reviewed-on: https://go-review.googlesource.com/c/151299
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
6 years agounicode: improve generated comments for categories
Wil Selwood [Mon, 26 Nov 2018 15:11:45 +0000 (15:11 +0000)]
unicode: improve generated comments for categories

The comments on the category range tables in the unicode package are fairly
redundent and require an external source to translate into human readable
category names.

This adds a look up table with the category descriptions and uses it if
available when generating the comments for the range tables.

Fixes #28954

Change-Id: I853e2d270def6492c2c1dd2ad0ec761a74c04e5d
Reviewed-on: https://go-review.googlesource.com/c/151297
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>

6 years agodoc: preannounce dropping macOS 10.10 support
Ian Lance Taylor [Wed, 28 Nov 2018 01:09:58 +0000 (17:09 -0800)]
doc: preannounce dropping macOS 10.10 support

Updates #23011

Change-Id: I0eccea5d08a8758585f183540787b78fb80aa36a
Reviewed-on: https://go-review.googlesource.com/c/151360
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
6 years agonet: use .invalid for an invalid domain name
Ian Lance Taylor [Wed, 28 Nov 2018 01:04:47 +0000 (17:04 -0800)]
net: use .invalid for an invalid domain name

Fixes #25370

Change-Id: I12da0cc17f433ca12c85fb986d65ac9ecb2c3f20
Reviewed-on: https://go-review.googlesource.com/c/151359
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
6 years agocmd: fix symbols addressing for aix/ppc64
Clément Chigot [Fri, 23 Nov 2018 13:20:19 +0000 (14:20 +0100)]
cmd: fix symbols addressing for aix/ppc64

This commit changes the code generated for addressing symbols on AIX
operating system.

On AIX, every symbol accesses must be done via another symbol near the TOC,
named TOC anchor or TOC entry. This TOC anchor is a pointer to the symbol
address.
During Progedit function, when a symbol access is detected, its instructions
are modified to create a load on its TOC anchor and retrieve the symbol.

Change-Id: I00cf8f49c13004bc99fa8af13d549a709320f797
Reviewed-on: https://go-review.googlesource.com/c/151039
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
6 years agocmd/link: improve XCOFF dynamic symbols generation
Clément Chigot [Fri, 23 Nov 2018 12:29:59 +0000 (13:29 +0100)]
cmd/link: improve XCOFF dynamic symbols generation

This commit fixes and improves the generation of dynamic symbols for
XCOFF files.
This mainly adds for every dynamic symbols a new symbol named
s.Extname().

Change-Id: I5b788f076d9a05e5d42f08eb1a74fd3e3efa9a86
Reviewed-on: https://go-review.googlesource.com/c/151038
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
6 years agogo/printer: print parenthesized declarations if len(d.Specs) > 1
David Tolpin [Tue, 27 Nov 2018 00:17:32 +0000 (00:17 +0000)]
go/printer: print parenthesized declarations if len(d.Specs) > 1

Parenthesized declaration must be printed if len(d.Specs) > 1 even if d.Lparen==token.NoPos. This happens if the node tree is created programmatically. Otherwise, all but the first specifications just silently disappear from the output.

Change-Id: I17ab24bb1cd56fe1e611199698535ca60a97f5ea
GitHub-Last-Rev: 2f168dc7ad4a29149685efc70f180987523271e4
GitHub-Pull-Request: golang/go#28533
Reviewed-on: https://go-review.googlesource.com/c/146657
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
6 years agocmd/compile: don't use CMOV ops to compute load addresses
Keith Randall [Mon, 29 Oct 2018 22:14:39 +0000 (15:14 -0700)]
cmd/compile: don't use CMOV ops to compute load addresses

We want to issue loads as soon as possible, especially when they
are going to miss in the cache. Using a conditional move (CMOV) here:

i := ...
if cond {
   i++
}
... = a[i]

means that we have to wait for cond to be computed before the load
is issued. Without a CMOV, if the branch is predicted correctly the
load can be issued in parallel with computing cond.
Even if the branch is predicted incorrectly, maybe the speculative
load is close to the real load, and we get a prefetch for free.
In the worst case, when the prediction is wrong and the address is
way off, we only lose by the time difference between the CMOV
latency (~2 cycles) and the mispredict restart latency (~15 cycles).

We only squash CMOVs that affect load addresses. Results of CMOVs
that are used for other things (store addresses, store values) we
use as before.

Fixes #26306

Change-Id: I82ca14b664bf05e1d45e58de8c4d9c775a127ca1
Reviewed-on: https://go-review.googlesource.com/c/145717
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
6 years agotest: fix nilptr5 for AIX
Clément Chigot [Mon, 26 Nov 2018 15:11:18 +0000 (16:11 +0100)]
test: fix nilptr5 for AIX

This commit fixes a mistake made in CL 144538.
This nilcheck can be removed because OpPPC64LoweredMove will fault if
arg0 is nil, as it's used to store. Further information can be found in
cmd/compile/internal/ssa/nilcheck.go.

Change-Id: Ifec0080c00eb1f94a8c02f8bf60b93308e71b119
Reviewed-on: https://go-review.googlesource.com/c/151298
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
6 years agocmd/link/internal/ld: omit deprecated linker argument for iOS builds
Elias Naur [Tue, 27 Nov 2018 15:07:14 +0000 (16:07 +0100)]
cmd/link/internal/ld: omit deprecated linker argument for iOS builds

After CL 151139 introduced a plugin test, the macOS linker for iOS
outputs:

ld: warning: -flat_namespace is deprecated on iOS

Omit the -flat_namespace flag on iOS; plugins are not supported on
iOS, and unlikely to ever be.

Change-Id: I2d08f8b984efcfd442d572b4a0f3a2c95c551b9f
Reviewed-on: https://go-review.googlesource.com/c/151300
Run-TryBot: Elias Naur <elias.naur@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
6 years agodebug/pe: correct TestImportTableInUnknownSection error message
Alex Brainman [Tue, 27 Nov 2018 09:01:50 +0000 (20:01 +1100)]
debug/pe: correct TestImportTableInUnknownSection error message

TestImportTableInUnknownSection uses kernel32.dll file, but the error
message mentions atmfd.dll. Adjust error message to match the test.

This change should have been part of CL 151137.

Updates #27904

Change-Id: Ifc31a12134b328472191122f8426ab6ed234fbd4
Reviewed-on: https://go-review.googlesource.com/c/151477
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
6 years agocmd/link: do not use _GLOBAL_OFFSET_TABLE_ on windows/386
Alex Brainman [Sat, 24 Nov 2018 07:02:29 +0000 (18:02 +1100)]
cmd/link: do not use _GLOBAL_OFFSET_TABLE_ on windows/386

When building windows/386 executable that imports "plugin" package,
cmd/link adds reference to DLL with blank name. Running

objdump -x a.exe

reports

...
The Import Tables (interpreted .idata section contents)
...
DLL Name:
vma:  Hint/Ord Member-Name Bound-To
25308a     0  _GLOBAL_OFFSET_TABLE_
...

So, obviously, executable cannot run, because Windows complains
that it cannot find DLL when trying to run it.

Stop using _GLOBAL_OFFSET_TABLE_ on windows/386.

Fixes #28789

Change-Id: Idd489eafd998f6e329f40c5d90a2a8965ab1d873
Reviewed-on: https://go-review.googlesource.com/c/151139
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
6 years agocmd/go/internal/imports: resolve symlinks in ScanDir
Bryan C. Mills [Wed, 10 Oct 2018 14:03:27 +0000 (10:03 -0400)]
cmd/go/internal/imports: resolve symlinks in ScanDir

We were using the mode reported by ReadDir to decide whether each
entry is a file, but in the case of symlinks that isn't sufficient: a
symlink could point to either a file or a directory, and if it is a
file we should treat it as such.

Fixes #28107

Change-Id: Icf6e495dce427a7b1124c9cc9f085e40a215c169
Reviewed-on: https://go-review.googlesource.com/c/141097
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
6 years agomath/bits: define Div to panic when y<=hi
Brian Kessler [Wed, 14 Nov 2018 05:51:21 +0000 (22:51 -0700)]
math/bits: define Div to panic when y<=hi

Div panics when y<=hi because either the quotient overflows
the size of the output or division by zero occurs when y==0.
This provides a uniform behavior for all implementations.

Fixes #28316

Change-Id: If23aeb10e0709ee1a60b7d614afc9103d674a980
Reviewed-on: https://go-review.googlesource.com/c/149517
Reviewed-by: Robert Griesemer <gri@golang.org>
6 years agocmd/compile: intrinsify math/bits.Div on amd64
Brian Kessler [Wed, 24 Oct 2018 02:54:56 +0000 (20:54 -0600)]
cmd/compile: intrinsify math/bits.Div on amd64

Note that the intrinsic implementation panics separately for overflow and
divide by zero, which matches the behavior of the pure go implementation.
There is a modest performance improvement after intrinsic implementation.

name     old time/op  new time/op  delta
Div-4    53.0ns ± 1%  47.0ns ± 0%  -11.28%  (p=0.008 n=5+5)
Div32-4  18.4ns ± 0%  18.5ns ± 1%     ~     (p=0.444 n=5+5)
Div64-4  53.3ns ± 0%  47.5ns ± 4%  -10.77%  (p=0.008 n=5+5)

Updates #28273

Change-Id: Ic1688ecc0964acace2e91bf44ef16f5fb6b6bc82
Reviewed-on: https://go-review.googlesource.com/c/144378
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
6 years agomath/bits: panic when y<=hi in Div
Brian Kessler [Wed, 24 Oct 2018 02:20:44 +0000 (20:20 -0600)]
math/bits: panic when y<=hi in Div

Explicitly check for divide-by-zero/overflow and panic with the appropriate
runtime error.  The additional checks have basically no effect on performance
since the branch is easily predicted.

name     old time/op  new time/op  delta
Div-4    53.9ns ± 1%  53.0ns ± 1%  -1.59%  (p=0.016 n=4+5)
Div32-4  17.9ns ± 0%  18.4ns ± 0%  +2.56%  (p=0.008 n=5+5)
Div64-4  53.5ns ± 0%  53.3ns ± 0%    ~     (p=0.095 n=5+5)

Updates #28316

Change-Id: I36297ee9946cbbc57fefb44d1730283b049ecf57
Reviewed-on: https://go-review.googlesource.com/c/144377
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
6 years agocmd/compile: don't convert non-Go-constants to OLITERALs
Keith Randall [Mon, 26 Nov 2018 23:58:03 +0000 (15:58 -0800)]
cmd/compile: don't convert non-Go-constants to OLITERALs

Don't convert values that aren't Go constants, like
uintptr(unsafe.Pointer(nil)), to a literal constant. This avoids
assuming they are constants for things like indexing, array sizes,
case duplication, etc.

Also, nil is an allowed duplicate in switches. CTNILs aren't Go constants.

Fixes #28078
Fixes #28079

Change-Id: I9ab8af47098651ea09ef10481787eae2ae2fb445
Reviewed-on: https://go-review.googlesource.com/c/151320
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

6 years agocmd/link: fix XCOFF sections
Clément Chigot [Fri, 23 Nov 2018 10:17:36 +0000 (11:17 +0100)]
cmd/link: fix XCOFF sections

XCOFF files can't have multiples text or data sections. The name
of each type section must be .text, .data and .bss.

This commit also updates cmd/internal/objfile/xcoff.go to retrieve Go
sections using runtime symbols.

Change-Id: Ib6315f19dad2d154a4531fc6508e7cbd8bc94743
Reviewed-on: https://go-review.googlesource.com/c/151037
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
6 years agoruntime: improve godoc formatting of memclrNoHeapPointers comment
Ian Lance Taylor [Mon, 26 Nov 2018 20:11:34 +0000 (12:11 -0800)]
runtime: improve godoc formatting of memclrNoHeapPointers comment

Fixes #28955

Change-Id: I738ad0c76f7bf8fc504a48cf55d3becd5ed7a9d6
Reviewed-on: https://go-review.googlesource.com/c/151337
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
6 years agocmd/link/internal/ld: remove R_ADDR relocations inside XCOFF text sections
Clément Chigot [Fri, 2 Nov 2018 12:50:59 +0000 (13:50 +0100)]
cmd/link/internal/ld: remove R_ADDR relocations inside XCOFF text sections

On XCOFF, it is forbidden relocation of a DATA pointer to a text
section. It happens when a RODATA symbol needs a DATA symbol's address.
This commit moves every RODATA symbols with a R_ADDR on a data symbol to
.data sections to avoid these relocations.

Change-Id: I7f34d8e0ebdc8352a74e6b40e4c893d8d9419f4d
Reviewed-on: https://go-review.googlesource.com/c/146977
Reviewed-by: Ian Lance Taylor <iant@golang.org>
6 years agocmd/compile: initialize sparse slice literals dynamically
Keith Randall [Mon, 26 Nov 2018 22:33:32 +0000 (14:33 -0800)]
cmd/compile: initialize sparse slice literals dynamically

When a slice composite literal is sparse, initialize it dynamically
instead of statically.

s := []int{5:5, 20:20}

To initialize the backing store for s, use 2 constant writes instead
of copying from a static array with 21 entries.

This CL also fixes pathologies in the compiler when the slice is
*very* sparse.

Fixes #23780

Change-Id: Iae95c6e6f6a0e2994675cbc750d7a4dd6436b13b
Reviewed-on: https://go-review.googlesource.com/c/151319
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

6 years agocmd/compile: don't constant-fold non-Go constants in the frontend
Keith Randall [Mon, 26 Nov 2018 20:59:54 +0000 (12:59 -0800)]
cmd/compile: don't constant-fold non-Go constants in the frontend

Abort evconst if its argument isn't a Go constant. The SSA backend
will do the optimizations in question later. They tend to be weird
cases, like uintptr(unsafe.Pointer(uintptr(1))).

Fix OADDSTR and OCOMPLEX cases in isGoConst.
OADDSTR has its arguments in n.List, not n.Left and n.Right.
OCOMPLEX might have a 2-result function as its arg in List[0]
(in which case it isn't a Go constant).

Fixes #24760

Change-Id: Iab312d994240d99b3f69bfb33a443607e872b01d
Reviewed-on: https://go-review.googlesource.com/c/151338
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

6 years agocmd/compile: remove CLOBBERDEAD experiment
Keith Randall [Mon, 26 Nov 2018 18:28:44 +0000 (10:28 -0800)]
cmd/compile: remove CLOBBERDEAD experiment

This experiment is less effective and less needed since the
introduction of stack objects.

We can't clobber stack objects because we don't know statically
whether they are live or not.

We don't really need this experiment that much any more, as it was
primarily used to test the complicated ambiguously-live logic in the
liveness analysis, which has been removed in favor of stack objects.

It is also ~infeasible to maintain once we have safepoints everywhere.

Fixes #27326

Change-Id: I3bdde480b93dd508d048703055d4586b496176af
Reviewed-on: https://go-review.googlesource.com/c/151317
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
6 years agogo/internal/gccgoimporter: enhance for new export data, fix test issues
Than McIntosh [Fri, 16 Nov 2018 15:11:47 +0000 (10:11 -0500)]
go/internal/gccgoimporter: enhance for new export data, fix test issues

This patch merges in support for reading indexed type export data,
from the gofrontend CL https://golang.org/cl/143022 (which includes
a change in the export data version number from V2 to V3).

Also fixes the key tests to insure that they run both in gccgo builds
and main Go repo builds if "gccgo" is present (prior to this the tests
were not running in either scenario); this required fixing up some of
the expected results.

Fixes #28961.

Change-Id: I644d171f2a46be9160f89dada06ab3c20468bab7
Reviewed-on: https://go-review.googlesource.com/c/149957
Run-TryBot: Than McIntosh <thanm@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
6 years agocmd/compile: allow bodyless function if it is linkname'd
Keith Randall [Mon, 26 Nov 2018 18:48:56 +0000 (10:48 -0800)]
cmd/compile: allow bodyless function if it is linkname'd

In assembly free packages (aka "complete" or "pure go"), allow
bodyless functions if they are linkname'd to something else.

Presumably the thing the function is linkname'd to has a definition.
If not, the linker will complain. And linkname is unsafe, so we expect
users to know what they are doing.

Note this handles only one direction, where the linkname directive
is in the local package. If the linkname directive is in the remote
package, this CL won't help. (See os/signal/sig.s for an example.)

Fixes #23311

Change-Id: I824361b4b582ee05976d94812e5b0e8b0f7a18a6
Reviewed-on: https://go-review.googlesource.com/c/151318
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
6 years agoruntime: windows/arm fix tracebacks printed from sigpanic
Jordan Rhee [Wed, 21 Nov 2018 22:04:29 +0000 (14:04 -0800)]
runtime: windows/arm fix tracebacks printed from sigpanic

The exception handler modifies the stack and continuation context so
it looks like the faulting code calls sigpanic() directly. The call was
not set up correctly on ARM, because it did not handle the link register
correctly. This change handles the link register correctly for ARM.

Updates #28854

Change-Id: I7ccf838adfc05cd968a5edd7d19ebba6a2478360
Reviewed-on: https://go-review.googlesource.com/c/150957
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

6 years agocmd/compile: fix nilcheck for AIX
Clément Chigot [Tue, 16 Oct 2018 13:59:43 +0000 (15:59 +0200)]
cmd/compile: fix nilcheck for AIX

This commit adapts compile tool to create correct nilchecks for AIX.

AIX allows to load a nil pointer. Therefore, the default nilcheck
which issues a load must be replaced by a CMP instruction followed by a
store at 0x0 if the value is nil. The store will trigger a SIGSEGV as on
others OS.

The nilcheck algorithm must be adapted to do not remove nilcheck if it's
only a read. Stores are detected with v.Type.IsMemory().

Tests related to nilptr must be adapted to the previous changements.
nilptr.go cannot be used as it's because the AIX address space starts at
1<<32.

Change-Id: I9f5aaf0b7e185d736a9b119c0ed2fe4e5bd1e7af
Reviewed-on: https://go-review.googlesource.com/c/144538
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
6 years agoruntime: handle 64bits addresses for AIX
Clément Chigot [Mon, 1 Oct 2018 07:58:40 +0000 (09:58 +0200)]
runtime: handle 64bits addresses for AIX

This commit allows the runtime to handle 64bits addresses returned by
mmap syscall on AIX.

Mmap syscall returns addresses on 59bits on AIX. But the Arena
implementation only allows addresses with less than 48 bits.
This commit increases the arena size up to 1<<60 for aix/ppc64.

Update: #25893

Change-Id: Iea72e8a944d10d4f00be915785e33ae82dd6329e
Reviewed-on: https://go-review.googlesource.com/c/138736
Reviewed-by: Austin Clements <austin@google.com>
6 years agofmt: update formatting example for maps
Rob Pike [Mon, 26 Nov 2018 04:58:56 +0000 (15:58 +1100)]
fmt: update formatting example for maps

Now that maps are printed in deterministic order, the map example
can have multiple keys without breaking the build.

Change-Id: Iccec0cd76a3d41c75d8d4eb768ec0ac09ad9f2ad
Reviewed-on: https://go-review.googlesource.com/c/151218
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>

6 years agodoc: improve the interface example in Effective Go
Rob Pike [Mon, 26 Nov 2018 03:51:08 +0000 (14:51 +1100)]
doc: improve the interface example in Effective Go

The String method is n-squared and overwrites its receiver.
Fix both issues, with only a slight loss of clarity.

Fixes #28773

Change-Id: I588f69d4cbd72931b28b984671512834473bd466
Reviewed-on: https://go-review.googlesource.com/c/151217
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
6 years agodebug/pe: use kernel32.dll in TestImportTableInUnknownSection
Alex Brainman [Sat, 24 Nov 2018 05:54:01 +0000 (16:54 +1100)]
debug/pe: use kernel32.dll in TestImportTableInUnknownSection

TestImportTableInUnknownSection was introduced in CL 110555 to
test PE executable with import table located in section other than
".idata". We used atmfd.dll for that purpose, but it seems
atmfd.dll is not present on some systems.

Use kernel32.dll instead. kernel32.dll import table is located in
".rdata" section, so it should do the job. And every Windows
system has kernel32.dll file.

Also make TestImportTableInUnknownSection run on windows-arm,
since windows-arm should also have kernel32.dll file.

Updates #27904

Change-Id: Ie005ee10e46ae0c06e83929d581e89f86c051eea
Reviewed-on: https://go-review.googlesource.com/c/151137
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
6 years agocmd/compile: decompose composite OpArg before decomposeUser
David Chase [Fri, 16 Nov 2018 21:20:28 +0000 (16:20 -0500)]
cmd/compile: decompose composite OpArg before decomposeUser

This makes it easier to track names of function arguments
for debugging purposes.

Change-Id: Ic34856fe0b910005e1c7bc051d769d489a4b158e
Reviewed-on: https://go-review.googlesource.com/c/150098
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
6 years agocmd/compile: make ssa blocks collapsable in ssa.html
Yury Smolsky [Thu, 25 Oct 2018 10:33:09 +0000 (13:33 +0300)]
cmd/compile: make ssa blocks collapsable in ssa.html

This CL adds a button that collapses values list of a block.
Button is displayed for every block with non-empty values.

Change-Id: I4b65af81e25349f38341df487d42698c9d006a00
Reviewed-on: https://go-review.googlesource.com/c/144557
Run-TryBot: Yury Smolsky <yury@smolsky.by>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
6 years agocmd/go: more cross-package references from internal/syscall/unix
Austin Clements [Tue, 13 Nov 2018 23:38:49 +0000 (18:38 -0500)]
cmd/go: more cross-package references from internal/syscall/unix

On some platforms, assembly in internal/syscall/unix references
unexported runtime symbols. Catch these references so the compiler can
generate the necessary ABI wrappers.

Fixes #28769.
Updates #27539.

Change-Id: I118eebfb8b3d907b4c3562198e6afb49854f5827
Reviewed-on: https://go-review.googlesource.com/c/149817
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Clément Chigot <clement.chigot@atos.net>
Reviewed-by: Keith Randall <khr@golang.org>
6 years agocmd/compile: use correct store types in softfloat
Cherry Zhang [Sat, 17 Nov 2018 03:53:04 +0000 (22:53 -0500)]
cmd/compile: use correct store types in softfloat

When using softfloat, floating point ops are rewritten to integer
ops. The types of store ops were not rewritten. This may lower
to floating point stores, which are problematic. This CL fixes
this by rewriting the store types as well.

This fixes test/fixedbugs/issue28688.go on Wasm. Softfloat mode
is not used by default on Wasm, and it is not needed as Wasm spec
supports floating points. But it is nice to have the correct
types.

Change-Id: Ib5e19e19fa9491b15c2f60320f8724cace5cefb5
Reviewed-on: https://go-review.googlesource.com/c/149965
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
6 years agoos: return an error from UserHomeDir to match UserCacheDir
David Heuschmann [Tue, 20 Nov 2018 11:30:14 +0000 (12:30 +0100)]
os: return an error from UserHomeDir to match UserCacheDir

UserHomeDir used to return an empty string if the corresponding
environment variable was not set. Changed it to return an error if the
variable is not set, to have the same signature and behaviour as UserCacheDir.

Fixes #28562

Change-Id: I42c497e8011ecfbbadebe7de1751575273be221c
Reviewed-on: https://go-review.googlesource.com/c/150418
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
6 years agocmd/trace: revert internal/traceparser
Hana Kim [Mon, 19 Nov 2018 17:30:56 +0000 (12:30 -0500)]
cmd/trace: revert internal/traceparser

The performance improvement is not as big as we hoped.
Until the API is feature complete, we postpone the release
and avoid added complexity.

This change was prepared by reverting all the changes affected
src/cmd/trace and src/internal/traceparser packages after
golang.org/cl/137635, and then bringing back MMU computation
APIs (originally in src/internal/traceparser) to the
src/internal/trace package.

Revert "cmd/trace: use new traceparser to parse the raw trace files"
This reverts https://golang.org/cl/145457
  (commit 08816cb8d7ed16b9c804587ff02c1ad1c3af6cd5).

Revert "internal/traceparser: provide parser that uses less space and parses segments of runtime trace files"
This reverts https://golang.org/cl/137635
  (commit daaf361f74c3665bcb364356c5a9dd9f536c78c3).

Change-Id: Ic2a068a7dbaf4053cd9674ca7bde9c58e74385b4
Reviewed-on: https://go-review.googlesource.com/c/150517
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
6 years agoos: prevent RemoveAll to remove "." on Plan 9
David du Colombier [Wed, 21 Nov 2018 23:06:42 +0000 (00:06 +0100)]
os: prevent RemoveAll to remove "." on Plan 9

CL 150497 enabled TestRemoveAllDot on "noat" systems.

However, this test is failing on Plan 9 because the rmdir
system call allows to remove "." on Plan 9.

This change prevents the "noat" implementation of RemoveAll to
remove ".", so it remains consistent with the "at" implementation.

Fixes #28903.

Change-Id: Ifc8fe36bdd8053a4e416f0590663c844c97ce72a
Reviewed-on: https://go-review.googlesource.com/c/150621
Run-TryBot: David du Colombier <0intro@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
6 years agocmd/compile: for non-SSA-typed params, emit simple vars.
David Chase [Tue, 20 Nov 2018 21:33:33 +0000 (16:33 -0500)]
cmd/compile: for non-SSA-typed params, emit simple vars.

This case was missed entirely and caused such params to be
unprintable.  This change gives them stack addresses
for the entire function (which is correct).

Change-Id: Ia4f706450219e48bce65b6395d3d9792df142fb5
Reviewed-on: https://go-review.googlesource.com/c/150657
Run-TryBot: David Chase <drchase@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
6 years agocmd/compile: fix TestFormats by using valid formats
Yury Smolsky [Wed, 21 Nov 2018 17:06:28 +0000 (19:06 +0200)]
cmd/compile: fix TestFormats by using valid formats

CL 142517 has used some formats incorrectly. This change fixes it
by using %v for errors and invoking Block.Kind.String().
Format map stays intact.

Updates #28177

Change-Id: If53b6cc54ba3c1ffc17b005225787e3b546de404
Reviewed-on: https://go-review.googlesource.com/c/150798
Run-TryBot: Yury Smolsky <yury@smolsky.by>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
6 years agoruntime: debug code to catch bad gcWork.puts
Austin Clements [Mon, 19 Nov 2018 15:37:14 +0000 (10:37 -0500)]
runtime: debug code to catch bad gcWork.puts

This adds a debug check to throw immediately if any pointers are added
to the gcWork buffer after the mark completion barrier. The intent is
to catch the source of the cached GC work that occasionally produces
"P has cached GC work at end of mark termination" failures.

The result should be that we get "throwOnGCWork" throws instead of "P
has cached GC work at end of mark termination" throws, but with useful
stack traces.

This should be reverted before the release. I've been unable to
reproduce this issue locally, but this issue appears fairly regularly
on the builders, so the intent is to catch it on the builders.

This probably slows down the GC slightly.

For #27993.

Change-Id: I5035e14058ad313bfbd3d68c41ec05179147a85c
Reviewed-on: https://go-review.googlesource.com/c/149969
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
6 years agoruntime: improve "P has cached GC work" debug info
Austin Clements [Mon, 19 Nov 2018 15:36:45 +0000 (10:36 -0500)]
runtime: improve "P has cached GC work" debug info

For #27993.

Change-Id: I20127e8a9844c2c488f38e1ab1f8f5a27a5df03e
Reviewed-on: https://go-review.googlesource.com/c/149968
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
6 years agonet/http: fix spelling mistake in a comment
haormj [Wed, 21 Nov 2018 12:18:56 +0000 (12:18 +0000)]
net/http: fix spelling mistake in a comment

Fixes #28904

Change-Id: I8d416c47479a266735a39c926fd2f0f2bb25d57b
GitHub-Last-Rev: 3a7865a5be27937833cf4f65c242c639e51665c4
GitHub-Pull-Request: golang/go#28907
Reviewed-on: https://go-review.googlesource.com/c/150737
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>