aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2 hoursos: use stringslite.TrimSuffixHEADmasterapocelipes
Change-Id: Ie51a1550181c9478455c757fc82a88bc549ad687 GitHub-Last-Rev: 4b6ffd043b0f2acebb8d2477da17a4d1dfe708ed GitHub-Pull-Request: golang/go#67153 Reviewed-on: https://go-review.googlesource.com/c/go/+/583095 Auto-Submit: Ian Lance Taylor <iant@google.com> Commit-Queue: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
2 hoursstrconv: use stringslite.Cloneqiulaidongfeng
Change-Id: Ifa3c022ad5453301573593a3d05e7b1d42b931ff GitHub-Last-Rev: a7468b068b5c7bcaa573042cf9d5c2732c0385f1 GitHub-Pull-Request: golang/go#67167 Reviewed-on: https://go-review.googlesource.com/c/go/+/583215 Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Keith Randall <khr@golang.org> Auto-Submit: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Commit-Queue: Ian Lance Taylor <iant@google.com> Auto-Submit: Keith Randall <khr@golang.org>
2 hourstime: use stringslite.Cloneqiulaidongfeng
Change-Id: I82f0e7c0c0c80a3cc0e4a732a59ae1debb37d8d9 GitHub-Last-Rev: c8a081f5b37e26058dd0278464950e81e045ab95 GitHub-Pull-Request: golang/go#67166 Reviewed-on: https://go-review.googlesource.com/c/go/+/583195 Commit-Queue: Ian Lance Taylor <iant@google.com> Reviewed-by: Keith Randall <khr@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Keith Randall <khr@golang.org> Auto-Submit: Keith Randall <khr@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
2 hoursunique: use stringslite.Cloneqiulaidongfeng
Change-Id: Icb1ba7df1f0414090632e663b6a92b492546070d GitHub-Last-Rev: 5169d2681311d2631d9119aea17114602efcaa24 GitHub-Pull-Request: golang/go#67092 Reviewed-on: https://go-review.googlesource.com/c/go/+/581940 Reviewed-by: Keith Randall <khr@golang.org> Auto-Submit: Keith Randall <khr@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Commit-Queue: Ian Lance Taylor <iant@google.com> Reviewed-by: Keith Randall <khr@google.com>
19 hourssyscall: remove references to SYS_syscall on openbsdJoel Sing
OpenBSD 7.5 no longer has a syscall symbol in libc. This will typically result in external linking failures since the syscall package still has a reference to an undefined `syscall' symbol. Remove these references and return ENOSYS if syscall.Syscall* or syscall.RawSyscall* are used for a system call number that does not currently have an internal remapping. Fixes #63900 Change-Id: Ic757bf8872ad98a92dd5b34cf58312c32fbc9a96 Reviewed-on: https://go-review.googlesource.com/c/go/+/582257 Reviewed-by: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
19 hourssyscall: reroute SYS_IOCTL and SYS_SYSCTL on openbsdJoel Sing
OpenBSD 7.5 no longer supports indirect syscalls. A number of Go packages make use of syscall.Syscall with SYS_IOCTL or SYS_SYSCTL, since neither is well supported by golang.org/x/sys/unix. Reroute calls with either of these system call numbers to the respective libc stub so that they continue to work. Updates #63900 Change-Id: I3323a3fa311ee9227e6220417834253763866881 Reviewed-on: https://go-review.googlesource.com/c/go/+/582256 Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
19 hourscmd/dist,internal/platform: temporarily disable race detector on openbsd/amd64Joel Sing
Unfortunately, LLVM TSAN decided to remove OpenBSD support, which means that the syso files cannot currently be regenerated (see #52090). The race_openbsd.syso contains a reference to the syscall symbol, which has been removed from OpenBSD's libc in 7.5. As such, this means that the race detector no longer works on openbsd/amd64 (at least until LLVM TSAN support is reinstated for OpenBSD). Updates #63900 Change-Id: I3474fc43a94e5197815862b7dc420b71d5e08815 Reviewed-on: https://go-review.googlesource.com/c/go/+/582255 Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Joel Sing <joel@sing.id.au> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
25 hoursstrings: move Clone to stringsliteqiulaidongfeng
Follow-up CL help package like unique use Clone. Change-Id: Ie64adf7e1a331f47c3cfe178c368d72fc72493ff GitHub-Last-Rev: 499476cc4acdf58ecf0fec9f7281bfb90edc7c82 GitHub-Pull-Request: golang/go#67106 Reviewed-on: https://go-review.googlesource.com/c/go/+/581956 Reviewed-by: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com> Auto-Submit: Ian Lance Taylor <iant@golang.org>
29 hourscmd/compile/internal/ssa: on PPC64, try combining CLRLSLDI and SRDconst into ↵Paul E. Murphy
RLWINM This provides a small performance bump to crc64 as measured on ppc64le/power10: name old time/op new time/op delta Crc64/ISO64KB 49.6µs ± 0% 46.6µs ± 0% -6.18% Crc64/ISO4KB 3.16µs ± 0% 2.97µs ± 0% -5.83% Crc64/ISO1KB 840ns ± 0% 794ns ± 0% -5.46% Crc64/ECMA64KB 49.6µs ± 0% 46.5µs ± 0% -6.20% Crc64/Random64KB 53.1µs ± 0% 49.9µs ± 0% -6.04% Crc64/Random16KB 15.9µs ± 1% 15.0µs ± 0% -5.73% Change-Id: I302b5431c7dc46dfd2d211545c483bdcdfe011f1 Cq-Include-Trybots: luci.golang.try:gotip-linux-ppc64_power10,gotip-linux-ppc64_power8,gotip-linux-ppc64le_power8,gotip-linux-ppc64le_power9,gotip-linux-ppc64le_power10 Reviewed-on: https://go-review.googlesource.com/c/go/+/581937 Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com> Reviewed-by: Eli Bendersky <eliben@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
32 hourscmd/go: add flag values to counter for buildmodeMichael Matloob
Usually, when we increment counters for flags, the counter only contains the flag name. For the buildmode flag, we now include the flag value because there's a limited set of values. We can't use CountFlags directly anymore since we have different behavior for buildmode. Change-Id: I956a1a97d62850df3199b5514ad507ea51355c9f Reviewed-on: https://go-review.googlesource.com/c/go/+/582896 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
32 hourscmd/go: remove checks that all counters incremented are in counters.txtMichael Matloob
This change removes cmd/go/testdata/counters.txt. It also removes the code that prepares it and checks that it contains all registered counters as well as counters for all flags and subcommands. It removes the counter registration mechanism, and uses telemetry.NewCounter to create new counters instead. It keeps the tests that check that at least one counter is incremented if the go command is invoked in a script test. Change-Id: Ic6bda5c64e90f0dd7e221968fce0e375e84d6e17 Cq-Include-Trybots: luci.golang.try:gotip-windows-amd64-longtest,gotip-linux-amd64-longtest Reviewed-on: https://go-review.googlesource.com/c/go/+/582715 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
33 hoursinternal/bisect: use f.Function instead of f.Func.Name in stack traceRuss Cox
For inlined frames f.Func is nil and f.Func.Name is an empty string. f.Function is correct all the time. Change-Id: I7c30f80e7176128ae5576b130d2891f884ee47c4 Reviewed-on: https://go-review.googlesource.com/c/go/+/581996 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Russ Cox <rsc@golang.org> Reviewed-by: David Chase <drchase@google.com>
34 hoursstrings: move TrimPrefix and TrimSuffix to stringsliteapocelipes
To help packages use these functions like "os" which using the copied function "stringsTrimSuffix". Change-Id: I223028ed264c7b7e95534b4883223af0988cda68 GitHub-Last-Rev: 2fd8fbf5286e5a4abdb03704d69f02e32d3f1a6b GitHub-Pull-Request: golang/go#67151 Reviewed-on: https://go-review.googlesource.com/c/go/+/583075 Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: qiu laidongfeng2 <2645477756@qq.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com>
34 hoursinternal/sysinfo: use sync.OnceValue for CPUNameTobias Klauser
Change-Id: I0f3ae97f2bd5ff3f533c5bf4570a8cda8b92b16a Reviewed-on: https://go-review.googlesource.com/c/go/+/582836 Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
34 hourshash/maphash: parallel run testqiulaidongfeng
This is a reapplication of CL 564576. This reduces the go test hash/maphash time by more than half. After investigation it was confirmed that the original CL would cause OOM when 32-bit machine. This CL add testenv.ParallelOn64Bit for tests that can be parallel on 64-bit machines, it is not parallel on 32-bit machines, because CL 564995 require the same API. Change-Id: I1b7feaa07716cb3f55db4671653348fabf2396b0 GitHub-Last-Rev: 28277255587f6a1b92b9bf1848e1f53adaca64dc GitHub-Pull-Request: golang/go#66359 Cq-Include-Trybots: luci.golang.try:gotip-linux-386-longtest Reviewed-on: https://go-review.googlesource.com/c/go/+/572195 Reviewed-by: Keith Randall <khr@google.com> Auto-Submit: Keith Randall <khr@google.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
34 hourscmd/compile/internal/ssa: correct error message for AuxArm64BitFieldzhangjian
Change-Id: I2e1f48c02cb5c6e90a9cb894eb3bc330a4c5c4b5 GitHub-Last-Rev: 303d1f8a13bab67ec53b69b37712a6953163d973 GitHub-Pull-Request: golang/go#67124 Reviewed-on: https://go-review.googlesource.com/c/go/+/582615 Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Jorropo <jorropo.pgm@gmail.com> Reviewed-by: Keith Randall <khr@golang.org> Auto-Submit: Keith Randall <khr@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
38 hoursstrings,bytes: improve Repeat panic messagesgo101
The Repeat("-", maxInt) call should produce panic: runtime error: makeslice: len out of range instead of panic: strings: Repeat output length overflow This PR is only for theory perfection. Change-Id: If67d87b147d666fbbb7238656f2a0cb6cf1dbb5b GitHub-Last-Rev: 29dc0cb9c9c63d8a008960b4527d6aa6798c1c17 GitHub-Pull-Request: golang/go#67068 Reviewed-on: https://go-review.googlesource.com/c/go/+/581936 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
39 hoursruntime,reflect: move zeroVal to internal/abiqiulaidongfeng
Change-Id: I0e19e4aa2ea47a714e27b8d66c23c449e27861f2 GitHub-Last-Rev: 2d59b9589efcf4ade6cfd7c8feffc46bf9ba912c GitHub-Pull-Request: golang/go#67014 Reviewed-on: https://go-review.googlesource.com/c/go/+/581395 Reviewed-by: Keith Randall <khr@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Joedian Reid <joedian@google.com>
48 hourscmd/vendor: update x/tools to v0.20.1-0.20240429173604-74c9cfe4d22fAlan Donovan
The golang.org/x/tools/go/analysis/passes/stdversion was forcibly added by means of an import in a throwaway file not committed. Change-Id: I194012ae354f6f8d2d0c1fa39612e5554a4ab1cf Reviewed-on: https://go-review.googlesource.com/c/go/+/582555 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2 dayscmd/vet: add stdversion analyzerAlan Donovan
+ release note, test Fixes #46136 Change-Id: Ib157c5343dde379f8d6f67bdfa64b3f6a6432bab Reviewed-on: https://go-review.googlesource.com/c/go/+/582556 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Matloob <matloob@golang.org>
2 daysspec: clarify when range expression is evaluatedOlivier Mengué
Clarify that the range expression of a "for" loop is called *just* once to rule out that it might be re-evaluated after each iteration. Change-Id: Iedb61cd29e5238ac0168b8ac01c34d6208cc4312 Reviewed-on: https://go-review.googlesource.com/c/go/+/582775 Reviewed-by: Robert Griesemer <gri@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
2 dayscmd/go: pass -Wl,-z,nodelete for c-shared mode with gccgoIan Lance Taylor
This is the gccgo version of CL 15605. For https://gcc.gnu.org/PR114699 For #11100 For #12582 For #12873 Change-Id: I30e23130737022d772971f0bd629b57269174886 Reviewed-on: https://go-review.googlesource.com/c/go/+/582975 Reviewed-by: Than McIntosh <thanm@google.com> Commit-Queue: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com>
2 daysnet: use stringslite.HasPrefixTobias Klauser
Change-Id: Ib14c70f580d0891b3fbedf9e4cde93077409d4e6 Reviewed-on: https://go-review.googlesource.com/c/go/+/582915 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Damien Neil <dneil@google.com>
2 daysruntime: remove note about goid reuseRuss Cox
Goids are designed to be big enough that they will never be reused: a uint64 is enough to generate a new goroutine every nanosecond for 500+ years before wrapping around, and after 500 years you should probably stop and pick up some security updates. This note was added in CL 70993 and appears to have just been a misunderstanding by the CL author. Change-Id: Ida7099b5191a4e5dbb1e3e9e44b4b86d7779fd6d Reviewed-on: https://go-review.googlesource.com/c/go/+/582895 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Pratt <mpratt@google.com> Auto-Submit: Russ Cox <rsc@golang.org>
2 daystesting: improve the documentation around b.NJorropo
Fixes #67137 - Make it clear the benchmark function is called multiple times. - Demonstrate range over int. Change-Id: I7e993d938b0351012cdd4aed8528951e0ad406ae Reviewed-on: https://go-review.googlesource.com/c/go/+/582835 Auto-Submit: Alan Donovan <adonovan@google.com> Reviewed-by: Alan Donovan <adonovan@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Damien Neil <dneil@google.com>
3 dayscmd/internal/telemetry: add NewStackCounter functionsMichael Matloob
This CL adds a wrapper for the golang.org/x/telemetry/counter.NewStack function so that it can be used by the compiler. Also add build constraints for compiler_bootstrap to build the stubs when we're bootstrapping the compiler. For #58894 Change-Id: Icdbdd7aa6d2a3f1147112739c6939e14414f5ee9 Cq-Include-Trybots: luci.golang.try:gotip-linux-arm64-longtest,gotip-windows-amd64-longtest Reviewed-on: https://go-review.googlesource.com/c/go/+/582695 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
4 dayscmd/pprof: fix exception when file or path contains coloncui fliter
Fixes #63924 Change-Id: I4ea17979faaca04eb6b046abffca2dd77397e0cb Reviewed-on: https://go-review.googlesource.com/c/go/+/539595 Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Run-TryBot: shuang cui <imcusg@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org>
4 daysbytes: fix up godoc link errorsDaniel Martí
[Reader.Reader] does not exist in this package. These docs most likely meant to refer to [Reader] itself. Change-Id: I4fa117e8541573e0be7c13751fdfc102d5f2d604 Reviewed-on: https://go-review.googlesource.com/c/go/+/582515 Reviewed-by: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
4 daysnet/http: represent multi wildcards properlyJonathan Amsterdam
The routing tree used for matching ServeMux patterns used the key "*" to hold a child node for a multi-segment wildcard. The problem is that "*" is a valid path segment, which confused the matching algorithm: it would fetch the multi wildcard child when looking for the literal child for "*". Eschew clever encodings. Use a separate field in the node to represent the multi wildcard child. Fixes #67067. Change-Id: I300ca08b8628f5367626cf41979f6c238ed8c831 Reviewed-on: https://go-review.googlesource.com/c/go/+/582115 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Damien Neil <dneil@google.com>
4 daysos: use filepathlite.FromSlashqmuntal
Change-Id: Id15ebd9e97a8626e64665f6830a662e62432a619 Reviewed-on: https://go-review.googlesource.com/c/go/+/582500 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
4 daysos: use filepathlite.VolumeNameqmuntal
It is better to have a single implementation of VolumeName, which is quite tricky to get right on Windows. Change-Id: Ibba82dd71fe10b594cb6f782582430aa422e7078 Reviewed-on: https://go-review.googlesource.com/c/go/+/582499 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Damien Neil <dneil@google.com> Run-TryBot: Quim Muntal <quimmuntal@gmail.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
4 daysos: use filepathlite.IsAbsqmuntal
It is better to have a single implementation of IsAbs, which is quite tricky to get right on Windows. Change-Id: I45933b0ceff2920d9eddb61e62aacb2602c3dc8c Reviewed-on: https://go-review.googlesource.com/c/go/+/582498 Run-TryBot: Quim Muntal <quimmuntal@gmail.com> Reviewed-by: Damien Neil <dneil@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
4 daysos: use stringslite.HasPrefixTobias Klauser
Change-Id: I791bdfecc6c94ee9dac592d60d95e97182bf0120 Reviewed-on: https://go-review.googlesource.com/c/go/+/582496 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Damien Neil <dneil@google.com>
4 dayshttp: fix some comments typo in server.goThe Backend Grip
Change-Id: I826412175876a84ab978aba9418be28593484fba GitHub-Last-Rev: d35753c7e027ce4ca1fe63d96985de9e90bf813b GitHub-Pull-Request: golang/go#67112 Reviewed-on: https://go-review.googlesource.com/c/go/+/582435 Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Damien Neil <dneil@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
4 dayssyscall: use stringslite.Has{Prefix,Suffix}Tobias Klauser
Change-Id: I393191b95eeb8e17345ce28cfa1fb54a3ef13951 Reviewed-on: https://go-review.googlesource.com/c/go/+/582237 Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Damien Neil <dneil@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
5 daysos: remove ineffective else branchqmuntal
Change-Id: Ic9cf871d862aec54ab8f491b8bc8d2820aecc875 Reviewed-on: https://go-review.googlesource.com/c/go/+/582497 Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Auto-Submit: Quim Muntal <quimmuntal@gmail.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
6 daysnet: fix lookupHost on Plan 9David du Colombier
CL 532217 added the newDNSError function. However, the implementation was not correct on Plan 9, which lead TestLookupNoSuchHost to fail. This change fixes lookupHost on Plan 9. Fixes #67096. Change-Id: I39271f7d588b19c1b1608f18a24d871460be09cd Reviewed-on: https://go-review.googlesource.com/c/go/+/582236 Reviewed-by: Joedian Reid <joedian@google.com> Run-TryBot: David du Colombier <0intro@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
6 daysslices: reduce code nesting depth for Compact and CompactFuncJes Cok
To make it easier to read. Change-Id: I2fa1eb78d879b9d86b4dc839be7ede37c7c864f4 Reviewed-on: https://go-review.googlesource.com/c/go/+/581976 Auto-Submit: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Joedian Reid <joedian@google.com>
6 daysencoding/json: optimize field sorting with slices and cmpaimuz
Refactor field sorting in typeFields to use slices.SortFunc and cmp.Compare, resulting in performance improvements in cache misses and slight increases in hit latency. Memory allocation and operation counts also reduced significantly for cache misses. goos: darwin goarch: arm64 pkg: encoding/json cpu: Apple M2 Max │ old.txt │ new.txt │ │ sec/op │ sec/op vs base │ TypeFieldsCache/MissTypes1-12 5.068µ ± 2% 5.032µ ± 1% ~ (p=0.055 n=10) TypeFieldsCache/MissTypes10-12 15.22µ ± 2% 14.79µ ± 2% -2.84% (p=0.000 n=10) TypeFieldsCache/MissTypes100-12 98.40µ ± 3% 94.72µ ± 1% -3.73% (p=0.002 n=10) TypeFieldsCache/MissTypes1000-12 860.3µ ± 3% 840.7µ ± 1% ~ (p=0.105 n=10) TypeFieldsCache/MissTypes10000-12 8.092m ± 3% 7.987m ± 4% ~ (p=0.280 n=10) TypeFieldsCache/MissTypes100000-12 80.90m ± 9% 80.62m ± 2% ~ (p=0.631 n=10) TypeFieldsCache/MissTypes1000000-12 1009.5m ± 7% 933.8m ± 7% -7.50% (p=0.011 n=10) TypeFieldsCache/HitTypes1-12 1.554n ± 3% 1.617n ± 3% +4.05% (p=0.004 n=10) TypeFieldsCache/HitTypes10-12 1.575n ± 1% 1.624n ± 6% +3.14% (p=0.000 n=10) TypeFieldsCache/HitTypes100-12 1.566n ± 1% 1.627n ± 5% +3.86% (p=0.000 n=10) TypeFieldsCache/HitTypes1000-12 1.526n ± 4% 1.596n ± 3% +4.55% (p=0.001 n=10) TypeFieldsCache/HitTypes10000-12 1.506n ± 0% 1.573n ± 3% +4.41% (p=0.000 n=10) TypeFieldsCache/HitTypes100000-12 1.480n ± 1% 1.529n ± 7% +3.35% (p=0.001 n=10) TypeFieldsCache/HitTypes1000000-12 1.473n ± 2% 1.468n ± 2% ~ (p=0.739 n=10) geomean 1.371µ 1.374µ +0.25% │ old.txt │ new.txt │ │ B/op │ B/op vs base │ TypeFieldsCache/MissTypes1-12 2.023Ki ± 0% 2.000Ki ± 0% -1.16% (p=0.000 n=10) TypeFieldsCache/MissTypes10-12 10.95Ki ± 0% 10.71Ki ± 0% -2.17% (p=0.000 n=10) TypeFieldsCache/MissTypes100-12 101.91Ki ± 0% 99.53Ki ± 0% -2.34% (p=0.000 n=10) TypeFieldsCache/MissTypes1000-12 1044.3Ki ± 0% 1020.8Ki ± 0% -2.25% (p=0.000 n=10) TypeFieldsCache/MissTypes10000-12 9.957Mi ± 0% 9.730Mi ± 0% -2.29% (p=0.000 n=10) TypeFieldsCache/MissTypes100000-12 97.79Mi ± 0% 95.50Mi ± 0% -2.34% (p=0.000 n=10) TypeFieldsCache/MissTypes1000000-12 1018.4Mi ± 0% 995.5Mi ± 0% -2.25% (p=0.000 n=10) TypeFieldsCache/HitTypes1-12 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ TypeFieldsCache/HitTypes10-12 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ TypeFieldsCache/HitTypes100-12 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ TypeFieldsCache/HitTypes1000-12 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ TypeFieldsCache/HitTypes10000-12 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ TypeFieldsCache/HitTypes100000-12 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ TypeFieldsCache/HitTypes1000000-12 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ geomean ² -1.06% ² ¹ all samples are equal ² summaries must be >0 to compute geomean │ old.txt │ new.txt │ │ allocs/op │ allocs/op vs base │ TypeFieldsCache/MissTypes1-12 46.00 ± 0% 45.00 ± 0% -2.17% (p=0.000 n=10) TypeFieldsCache/MissTypes10-12 215.0 ± 0% 205.0 ± 0% -4.65% (p=0.000 n=10) TypeFieldsCache/MissTypes100-12 1.845k ± 0% 1.745k ± 0% -5.42% (p=0.000 n=10) TypeFieldsCache/MissTypes1000-12 18.08k ± 0% 17.08k ± 0% -5.53% (p=0.000 n=10) TypeFieldsCache/MissTypes10000-12 180.3k ± 0% 170.3k ± 0% -5.55% (p=0.000 n=10) TypeFieldsCache/MissTypes100000-12 1.804M ± 0% 1.704M ± 0% -5.54% (p=0.000 n=10) TypeFieldsCache/MissTypes1000000-12 18.04M ± 0% 17.04M ± 0% -5.54% (p=0.000 n=10) TypeFieldsCache/HitTypes1-12 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ TypeFieldsCache/HitTypes10-12 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ TypeFieldsCache/HitTypes100-12 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ TypeFieldsCache/HitTypes1000-12 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ TypeFieldsCache/HitTypes10000-12 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ TypeFieldsCache/HitTypes100000-12 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ TypeFieldsCache/HitTypes1000000-12 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ geomean ² -2.49% ² ¹ all samples are equal ² summaries must be >0 to compute geomean Change-Id: I62b8f524f5747f4f1b9241a1d849efeef1851049 GitHub-Last-Rev: d16772d4fb44f76e2688e15f1bdfc7db14bb55c6 GitHub-Pull-Request: golang/go#67046 Reviewed-on: https://go-review.googlesource.com/c/go/+/581895 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Joedian Reid <joedian@google.com>
6 daystime: add notes about monotonic time pausedplasmatium
See #66870 Change-Id: I781265355a3dbd0d9538bc9dcafaa83b482ec3f8 GitHub-Last-Rev: 9d92f116b05db5568dd4d5834bace659eaf8cc49 GitHub-Pull-Request: golang/go#66922 Reviewed-on: https://go-review.googlesource.com/c/go/+/580515 Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Joedian Reid <joedian@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
6 daysnet/url: improve URL.String performanceKoya IWAMURA
URL.String performs memory allocation many times, but it can improve performance by allocating memory that it clearly knows it needs. This CL achieves 24.6% speedup, 18.3% memory reduction, and 46.7% fewer memory allocations on existing benchmarks. │ string_old.txt │ string_new2.txt │ │ sec/op │ sec/op vs base │ String-16 3.622µ ± 5% 2.730µ ± 2% -24.63% (p=0.000 n=10) │ string_old.txt │ string_new2.txt │ │ B/op │ B/op vs base │ String-16 1.406Ki ± 0% 1.148Ki ± 0% -18.33% (p=0.000 n=10) │ string_old.txt │ string_new2.txt │ │ allocs/op │ allocs/op vs base │ String-16 60.00 ± 0% 32.00 ± 0% -46.67% (p=0.000 n=10) Change-Id: I70199be952eddc44134945077e52740e8921088f Reviewed-on: https://go-review.googlesource.com/c/go/+/581155 Reviewed-by: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Ian Lance Taylor <iant@golang.org> Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com> Reviewed-by: Joedian Reid <joedian@google.com>
7 daysinternal/runtime/atomic: fix TestAnd64 and TestOr64Egon Elbre
The local variable may not be 64bit aligned, which caused arm tests to fail. Fixes #67077 Change-Id: Ia3ae4abcc90319cb10cd593bdc7994cc6eeb3a28 Reviewed-on: https://go-review.googlesource.com/c/go/+/581916 Reviewed-by: Alex Brainman <alex.brainman@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com>
7 daystesting: use time.Since in highPrecisionTimeEgon Elbre
time.Since has optimizations for measuring monotonic time. For #31160. Change-Id: I0529b9f69b9f008e3414b8e386b6faa64af4a008 Reviewed-on: https://go-review.googlesource.com/c/go/+/582135 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
8 daysmake.bash: avoid ksh bug in nogoenvRuss Cox
ksh handles make.bash surprisingly well and is a smaller supply chain attack surface, so it's reasonable to want to use "ksh make.bash" to build Go. The only place where ksh and bash disagree in running make.bash is an arguable bug in ksh that X=Y foo accidentally changes the real value of X following that command when foo is a shell function. (It correctly preserves the original value of X when foo is a command being invoked.) More specifically, GOROOT=$GOROOT_BOOTSTRAP nogoenv foo incorrectly changes $GOROOT in the rest of the script. CL 580020 suggested using a subshell, but subshells historically have lost "set -e", so we'd have to use (...) || exit 1. Instead of that, this CL refactors nogoenv into bootstrapenv, putting it in charge of changing $GOROOT the same way it changes all the other environment variables. This CL also updates make.rc for parallelism. It does not bother updating make.bat: that part is already a bit different, and attempting to change it is all risk, no reward. Change-Id: I5923a6fb5016a3862363363859365d1cd4f61a1d Reviewed-on: https://go-review.googlesource.com/c/go/+/582076 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Eric Grosse <grosse@gmail.com>
8 dayspath/filepath, internal/filepathlite: move parts of filepath to filepathliteDamien Neil
The path/filepath package needs to depend on the os package to implement Abs, Walk, and other functions. Move the implementation of purely lexical functions from path/filepath into internal/filepathlite, so they can be used by os and other low-level packages. Change-Id: Id211e547d6f1f58c82419695ff2d75cd6cd14a12 Reviewed-on: https://go-review.googlesource.com/c/go/+/566556 Reviewed-by: Behroz Karimpor <behrozkarimpor201@gmail.com> Reviewed-by: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
8 daysall: rename internal/safefilepath to internal/filepathliteDamien Neil
The safefilepath package was originally added to contain the FromFS function. We subsequently added FromFS to path/filepath as Localize. The safefilepath package now exists only to permit the os package to import Localize. Rename safefilepath to filepathlite to better indicate that it's a low-dependency version of filepath. Change-Id: I4c5f9b28e8581f841947b48c5cac9954cd0c9535 Reviewed-on: https://go-review.googlesource.com/c/go/+/581517 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
8 daysstrings, internal/stringslite: lite version of strings packageDamien Neil
To be used by internal/filepathlite, which is to be used by os. There are probably other places where it would be convenient to have strings functions accessible to RUNTIME level packages. Change-Id: Icda59e7a9e26d9e8f3692db0ea4fb7b3dbf570d7 Reviewed-on: https://go-review.googlesource.com/c/go/+/581516 Reviewed-by: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
8 daystesting: use QueryPerformanceCounter on WindowsEgon Elbre
Windows time.Now granularity is around 0.5ms on modern systems, which introduces a significant noise into benchmark results. Instead of relying time.Now use QueryPerformanceCounter, which has significantly better granularity compared to time.Now. │ TimeNow-32 │ HighPrecisionTimeNow-32 │ │ sec/op │ sec/op vs base │ 4.812n ± 0% 30.580n ± 0% +535.43% (p=0.000 n=20) Fixes #31160 Change-Id: Ib2a574d638c9c6762a2524212def02265574e267 Reviewed-on: https://go-review.googlesource.com/c/go/+/557315 Reviewed-by: Quim Muntal <quimmuntal@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Alex Brainman <alex.brainman@gmail.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
8 daysinternal/weak: remove unnecessary conversion, fix typoDmitriy Matrenichev
Remove unnecessary conversion from unsafe.Pointer to unsafe.Pointer. Also fix small typo in weak.Pointer.Strong method documentation. Change-Id: I84791fba244581bd6218c589827a61914f0797b4 GitHub-Last-Rev: 7978d07d5bbd72ca84c9650bf2450d7a269bbb1d GitHub-Pull-Request: golang/go#66977 Reviewed-on: https://go-review.googlesource.com/c/go/+/580936 Reviewed-by: Michael Knyszek <mknyszek@google.com> Commit-Queue: Ian Lance Taylor <iant@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Joedian Reid <joedian@google.com> Auto-Submit: Ian Lance Taylor <iant@golang.org>
8 daysall: make use of sync.Map.ClearJes Cok
Since CL 515015 added sync.Map.Clear method, we can use it to make the code simpler and clearer. Change-Id: I29edc969431b4fd95cd5fd864953a71ca1538dd3 Reviewed-on: https://go-review.googlesource.com/c/go/+/582015 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Ian Lance Taylor <iant@golang.org> Reviewed-by: Joedian Reid <joedian@google.com> Reviewed-by: Damien Neil <dneil@google.com>