In the previous, we will only use the slicing by 8 look up table when
the data size is greater than 16k, but the threshold seems to be too
large. We may lose some performance for the small data size.
In this CL, we change the threshold to 2k, it shows that the performance
is improved greatly when the data size is 2k ~ 16k.
We did some tests for the Random2K ~ Random16K between various
cores(mostly on x86 and arm architecture). Here are the benchmark and
some results:
1. The benchmark for testing:
func BenchmarkRandom(b *testing.B) {
poly := 0x58993511
b.Run("Random256", func(b *testing.B) {
bench(b, uint64(poly), 256)
})
b.Run("Random512", func(b *testing.B) {
bench(b, uint64(poly), 512)
})
b.Run("Random1KB", func(b *testing.B) {
bench(b, uint64(poly), 1<<10)
})
b.Run("Random2KB", func(b *testing.B) {
bench(b, uint64(poly), 2<<10)
})
b.Run("Random4KB", func(b *testing.B) {
bench(b, uint64(poly), 4<<10)
})
b.Run("Random8KB", func(b *testing.B) {
bench(b, uint64(poly), 8<<10)
})
b.Run("Random16KB", func(b *testing.B) {
bench(b, uint64(poly), 16<<10)
})
}
2. Some results:
Apple silicon M1:
Benchmark old new delta
Random/Random2KB-10 362MB/s 801MB/s +121.41%
Random/Random4KB-10 360MB/s 1083MB/s +200.93%
Random/Random8KB-10 359MB/s 1309MB/s +264.88%
Random/Random16KB-10 358MB/s 1466MB/s +309.79%
Neoverse N1:
Benchmark old new delta
Random/Random2KB-160 397MB/s 493MB/s +24.23%
Random/Random4KB-160 397MB/s 742MB/s +86.86%
Random/Random8KB-160 398MB/s 995MB/s +150.12%
Random/Random16KB-160 398MB/s 1196MB/s +200.58%
Silver 4116:
Benchmark old new delta
Random/Random2KB-48 252MB/s 418MB/s +65.79%
Random/Random4KB-48 253MB/s 621MB/s +145.72%
Random/Random8KB-48 254MB/s 796MB/s +213.07%
Random/Random16KB-48 258MB/s 929MB/s +260.46%
EPYC 7251:
Benchmark old new delta
Random/Random2KB-32 255MB/s 380MB/s +48.88%
Random/Random4KB-32 255MB/s 561MB/s +119.73%
Random/Random8KB-32 255MB/s 738MB/s +189.18%
Random/Random16KB-32 255MB/s 877MB/s +243.80%
Change-Id: Ib7b4f6826c3edd6f315cac8057d52b6da252a652
Reviewed-on: https://go-review.googlesource.com/c/go/+/445475
Run-TryBot: Eric Fang <eric.fang@arm.com>
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>
The existing implementation uses loops to implement bulk memory
operations such as memcpy and memclr. Now that bulk memory operations
have been standardized and are implemented in all major browsers and
engines (see https://webassembly.org/roadmap/), we should use them
to improve performance.
Updates #28360
Change-Id: I28df0e0350287d5e7e1d1c09a4064ea1054e7575
Reviewed-on: https://go-review.googlesource.com/c/go/+/444935
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Richard Musiol <neelance@gmail.com>
Reviewed-by: David Chase <drchase@google.com>
Auto-Submit: Richard Musiol <neelance@gmail.com>
Reviewed-by: Richard Musiol <neelance@gmail.com>
For #20661.
Change-Id: I1e638cb619e643eadc210d71f92bd1af7bafc912
Reviewed-on: https://go-review.googlesource.com/c/go/+/436955
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: hopehook <hopehook@golangcn.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
The instruction format of MOVBU is the same with MOVB, this CL deletes
MOVBU from optab for simplicity.
Change-Id: Ib034d6c29dd9793cf3e6f9fa8abff0ed0d931d0e
Reviewed-on: https://go-review.googlesource.com/c/go/+/445295
Run-TryBot: Eric Fang <eric.fang@arm.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
The size of gnuVersym should be multiples of 2. If not, the input is
invalid. No Library and Version information is added to sym in this
case. The current implementation of gnuVersion does not report errors
for invalid input.
While at here, bring back the comment that states that the undef entry
at the beginning is skipped. This is not an off-by-one error.
No test case because the problem can only happen for invalid data. Let
the fuzzer find cases like this.
Fixes#56429.
Change-Id: Ia39ad8bd509088a81cc77f7a76e23185d40a5765
GitHub-Last-Rev: 3be0cc1b15
GitHub-Pull-Request: golang/go#56431
Reviewed-on: https://go-review.googlesource.com/c/go/+/445555
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Run-TryBot: Meng Zhuo <mzh@golangcn.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
(Fixing the most important part of this bug.)
Updates #56426
Change-Id: If657ae47a5fe7dacc31d2c487e53e9f2dd5d03bf
Reviewed-on: https://go-review.googlesource.com/c/go/+/445695
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Auto-Submit: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Test2json is parsing the output stream from the test, which includes
package testing's own framing lines intermingled with other output,
in particular any output printed via fmt.Printf, println, and so on.
We have had recurring problems with unexpected partial output lines
causing a framing line to be missed.
A recent talk at GopherCon gave an example of an integration test
involving Docker that happened to print \r-terminated lines instead
of \n-terminated lines in some configurations, which in turn broke
test2json badly. (https://www.gophercon.com/agenda/session/944259)
There are also a variety of open reported issues with similar problems,
which this CL also addresses. The general approach is to add a new
testing flag -test.v=json that means to print additional output to help
test2json. And then test2json takes advantage of that output.
Among the fixes:
- Identify testing framing more reliably, using ^V
(#23036, #26325, #43683, GopherCon talk)
- Test that output with \r\n endings is handled correctly
(#43683, #34286)
- Use === RUN in fuzz tests (#52636, #48132)
- Add === RUN lines to note benchmark starts (#27764, #49505)
- Print subtest --- PASS/FAIL lines as they happen (#29811)
- Add === NAME lines to emit more test change events,
such as when a subtest stops and the parent continues running.
- Fix event shown in overall test failure (#27568)
- Avoid interleaving of writes to os.Stdout and os.Stderr (#33419)
Fixes#23036.
Fixes#26325.
Fixes#27568.
Fixes#27764.
Fixes#29811.
Fixes#33419.
Fixes#34286.
Fixes#43683.
Fixes#49505.
Fixes#52636.
Change-Id: Id4207b746a20693f92e52d68c6e4a7f8c41cc7c6
Reviewed-on: https://go-review.googlesource.com/c/go/+/443596
Auto-Submit: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
When using "MOVD $const, Rx", any 32b constant can be generated in
register quickly. Avoid transforming big uint32 values into a load.
And, fix the instance in runtime.usleep where I discovered this.
Change-Id: I46e156d7edf200f85b5b61162f00223c0ad81fe2
Reviewed-on: https://go-review.googlesource.com/c/go/+/444815
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Paul Murphy <murp@ibm.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
i.e.
from "function %!s(*Node=0xc0003b48c0) cannot have ABI wrappers", to "function xxFunctionName cannot have ABI wrappers".
Change-Id: I83cfdf1916e82ab1455db8032153d9cdae85250d
GitHub-Last-Rev: 87b077653f
GitHub-Pull-Request: golang/go#56428
Reviewed-on: https://go-review.googlesource.com/c/go/+/445516
Auto-Submit: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
flag.Example() has this comment:
... one must execute, typically at the start of main (not init!):
flag.Parse()
We don't run it here because this is not a main function
This example function will be renamed to "main" at pkg.go.dev, which
makes the comment confusing.
See https://pkg.go.dev/flag#example-package.
This change modify the comment to clarify this situation.
Change-Id: I17357fdaaefe54791fff8fbbf6a33003af207f88
GitHub-Last-Rev: eeea8ce39c
GitHub-Pull-Request: golang/go#56411
Reviewed-on: https://go-review.googlesource.com/c/go/+/445315
Run-TryBot: Ian Lance Taylor <iant@google.com>
Run-TryBot: Rob Pike <r@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Rob Pike <r@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
This allows programs that want SHA1 support to call os.Setenv at startup
instead of insisting that users set the environment variable themselves.
For #41682.
Fixes#56436.
Change-Id: Idcb96212a1d8c560e1dd8eaf7c80b6266f16431e
Reviewed-on: https://go-review.googlesource.com/c/go/+/445496
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
As of CL 443058, rand.Seed is not necessary to call,
nor is it a particular good idea.
For #54880.
Change-Id: If9d70763622c09008599db8c97a90fcbe285c6f8
Reviewed-on: https://go-review.googlesource.com/c/go/+/445395
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
The Cancel and WaitDelay fields recently added to exec.Cmd are
intended to support exactly the sort of cancellation behavior that we
need for script tests. Use them, and simplify the cmd/go tests
accordingly.
The more robust implementation may also help to diagose recurring test
hangs (#50187).
For #50187.
Updates #27494.
Change-Id: I7817fca0dd9a18e18984a252d3116f6a5275a401
Reviewed-on: https://go-review.googlesource.com/c/go/+/445357
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
To pick up CL 443575.
Note: This CL also update other x repositories because CL 444536 updates
x/tools dependencies to latest tagged version.
Done by
go get -d golang.org/x/tools@8166dca1cec9
go mod tidy
go mod vendor
Change-Id: Ie2836bb4ebc1db0150ba240af4e2b750dbf1e0b4
Reviewed-on: https://go-review.googlesource.com/c/go/+/445055
Run-TryBot: Wayne Zuo <wdvxdr@golangcn.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Add the experimental compiler flag -altcomparable. If set, the
compiler uses alternative comparable semantics: any ordinary
(non-type parameter) interface implements the comparable
constraint.
This permits experimenting with this alternative semantics
akin to what is proposed in #52509.
For #52509.
Change-Id: I64192eee6f2a550eeb50de011079f2f0b994cf94
Reviewed-on: https://go-review.googlesource.com/c/go/+/444636
Run-TryBot: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
This avoids allocating an overly large slice for corrupt input.
No test case because the problem can only happen for invalid data. Let
the fuzzer find cases like this.
Updates #33121.
Change-Id: Ie2d947a3865d3499034286f2d08d3e3204015f3e
GitHub-Last-Rev: 6c62fc3cec
GitHub-Pull-Request: golang/go#56405
Reviewed-on: https://go-review.googlesource.com/c/go/+/445076
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Implement proposal #54880, to automatically seed the global source.
The justification for this not being a breaking change is that any
use of the global source in a package's init function or exported API
clearly must be valid - that is, if a package changes how much
randomness it consumes at init time or in an exported API, that
clearly isn't the kind of breaking change that requires issuing a v2
of that package. That kind of per-package change in the position
of the global source is indistinguishable from seeding the global
source differently. So if the per-package change is valid, so is auto-seeding.
And then, of course, auto-seeding means that packages will be
far less likely to depend on the specific results of the global source
and therefore not break when those kinds of per-package changes
happen in the future.
Seed(1) can be called in programs that need the old sequence from
the global source and want to restore the old behavior.
Of course, those programs will still be broken by the per-package
changes just described, and it would be better for them to allocate
local sources rather than continue to use the global one.
Fixes#54880.
Change-Id: Ib9dc3307b97f7a45587a9cc50d81f919d3edc7ae
Reviewed-on: https://go-review.googlesource.com/c/go/+/443058
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
The scripts added in CL 421455 passed on the TryBots, but failed on
the "-stretch" builders, which supply Mercurial 4.0
(released 2016-11-01).
Debian 9 “Stretch” has been at end-of-life since June 30, 2022, but
until we can turn down the outdated builders (#56414) we should keep
them passing tests.
For #27494.
Updates #56414.
Change-Id: I9df0ed452dfbfaeb1b4c0d869d02dd9ed21b3ff6
Reviewed-on: https://go-review.googlesource.com/c/go/+/445356
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
GOFLAGS didn't split on quotes because no other env vars
(such as CC, CXX, ...) did either. This kept them all consistent.
CL 341936 changed everything but GOFLAGS, making them inconsistent.
Split GOFLAGS the same way as the other environment variables.
Fixes#26849.
Change-Id: I99bb450fe30cab949da48af133b6a36ff320532f
Reviewed-on: https://go-review.googlesource.com/c/go/+/443956
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
The scripts added in CL 421455 passed on the TryBots, but failed on a
subset of the builders that have older 'git' binaries installed.
Notably, the older versions of git do not support:
- 'git branch -m' before the current branch has a commit
- 'init.defaultBranch' in the '.gitconfig' file, and
- 'git branch -c'.
We address those by, respectively:
- waiting to run 'git branch -m' until after the first commit
- always running 'git branch -m' explicitly to set the branch name, and
- using 'git checkout' instead of 'git branch -c' to set branch parents.
Updates #27494.
Change-Id: I42f012f5add8f31e41d077d752d8268aacbce8a4
Reviewed-on: https://go-review.googlesource.com/c/go/+/445355
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
This avoids a lot of stacking.
Change-Id: If5c5cf33335ffdcb7eecbd3f2db7858a415d817d
Reviewed-on: https://go-review.googlesource.com/c/go/+/443736
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Paul Murphy <murp@ibm.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
With this change applied, 'go test cmd/go/...' passes
even with the IP routing for vcs-test.golang.org disabled
using 'ip route add blackhole $VCSTEST_IP/32'.
Fixes#27494.
Change-Id: I45651d2429c7fea7bbf693b2f129e260e1c59891
Reviewed-on: https://go-review.googlesource.com/c/go/+/427914
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
After this CL, the only test requests that should still reach
vcs-test.golang.org are for Subversion repos, which are not yet handled.
The interceptor implementation should also allow us to redirect other
servers (such as gopkg.in) fairly easily in a followup change if
desired.
For #27494.
Change-Id: I8cb85f3a7edbbf0492662ff5cfa779fb9b407136
Reviewed-on: https://go-review.googlesource.com/c/go/+/427254
Auto-Submit: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
The new server reconstructs the vcs-test repos on the fly using
scripts that run the actual version-control binaries.
This allows those repos to be code-reviewed using our normal tools —
and, crucially, allows contributors to add new vcs-test contents
as part of a contributed CL.
It also prevents failures due to network errors reaching
vcs-test.golang.org (such as when developing offline), and allows us
to iterate on the repo contents without dealing with annoying and
unpredictable GCS caching behavior.
We can't quite turn down vcs-test.golang.org yet — this server doesn't
yet handle "go-import" metadata (and related authentication behaviors),
and doesn't serve Subversion repos.
But we're getting much closer!
For #27494.
Change-Id: I233fc718617aed287b0f7248bd8cfe1e5cebe96b
Reviewed-on: https://go-review.googlesource.com/c/go/+/421455
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
This fixes a regression introduced in CL 419875
that causes features that require cgo to be tested
on the nocgo builders.
For #27494.
Change-Id: Iee61225c98c1275810256ab002a698fc4b42c053
Reviewed-on: https://go-review.googlesource.com/c/go/+/445235
Auto-Submit: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
This allows the "reuse_git" test to avoid depending on exact JSON
blobs, which will be important when the URLs start referring to
test-local vcweb servers.
For #27494.
Change-Id: I22fde5110b3267b8fb9fb9c59fabc3b8a8b492c8
Reviewed-on: https://go-review.googlesource.com/c/go/+/427094
Reviewed-by: Russ Cox <rsc@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
This replaces a large set of individual GOOS and GOARCH conditions
with a smaller set of more verbose conditions. On balance, the more
uniform structure and more concise documentation seem worth the
verbosity.
For #27494.
Change-Id: I73fdf9e7180a92cb1baf5d4631aeecb26ce15181
Reviewed-on: https://go-review.googlesource.com/c/go/+/420054
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
This makes it more obvious that the condition is testing for something
beyond just the existence of a 'git' executable.
For #27494.
Change-Id: I7608b6c84f9f373292687b3a2066b0ded7deb6e1
Reviewed-on: https://go-review.googlesource.com/c/go/+/421454
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Previously, the script engine implicitly escaped the path in the
$WORK environment variable to be the literal string '$WORK', which
produces somewhat better error messages in case of failure.
However, for a general-purpose script engine that implicit behavior is
surprising, and it isn't really necessary.
For #27494.
Change-Id: Ic1d5b8801bbd068157315685539e7cc2795b3aa5
Reviewed-on: https://go-review.googlesource.com/c/go/+/426854
Reviewed-by: Russ Cox <rsc@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
This change decouples the script engine from both cmd/go and the
testing package; I intend to reuse it in the replacement for the
vcs-test.golang.org server.
This change also adds a few new script commands:
- 'echo' echoes its arguments, useful for verifying argument expansion.
- 'cat' prints the contents of files, useful for debugging failing script tests.
- 'help' displays information about script commands and conditions,
reducing the toil of maintaining lists in the README file.
The 'cmp' and 'cmpenv' commands now use internal/diff instead of their
own separate diff implementation.
The 'env' command now writes to the script log instead of the stdout
buffer. (This makes it more consistent with the behavior of other
synchronous builtins.)
The 'stale' command no longer logs output when a target is
unexpectedly non-stale. (However, the ouput of the 'stale' command is
not usually very useful anyway.)
The 'grep', 'stdout', and 'stderr' commands now display matching lines
(like Unix 'grep'), making their negation behavior more consistent
with running real commands on a command-line.
Likewise, the 'cmp' command now always displays differences. That
makes it useful with the '?' prefix to produce diffs for informational
purposes while debugging.
For #27494.
Change-Id: If49fd81d9b922d07c20618a8e2cef908191f9ef6
Reviewed-on: https://go-review.googlesource.com/c/go/+/419875
Reviewed-by: Russ Cox <rsc@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
The commit f841722853 needed an update for c0f27eb3d5. This
fixes the aforementioned commit.
Also, regenerate the lowering rules.
Change-Id: I2073d2e86af212dfe58bc832a1c04a8ef2a57621
Reviewed-on: https://go-review.googlesource.com/c/go/+/445155
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Paul Murphy <murp@ibm.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
The appendInt function previously performed a double pass
over the formatted integer. We can avoid the second pass
if we knew the exact length of formatted integer,
allowing us to directly serialize into the output buffer.
Rename formatNano to appendNano to be consistent with
other append-like functionality.
Performance:
name old time/op new time/op delta
FormatRFC3339Nano 109ns ± 1% 72ns ± 1% -34.06% (p=0.000 n=10+10)
Change-Id: Id48f77eb4976fb1dcd6e27fb6a02d29cbf0c026a
Reviewed-on: https://go-review.googlesource.com/c/go/+/444278
Run-TryBot: Joseph Tsai <joetsai@digital-static.net>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: David Chase <drchase@google.com>
This allows new rules to be added which would otherwise
greatly overcomplicate the generic rules, like CC opcode
conversion or zero register simplification.
Change-Id: I1533f0fa07815aff99ed8ab890077bd22a3bfbf5
Reviewed-on: https://go-review.googlesource.com/c/go/+/442595
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Run-TryBot: Paul Murphy <murp@ibm.com>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Clarify documentation in cases where certificates returned from
various methods are not owned by the caller, and as such should not
be modified.
Change-Id: I06bdc4cf0f686c3d5e8bbb76fc71f2a4bdb955e3
Reviewed-on: https://go-review.googlesource.com/c/go/+/427155
Auto-Submit: Roland Shoemaker <roland@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
This is an experiment to see the impact of a potential spec change:
As an exception to the rule that constraint satisfaction is the same
as interface implementation, if the flag Config.AltComparableSemantics
is set, an ordinary (non-type parameter) interface satisfies the
comparable constraint. (In go/types, the flag is not exported to
avoid changing the API.)
Disabled by default. Test files can set the flag by adding
// -altComparableSemantics
as the first line in the file.
For #52509.
Change-Id: Ib491b086feb5563920eaddefcebdacb2c5b72d61
Reviewed-on: https://go-review.googlesource.com/c/go/+/444635
Reviewed-by: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
The existing implementation fails to convert the remainder
microseconds to nanoseconds. This causes sysmon to consume
much more cpu, and generate lots of context switches.
We can also do a little better here to avoid division by a
constant. I used go to determine the magic numbers.
Fixes#56374
Change-Id: I2e37ec218b9027efab6db4634eed1504c0c1b3c8
Reviewed-on: https://go-review.googlesource.com/c/go/+/444735
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Run-TryBot: Paul Murphy <murp@ibm.com>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
In Go 1.19, we develop register ABI for riscv64, enabled by default as a
GOEXPERIMENT. We can turn it on all the time in Go 1.20.
Change-Id: Ie8e2ac8b8bd3ebddb0dc6d58a5599547fb440e03
Reviewed-on: https://go-review.googlesource.com/c/go/+/443555
Run-TryBot: Wayne Zuo <wdvxdr@golangcn.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
The right-hand side SLLI always contains valid content in the high 32 bits,
so we should use the 64 bit integer type. Using wrong type may lead to wrong
optimizations in cse pass.
Should fix x/text test failures.
Change-Id: I972dd913b8fb238d180bb12f8b1801adc8503fc0
Reviewed-on: https://go-review.googlesource.com/c/go/+/443875
Reviewed-by: Dmitri Goutnik <dgoutnik@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Wayne Zuo <wdvxdr@golangcn.org>
Reviewed-by: David Chase <drchase@google.com>
The gen folder was renamed to _gen in CL 435472, but references in code
and docs were not updated. This updates the references.
Change-Id: Ibadc0cdcb5bed145c3257b58465a8df370487ae5
Reviewed-on: https://go-review.googlesource.com/c/go/+/444355
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Packages in modules don't have a Target set for them, so the current
logic for determining staleness always reports them as stale. Instead it
should be reporting whether "go install" would do anything, and sholud
be false after a go install. If a package does not have a Target,
instead check to see whether we've cached its build artifact.
Change-Id: Ie7bdb234944353f6c2727bd8bf939cc27ddf3f18
Reviewed-on: https://go-review.googlesource.com/c/go/+/444619
Run-TryBot: Michael Matloob <matloob@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>