Add a QUICConn type for use by QUIC implementations.
A QUICConn provides unencrypted handshake bytes and connection
secrets to the QUIC layer, and receives handshake bytes.
For #44886
Change-Id: I859dda4cc6d466a1df2fb863a69d3a2a069110d5
Reviewed-on: https://go-review.googlesource.com/c/go/+/493655
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Run-TryBot: Damien Neil <dneil@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Marten Seemann <martenseemann@gmail.com>
This is a second round of CL 469095 which has been fixed after
the issue discovered in the revert CL 495017.
The issue was a missing res.Body.Close() in the newly added test.
Change-Id: Ifd9d8458022e59f4486397443a2862d06383e990
Reviewed-on: https://go-review.googlesource.com/c/go/+/495115
Reviewed-by: Damien Neil <dneil@google.com>
Run-TryBot: Jorropo <jorropo.pgm@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Follow CL 416775 which added dirFs.ReadFile.
Fixes#53761
Change-Id: Iec19a815ab7c37a3206be141518cc587a588de20
Reviewed-on: https://go-review.googlesource.com/c/go/+/498015
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
I came across similar issue in CL 455275.
Without rooting this, the search domains might affect
the query, so the test might not prove the right thing.
The search domain will cause a change from no data
to NXDOMAIN error.
Change-Id: I59f4de2635f03c69adf29b74e25e4ebd71e7413b
GitHub-Last-Rev: 3a086c74f1
GitHub-Pull-Request: golang/go#60197
Reviewed-on: https://go-review.googlesource.com/c/go/+/494896
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
RSA encryption and verification performs an exponentiation by a value
usually just a few bits long. The current strategy with table
precomputation is not efficient.
Add an ExpShort bigmod method, and use it in RSA public key operations.
After this, almost all CPU time in encryption/verification is spent
preparing the constants for the modulus, because PublicKey doesn't have
a Precompute function.
This speeds up signing a bit too, because it performs a verification to
protect against faults.
name old time/op new time/op delta
DecryptPKCS1v15/2048-4 1.13ms ± 0% 1.13ms ± 0% -0.43% (p=0.000 n=8+9)
DecryptPKCS1v15/3072-4 3.20ms ± 0% 3.15ms ± 0% -1.59% (p=0.000 n=10+8)
DecryptPKCS1v15/4096-4 6.45ms ± 0% 6.42ms ± 0% -0.49% (p=0.000 n=10+10)
EncryptPKCS1v15/2048-4 132µs ± 0% 108µs ± 0% -17.99% (p=0.000 n=10+10)
DecryptOAEP/2048-4 1.13ms ± 0% 1.14ms ± 0% +0.91% (p=0.000 n=10+10)
EncryptOAEP/2048-4 132µs ± 0% 108µs ± 0% -18.09% (p=0.000 n=10+10)
SignPKCS1v15/2048-4 1.18ms ± 0% 1.14ms ± 1% -3.30% (p=0.000 n=10+10)
VerifyPKCS1v15/2048-4 131µs ± 0% 107µs ± 0% -18.30% (p=0.000 n=9+10)
SignPSS/2048-4 1.18ms ± 0% 1.15ms ± 1% -1.87% (p=0.000 n=10+10)
VerifyPSS/2048-4 132µs ± 0% 108µs ± 0% -18.30% (p=0.000 n=10+9)
Updates #57752
Change-Id: Ic89273a58002b32b1c5c3185a35262694ceef409
Reviewed-on: https://go-review.googlesource.com/c/go/+/492935
Run-TryBot: Filippo Valsorda <filippo@golang.org>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Put the sections for the various built-ins into alphabetical order
based on the built-in name, while keeping built-ins that belong
together together.
The order is now (captialized letter determines order):
- Append
- Clear
- Close
- Complex, real, imag
- Delete
- Len, cap
- Make
- Min, max (to be inserted here)
- New
- Panic, recover
- Print, println
There are some white space adjustments but no changes to the prose
of the moved sections.
Change-Id: Iaec509918c6bc965df3f28656374de03279bdc9e
Reviewed-on: https://go-review.googlesource.com/c/go/+/498135
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
When 'go env' without an argument prints environment variables as
a script which can be executed by the shell, variables with a
list value in Plan 9 (such as GOPATH) need to be printed with each
element enclosed in single quotes in case it contains characters
significant to the Plan 9 shell (such as ' ' or '=').
For #58508
Change-Id: Ia30f51307cc6d07a7e3ada6bf9d60bf9951982ff
Reviewed-on: https://go-review.googlesource.com/c/go/+/493535
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
1.3 expects the record version is always 1.2 (0x0303), this previously
wasn't enforced.
Change-Id: I8bc88f588e76f9b862b57601336bb5c5ff08b30e
Reviewed-on: https://go-review.googlesource.com/c/go/+/485876
Reviewed-by: Damien Neil <dneil@google.com>
Auto-Submit: Roland Shoemaker <roland@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
It was no longer used since CL 314609
Change-Id: Id103b7490a6088a589d76442d3740f8a1453c25d
GitHub-Last-Rev: 20a7fe0778
GitHub-Pull-Request: golang/go#56608
Reviewed-on: https://go-review.googlesource.com/c/go/+/448277
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
keysForBenchmarking and valuesForBenchmarking are only used in benchmark
tests.
Change-Id: Ie4fcb81e0470cc8627b395644787429b79952538
Reviewed-on: https://go-review.googlesource.com/c/go/+/497380
Reviewed-by: Keith Randall <khr@google.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Bypass: Ian Lance Taylor <iant@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Add a shortlink in the doc to a guide to writing handlers, which is a work
in progress.
Change-Id: I1b01c90468382ffe53d9ad6f38253906e3f44857
Reviewed-on: https://go-review.googlesource.com/c/go/+/495920
Reviewed-by: Alan Donovan <adonovan@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
The indentation makes the URL be treated as a code block,
thus preventing automatic detection of this URL.
Avoid using a code block for this.
Change-Id: Ie37ae18ec0969ef2d5a6e3b92b2512dac093dbf6
Reviewed-on: https://go-review.googlesource.com/c/go/+/478015
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Add doc details to Transport mentioning retries only occur if a connection
has been already been used successfully.
Change-Id: I37afbad50b885248e0e6cd5e799ad848bf97c86b
GitHub-Last-Rev: 7c45c32aec
GitHub-Pull-Request: golang/go#51273
Reviewed-on: https://go-review.googlesource.com/c/go/+/386994
Run-TryBot: Damien Neil <dneil@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
CL 497075 refactored NewFile to unconditionally dereference the file
returned by newFile. However, newFile can return nil if passed a
negative FD, which now causes a crash.
Resolve this by moving the invalid check earlier in NewFile, which also
lets us avoid a useless fcntl syscall on a negative FD.
Since we convert to int to check sign, adjust newFile to take an int
rather than uintptr, which cleans up a lot of conversions.
Fixes#60406
Change-Id: I382a74e22f1cc01f7a2dcf1ff4efca6a79c4dd57
Reviewed-on: https://go-review.googlesource.com/c/go/+/497877
Run-TryBot: Michael Pratt <mpratt@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
The actual selection code already worked
(except for the x/mod parser not reading the file),
so all that is necessary is a test.
For the test, move the version check up before
the module line presence check.
For #57001.
Change-Id: Iaa4f9b92d38fcfd99dc1665ec8d3eb0e52007bb4
Reviewed-on: https://go-review.googlesource.com/c/go/+/497555
TryBot-Bypass: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Before this CL, the documentation for Formatter suggested that
implementers of Format(f State, verb rune) could use Fprint(f) or
Sprint(f) to generate output. The Sprint(f) suggestion however is
invalid.
Fix that by simply suggesting Sprint() alongside Fprint(f).
Fixes#60358
Change-Id: I024e996f6360b812968ef2cd5073cb4c223459e3
Reviewed-on: https://go-review.googlesource.com/c/go/+/497379
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Paul Jolly <paul@myitcv.org.uk>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Currently /gc/scan/total:bytes is computed as a separate sum. Compute it
using the same inputs so it's always consistent with the sum of
everything else in /gc/scan/*.
For #56857.
Change-Id: I43d9148a23b1d2eb948ae990193dca1da85df8a3
Reviewed-on: https://go-review.googlesource.com/c/go/+/497880
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Use io.Copy¹ that matches the comment more closely, avoids the
possibility of needing a bigger array, and is slightly shorter.
Its downside is that it takes two w.Write calls instead of one.
¹ Admittedly, it was temping to use io.CopyBuffer since the 'data'
byte slice becomes a viable buffer after its contents are written.
I resisted that temptation for two reasons.
One, it would need the io.Reader returned by dec.Buffered() (currently
a *bytes.Reader) to not implement the io.WriterTo interface for any
chance of making a positive difference. This seems not very likely.
Two, to avoid burdening anyone with determining that io.CopyBuffer
won't panic without 'if len(data) == 0 && data != nil { data = nil }'
because json.Marshal never returns an empty but non-nil byte slice.
Change-Id: I33c53d9d990f6ee79cd3ab90f12e3b575b9ebe72
Reviewed-on: https://go-review.googlesource.com/c/go/+/497736
Reviewed-by: Austin Clements <austin@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Bypass: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
In contrast to the HasSuffix argument, there's no need or benefit in
having a ":" before the "racebench" variant mentioned in the message.
(The variant comes after the colon separator—it doesn't include it.)
Change-Id: Ie9948104de9449422037bf39245944255b98f1b5
Reviewed-on: https://go-review.googlesource.com/c/go/+/497735
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
This reverts CL 494057.
Reason for revert: test is failing on -race builders.
Fixes#60393.
Change-Id: If98238a12673aec597cf69aeead7bdf4782b4524
Reviewed-on: https://go-review.googlesource.com/c/go/+/497996
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
build_pgo.txt hard-coded a check for / rather than using ${/}, causing a
failure on Windows
The failure in build_pgo_auto_multi.txt is more interesting. If the
first argument to stdout starts with `-` the script engine expects it to
be a flag to grep, and thus doesn't regexp-escape `\` in the expansion
of `${/}`.
The script engine doesn't _require_ that these are flags to grep, so it
is still possible to use them for matching, but this ideally will change
in the future, so change all patterns to avoid starting with `-`.
Fixes#60408.
Change-Id: Ie4041a730d22ce40a4436abae7713f211dcb42e4
Reviewed-on: https://go-review.googlesource.com/c/go/+/497881
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
This reverts commit e7a9ca0a53.
Reason for revert: Decided to delay to Go 1.22.
Change-Id: I4635cb4c1372b54cac573041be8a43e294de5183
Reviewed-on: https://go-review.googlesource.com/c/go/+/497975
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Robert Griesemer <gri@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
In theory by allocating new objects every time, the benchmark is
including the performance of allocating new pinner bits for a span. In
practice however, most of the time each span already does have pinner
bits allocated (it's still a rare operation).
We can get a better sense of the raw cost of pinning an object (minus
pinner bits allocation) by moving the object allocation out of the inner
loop.
Change-Id: I2869fa6c3f353b726fe8440d2e6b7f89902f9364
Reviewed-on: https://go-review.googlesource.com/c/go/+/497620
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Austin Clements <austin@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
Name constraints are checked during path building. When a new
certificate is considered for inclusion in a chain we check if it has
name constraints, and if it does, check that they apply to the certs
already in the chain, discarding it if the current chain violates any
of the constraints the candidate introduces.
This check was not acting as intended in two ways. The first was that
we only checked that the constraints on the candidate certificate
applied to the leaf certificate, and not the rest of the certiifcates in
the chain. This was the intended behavior pre-1.19, but in 1.19 we
intended for the constraints to be applied to the entire chain (although
obviously they were not).
The second was that we checked that the candidates constraints applied
to the candidate itself. This is not conformant with RFC 5280, which
says that during path building the constraint should only be applied to
the certificates which follow the certificate which introduces the
constraint (e.g. in the chain A -> B -> C, if certificate Bcontains a
name constraint, the constraint should only apply to certificate C).
The intended behavior introduced in 1.19 was mainly intended to reject
dubious chains which the WebPKI disallows, and are relatively rare, but
don't have significant security impact. Since the constraints were
properly applied to the leaf certificate, there should be no real impact
to the majority of users.
Fixes#59171
Change-Id: Ie6def55b8ab7f14d6ed2c09351f664e148a4160d
Reviewed-on: https://go-review.googlesource.com/c/go/+/478216
Reviewed-by: Damien Neil <dneil@google.com>
Auto-Submit: Roland Shoemaker <roland@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Use the os.ReadFile implementation to handle
sysfs files not reporting size properly via stat.
Fixes#53761
Change-Id: I6f34515e8a211e3659f4f6c3598fae7ec0c86975
Reviewed-on: https://go-review.googlesource.com/c/go/+/416775
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Rob Pike <r@golang.org>
Reviewed-by: hopehook <hopehook@golangcn.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
RISC-V modified the address of github and the suffix of the file.
The previous link is no longer accessible. use latest link.
Change-Id: I5e33ea8447a59b8183658248df05c79ddd380cba
Reviewed-on: https://go-review.googlesource.com/c/go/+/497378
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: shuang cui <imcusg@gmail.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
This test is fundamentally flaky because of a mismatch between how
internal idle time is calculated and how the test expects it to be
calculated. It's unclear how to resolve this mismatch, given that it's
perfectly valid for a goroutine to remain asleep while background
goroutines (e.g. the scavenger) run. In practice, we might be able to
set some generous lower-bound, but until we can confirm that on the
affected platforms, skip the test as flaky unconditionally.
For #60276.
For #60376.
Change-Id: Iffd5c4be10cf8ae8a6c285b61fcc9173235fbb2a
Reviewed-on: https://go-review.googlesource.com/c/go/+/497876
Run-TryBot: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
setPGOProfilePath sets Package.Internal.PGOProfile very late in package
loading (because it may split/copy packages). Build info was computed
long before this, causing PGO packages to miss -pgo from their build
settings.
Adjust BuildInfo to be stored as *debug.BuildInfo rather than eagerly
converting to a string. This enables setPGOProfilePath to update the
BuildInfo at the same point that it sets PGOProfile.
Change-Id: Ic12266309bfd0f8ec440b0dc94d4df813b27cb04
Reviewed-on: https://go-review.googlesource.com/c/go/+/496958
Run-TryBot: Michael Pratt <mpratt@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Michael Pratt <mpratt@google.com>
name old time/op new time/op delta
Values-10 8.67ms ± 0% 7.19ms ± 2% -17.05% (p=0.000 n=9+10)
name old alloc/op new alloc/op delta
Values-10 58.2kB ± 2% 48.3kB ± 2% -17.14% (p=0.000 n=9+10)
name old allocs/op new allocs/op delta
Values-10 0.00 0.00 ~ (all equal)
Change-Id: Idd35ea37514a21d97bdd6191c8fb8a478c00e414
Reviewed-on: https://go-review.googlesource.com/c/go/+/481436
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: xie cui <523516579@qq.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>
Before this CL the code would record the number of race detector
errors seen before starting a test, and then report an error
if there were more race detector errors after the test completed.
That approach did not work well for subtests or parallel tests.
Race detector errors could be reported multiple times at each
level of subtest, and parallel tests could accidentally drop
race detector errors.
Instead, report each race detector error at most once, associated
with whatever test noticed the new error. This is still imperfect,
as it may report race detector errors for the wrong parallel test.
But it shouldn't drop any errors entirely, and it shouldn't report
any errors more than once.
Fixes#60083
Change-Id: Ic9afea5c692b6553896757766f631cd0e86192ad
Reviewed-on: https://go-review.googlesource.com/c/go/+/494057
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
sql.RawBytes was added the very first Go release, Go 1. Its docs
say:
> RawBytes is a byte slice that holds a reference to memory owned by
> the database itself. After a Scan into a RawBytes, the slice is only
> valid until the next call to Next, Scan, or Close.
That "only valid until the next call" bit was true at the time,
until contexts were added to database/sql in Go 1.8.
In the past ~dozen releases it's been unsafe to use QueryContext with
a context that might become Done to get an *sql.Rows that's scanning
into a RawBytes. The Scan can succeed, but then while the caller's
reading the memory, a database/sql-managed goroutine can see the
context becoming done and call Close on the database/sql/driver and
make the caller's view of the RawBytes memory no longer valid,
introducing races, crashes, or database corruption. See #60304
and #53970 for details.
This change does the minimal surgery on database/sql to make it safe
again: Rows.Scan was already acquiring a mutex to check whether the
rows had been closed, so this change make Rows.Scan notice whether
*RawBytes was used and, if so, doesn't release the mutex on exit
before returning. That mean it's still locked while the user code
operates on the RawBytes memory and the concurrent context-watching
goroutine to close the database still runs, but if it fires, it then
gets blocked on the mutex until the next call to a Rows method (Next,
NextResultSet, Err, Close).
Updates #60304
Updates #53970 (earlier one I'd missed)
Change-Id: Ie41c0c6f32c24887b2f53ec3686c2aab73a1bfff
Reviewed-on: https://go-review.googlesource.com/c/go/+/497675
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
This change adds a generator which creates a Markdown file for each
compiler error code which includes its associated documentation. The
Markdown files will be added to the x/website repository and used
to generate short error links on the Go website.
Change-Id: Ibabc3388d6ecc7f19151f3931554f72561e30b22
Reviewed-on: https://go-review.googlesource.com/c/go/+/495858
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Carlos Amedee <carlos@golang.org>
Run-TryBot: Carlos Amedee <carlos@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
sparse conditional constant propagation can discover optimization opportunities that cannot be found by just combining constant folding and constant propagation and dead code elimination separately.
Updates #59399
Change-Id: Ia954e906480654a6f0cc065d75b5912f96f36b2e
GitHub-Last-Rev: 90fc02db99
GitHub-Pull-Request: golang/go#59575
Reviewed-on: https://go-review.googlesource.com/c/go/+/483875
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
Before this CL, we use GetFrom3&SetFrom3 to get or set a source operand
which not fit into Prog.Reg. Those APIs operate the first element in
Prog.RestArgs without checking the type so they're fragile to break if
we have more than one different type of operands in the slice, which
will be a common case in Arm64.
This CL deprecates & renames some APIs related to Prog.RestArgs to make
those APIs more reasonable and robust than before.
Change-Id: I70d56edc1f23ccfffbcd6df34844e2cef2288432
Reviewed-on: https://go-review.googlesource.com/c/go/+/493355
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Eric Fang <eric.fang@arm.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Eric Fang <eric.fang@arm.com>
With the Garbage collector (GC), we observed a false-sharing between
work.full and work.empty. (referenced most from runtime.gcDrain and
runtime.getempty)
This false-sharing becomes worse and impact performance on multi core
system. On Intel Xeon 8480+ and default GC setting(GC=100), we can
observed top HITM>4% (by perf c2c)caused by it.
After resolveed this false-sharing issue, we can get performance 8%~9.7%
improved. Verify workloads:
DeathStarBench/hotelReservation: 9.7% of RPS improved
https://github.com/delimitrou/DeathStarBench/tree/master/hotelReservation
gRPC-go/benchmark: 8% of RPS improved
https://github.com/grpc/grpc-go/tree/master/benchmark
gRPC-go/benchmark 9 iterations' data with master branch:
master w/ fs opt.
208862.4 246390.9
221680.0 266019.3
223886.9 248789.7
212169.3 257837.8
219922.4 234331.8
197401.7 261627.7
214562.4 255429.7
214328.5 237087.8
229443.2 230591.3
max 229443.2 266019.3 116%
med 214562.4 248789.7 116%
avg 215806.3 248678.5 115%
Change-Id: Ib386de021cd2dbb802a107f487556d848ba9212d
Reviewed-on: https://go-review.googlesource.com/c/go/+/496915
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Run-TryBot: Keith Randall <khr@golang.org>