x/text (gotip) by go commit
Legend: | Passed | Failed | Running | Exception |
internal/poll: don't use stack-allocated WSAMsg parameters
WSAMsg parameters should be passed to Windows as heap pointers instead
of stack pointers. This is because Windows might access the memory
after the syscall returned in case of a non-blocking operation (which
is the common case), and if the WSAMsg is on the stack, the Go
runtime might have moved it around.
Use a sync.Pool to cache WSAMsg structures to avoid a heap allocation
every time a WSAMsg is needed.
Fixes #74933
Cq-Include-Trybots: luci.golang.try:x_net-gotip-windows-amd64
Change-Id: I075e2ceb25cd545224ab3a10d404340faf19fc01
Reviewed-on: https://go-review.googlesource.com/c/go/+/698797
Reviewed-by: Damien Neil <[email protected]>
Reviewed-by: Cherry Mui <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
runtime: identify virtual memory layout for riscv64
Identify sv39, sv48 and sv57 based on the system stack address.
The current approach to memory allocation is less than ideal on
RISC-V hardware that is using sv39 mode. On sv39 we currently end
up doing around 85 mmap and 66 munmap, since we are trying to map
an unusable range. With this change we do 22 mmap and 0 munmap at
runtime initialisation.
This will also be necessary to support the race detector on sv39.
Updates #64345
Cq-Include-Trybots: luci.golang.try:gotip-linux-riscv64
Change-Id: I4f8ba6763b5ecfedfad5438e025d633820e8265c
Reviewed-on: https://go-review.googlesource.com/c/go/+/690495
Reviewed-by: Cherry Mui <[email protected]>
Reviewed-by: Meng Zhuo <[email protected]>
Reviewed-by: Jorropo <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
math: use Trunc to implement Modf
By implementing Modf using Trunc, rather than the other way round,
we can get a significant performance improvement on platforms where
Trunc is implemented as an intrinsic.
Trunc is implemented as an intrinsic on ppc64x and arm64 so the assembly
implementations of Modf are no longer needed (the compiler can generate
very similar code that can now potentially be inlined).
GOAMD64=v1
goos: linux
goarch: amd64
pkg: math
cpu: 12th Gen Intel(R) Core(TM) i7-12700T
│ sec/op │ sec/op vs base │
Gamma 4.257n ± 0% 3.890n ± 0% -8.61% (p=0.000 n=10)
Modf 1.6110n ± 0% 0.4243n ± 0% -73.67% (p=0.000 n=10)
geomean 2.619n 1.285n -50.94%
GOAMD64=v2
goos: linux
goarch: amd64
pkg: math
cpu: 12th Gen Intel(R) Core(TM) i7-12700T
│ sec/op │ sec/op vs base │
Gamma 4.100n ± 1% 3.717n ± 0% -9.35% (p=0.000 n=10)
Modf 1.6070n ± 0% 0.2158n ± 1% -86.57% (p=0.000 n=10)
geomean 2.567n 0.8957n -65.11%
Change-Id: I689a560c344cf1d39ef002b540749bacc3179786
Reviewed-on: https://go-review.googlesource.com/c/go/+/694896
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Sean Liao <[email protected]>
Reviewed-by: Cherry Mui <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
math: implement IsInf using Abs
Abs is an intrinsic (or a relatively cheap operation) on most
architectures. Using it in IsInf typically saves a branch when
`sign` is 0 (note the `sign` variable is typically a constant).
This change doesn't make a huge difference on amd64 (these
benchmarks are fairly noisy too) but removing the branch will
allow rewrite rules to detect and optimize infinity checks on
other architectures. For example, riscv64 can check for
infinities with the FCLASSD instruction and s390x can use the
TCDB instruction.
goos: linux
goarch: amd64
pkg: math
cpu: 12th Gen Intel(R) Core(TM) i7-12700T
│ sec/op │ sec/op vs base │
Acos 4.317n ± 1% 4.321n ± 0% ~ (p=0.466 n=10)
Acosh 8.857n ± 1% 8.411n ± 2% -5.05% (p=0.001 n=10)
Asin 4.260n ± 1% 4.204n ± 6% -1.31% (p=0.021 n=10)
Asinh 10.63n ± 2% 10.37n ± 0% -2.49% (p=0.000 n=10)
Atan 2.493n ± 1% 2.368n ± 0% -5.01% (p=0.000 n=10)
Atanh 8.820n ± 4% 8.770n ± 2% ~ (p=0.579 n=10)
Atan2 4.212n ± 1% 4.066n ± 11% -3.45% (p=0.023 n=10)
Cbrt 4.859n ± 0% 4.845n ± 0% -0.29% (p=0.000 n=10)
Ceil 0.3877n ± 3% 0.2514n ± 0% -35.17% (p=0.000 n=10)
Copysign 0.3479n ± 2% 0.4179n ± 0% +20.14% (p=0.000 n=10)
Cos 4.734n ± 2% 4.486n ± 0% -5.26% (p=0.000 n=10)
Cosh 5.244n ± 0% 5.071n ± 0% -3.29% (p=0.000 n=10)
Erf 2.975n ± 1% 2.788n ± 0% -6.29% (p=0.000 n=10)
Erfc 3.259n ± 1% 3.121n ± 0% -4.23% (p=0.000 n=10)
Erfinv 4.015n ± 1% 3.904n ± 0% -2.76% (p=0.000 n=10)
Erfcinv 4.166n ± 1% 4.039n ± 0% -3.04% (p=0.000 n=10)
Exp 3.567n ± 1% 3.429n ± 0% -3.87% (p=0.000 n=10)
ExpGo 9.173n ± 1% 8.368n ± 2% -8.78% (p=0.000 n=10)
Expm1 4.466n ± 3% 4.419n ± 0% -1.05% (p=0.000 n=10)
Exp2 8.328n ± 0% 8.046n ± 0% -3.39% (p=0.000 n=10)
Exp2Go 8.796n ± 5% 8.237n ± 2% -6.36% (p=0.000 n=10)
Abs 0.2400n ± 2% 0.2144n ± 0% -10.71% (p=0.000 n=10)
Dim 0.4077n ± 3% 0.3795n ± 1% -6.91% (p=0.000 n=10)
Floor 0.3616n ± 2% 0.2528n ± 3% -30.10% (p=0.000 n=10)
Max 1.401n ± 1% 1.344n ± 1% -4.14% (p=0.000 n=10)
Min 1.391n ± 1% 1.345n ± 1% -3.27% (p=0.000 n=10)
Mod 15.45n ± 1% 15.62n ± 2% ~ (p=0.066 n=10)
Frexp 1.838n ± 2% 1.605n ± 1% -12.70% (p=0.000 n=10)
Gamma 4.465n ± 1% 4.458n ± 1% ~ (p=0.256 n=10)
Hypot 2.237n ± 1% 2.208n ± 0% -1.32% (p=0.000 n=10)
HypotGo 2.610n ± 3% 2.663n ± 5% ~ (p=0.280 n=10)
Ilogb 1.793n ± 1% 1.566n ± 1% -12.66% (p=0.000 n=10)
J0 22.11n ± 1% 21.45n ± 1% -2.99% (p=0.000 n=10)
J1 21.71n ± 1% 21.38n ± 1% -1.54% (p=0.000 n=10)
Jn 46.43n ± 1% 45.83n ± 1% -1.30% (p=0.001 n=10)
Ldexp 2.360n ± 1% 2.111n ± 1% -10.51% (p=0.000 n=10)
Lgamma 4.728n ± 1% 4.850n ± 2% +2.59% (p=0.000 n=10)
Log 4.304n ± 2% 4.228n ± 1% -1.78% (p=0.000 n=10)
Logb 1.833n ± 2% 1.635n ± 2% -10.80% (p=0.000 n=10)
Log1p 5.262n ± 2% 5.173n ± 2% -1.69% (p=0.001 n=10)
Log10 4.534n ± 1% 4.474n ± 1% -1.33% (p=0.024 n=10)
Log2 2.510n ± 2% 2.246n ± 2% -10.48% (p=0.000 n=10)
Modf 1.712n ± 3% 1.700n ± 1% ~ (p=0.055 n=10)
Nextafter32 2.190n ± 3% 2.187n ± 0% ~ (p=0.266 n=10)
Nextafter64 2.184n ± 0% 2.183n ± 0% -0.05% (p=0.017 n=10)
PowInt 11.45n ± 7% 11.32n ± 9% ~ (p=0.137 n=10)
PowFrac 27.46n ± 3% 27.04n ± 1% -1.55% (p=0.001 n=10)
Pow10Pos 0.5367n ± 3% 0.5466n ± 2% +1.84% (p=0.009 n=10)
Pow10Neg 0.8939n ± 1% 0.8720n ± 2% -2.45% (p=0.000 n=10)
Round 1.218n ± 1% 1.198n ± 1% -1.56% (p=0.005 n=10)
RoundToEven 1.711n ± 0% 1.710n ± 0% ~ (p=0.464 n=10)
Remainder 12.87n ± 10% 13.79n ± 14% +7.11% (p=0.027 n=10)
Signbit 0.4072n ± 2% 0.3839n ± 2% -5.71% (p=0.000 n=10)
Sin 4.102n ± 1% 4.058n ± 3% ~ (p=0.138 n=10)
Sincos 5.837n ± 1% 5.715n ± 2% -2.10% (p=0.000 n=10)
Sinh 5.622n ± 1% 5.567n ± 2% -0.96% (p=0.006 n=10)
SqrtIndirect 0.4284n ± 0% 0.4279n ± 0% ~ (p=0.084 n=10)
SqrtLatency 2.779n ± 0% 2.777n ± 0% ~ (p=0.089 n=10)
SqrtIndirectLatency 2.777n ± 0% 2.778n ± 0% ~ (p=0.305 n=10)
SqrtGoLatency 24.00n ± 0% 24.51n ± 0% +2.12% (p=0.000 n=10)
SqrtPrime 673.0n ± 0% 673.0n ± 0% ~ (p=0.574 n=10)
Tan 4.111n ± 4% 4.123n ± 5% ~ (p=0.424 n=10)
Tanh 5.787n ± 1% 5.723n ± 1% -1.11% (p=0.010 n=10)
Trunc 0.3441n ± 3% 0.2596n ± 2% -24.56% (p=0.000 n=10)
Y0 21.63n ± 2% 21.07n ± 2% -2.61% (p=0.001 n=10)
Y1 21.42n ± 1% 20.93n ± 3% -2.29% (p=0.041 n=10)
Yn 45.78n ± 1% 45.83n ± 1% ~ (p=0.671 n=10)
Float64bits 0.2187n ± 2% 0.2199n ± 2% ~ (p=0.138 n=10)
Float64frombits 0.2198n ± 1% 0.2199n ± 1% ~ (p=0.956 n=10)
Float32bits 0.2237n ± 2% 0.2213n ± 1% ~ (p=0.060 n=10)
Float32frombits 0.2251n ± 1% 0.2219n ± 2% -1.42% (p=0.000 n=10)
FMA 0.8557n ± 1% 0.8555n ± 0% ~ (p=0.286 n=10)
geomean 3.186n 3.070n -3.61%
Change-Id: I4814bb1e3d9d20e9d8cd7689e8d5383e36b00331
Reviewed-on: https://go-review.googlesource.com/c/go/+/694955
Reviewed-by: Cherry Mui <[email protected]>
Reviewed-by: Sean Liao <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
math: optimize Signbit implementation slightly
This small tweak to Signbit improves code generation on riscv64 and
possibly other architectures by removing the need to apply a 64 bit
mask.
Before:
MOV $-9223372036854775808, X6
AND X6, X5, X5
SNEZ X5, X10
After:
SLTI $0, X5, X10
This transformation could also be added to the optimization rules
but it is quite a special case.
goos: linux
goarch: riscv64
pkg: math
cpu: Spacemit(R) X60
│ sec/op │ sec/op vs base │
Signbit 13.05n ± 0% 11.42n ± 0% -12.49% (p=0.000 n=10)
Change-Id: Ic218017c5bbb720ec24c6fe7cc230df539b2630c
Reviewed-on: https://go-review.googlesource.com/c/go/+/698419
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Sean Liao <[email protected]>
Reviewed-by: Cherry Mui <[email protected]>
Auto-Submit: Sean Liao <[email protected]>
Reviewed-by: Florian Lehner <[email protected]>
Reviewed-by: Carlos Amedee <[email protected]>
cmd/compile/internal: optimizing add+sll rule using ALSLV instruction on loong64
Reduce the number of go toolchain instructions on loong64 as follows:
file before after Δ %
go 1573148 1571708 -1,440 -0.0915%
gofmt 320578 320090 -488 -0.1522%
asm 555066 554406 -660 -0.1189%
cgo 481566 480926 -640 -0.1329%
compile 2475962 2473880 -2,082 -0.0841%
cover 516536 515920 -616 -0.1193%
link 702172 701404 -768 -0.1094%
preprofile 238626 238274 -352 -0.1475%
vet 792928 792100 -828 -0.1044%
Change-Id: I61e462726835959c60e1b4e5256d4020202418ab
Reviewed-on: https://go-review.googlesource.com/c/go/+/693877
Reviewed-by: Cherry Mui <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: abner chenc <[email protected]>
runtime: skip doInit of plugins in runtime.main
Plugins may be loaded in the user's init code.
If loading fails, md.bad is true, and doInit should not be executed.
If loading succeeds, the plugin must run modulesinit and typelinksinit
before doInit. Here is not protected by pluginsMu, and in concurrent
scenarios it is possible to obtain the moduledata of the plugin that
is still in the loading process.
Any added modules after loop starts will do their own doInit calls.
This fixes the issue introduced by CL 520375.
Fixes #75102
Change-Id: I48e91ae21615a0c54176875a6a2dea8e1dade906
Reviewed-on: https://go-review.googlesource.com/c/go/+/697675
LUCI-TryBot-Result: Go LUCI <[email protected]>
Auto-Submit: Keith Randall <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
Reviewed-by: Cherry Mui <[email protected]>
internal/trace: skip async preempt off tests on low end systems
The OpenBSD armv7 port does not support SMP - on this platform the
trace tests take ~300 seconds to run when async preempt is disabled,
which then times out on the builder. Skip these tests when run in
short mode on a single CPU system.
Change-Id: I9a697d5ba2b20652f76dcc97bd178a4ee8f1a2a0
Reviewed-on: https://go-review.googlesource.com/c/go/+/698555
LUCI-TryBot-Result: Go LUCI <[email protected]>
Auto-Submit: Joel Sing <[email protected]>
Reviewed-by: Cherry Mui <[email protected]>
Reviewed-by: Michael Knyszek <[email protected]>
net: fix cgoResSearch
CL 457439 mistakenly redeclared size inside the for loop, causing
cgoResSearch to always fail and fall back to goLookupCNAME.
Change-Id: I3e142d34287388284a8998ac13761b1e0c2911a5
Reviewed-on: https://go-review.googlesource.com/c/go/+/696895
Reviewed-by: Damien Neil <[email protected]>
Auto-Submit: Damien Neil <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
Reviewed-by: Cherry Mui <[email protected]>
Reviewed-by: Mateusz Poliwczak <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
os: set full name for Roots created with Root.OpenRoot
Set the Name for a Root created within a Root to be the
concatenation of the parent's path and the name used to open the child.
This matches the behavior for files opened within a Root
with Root.Open.
Fixes #73868
Change-Id: Idf4021602ac25556721b7ef6924dec652c7bf4db
Reviewed-on: https://go-review.googlesource.com/c/go/+/698376
Reviewed-by: Alan Donovan <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
internal/poll: use fdMutex to provide read/write locking on Windows
On Windows it is not possible to do concurrent I/O on file handles due
to the way FD.Pread and FD.Pwrite are implemented. This serialization is
achieved by having a dedicated mutex locked in the affected FD methods.
This makes the code difficult to reason about, as there is another
layer of locking introduced by the fdMutex. For example, it is not
obvious that concurrent I/O operations are serialized.
This CL removed the dedicated mutex and uses the fdMutex to provide
read/write locking.
Change-Id: I00389662728ce29428a587c3189bab90a0399215
Reviewed-on: https://go-review.googlesource.com/c/go/+/698096
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Damien Neil <[email protected]>
Reviewed-by: Alex Brainman <[email protected]>
Reviewed-by: Carlos Amedee <[email protected]>
test/codegen: add Mul2 and DivPow2 test for loong64
Change-Id: I29ccd105c5418955146a3f4873162963da489a70
Reviewed-on: https://go-review.googlesource.com/c/go/+/697935
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: abner chenc <[email protected]>
Reviewed-by: David Chase <[email protected]>
Reviewed-by: Carlos Amedee <[email protected]>
test/codegen: add Mul* test for loong64
Change-Id: Ica285212e4884a96fe9738b53cdc789b223bf2e3
Reviewed-on: https://go-review.googlesource.com/c/go/+/697895
Reviewed-by: David Chase <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Carlos Amedee <[email protected]>
Reviewed-by: abner chenc <[email protected]>
test/codegen: add sqrt* abs and copysign test for loong64
Change-Id: I645396fc4b00242f36a06f01550906805c0c1f73
Reviewed-on: https://go-review.googlesource.com/c/go/+/697955
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: David Chase <[email protected]>
Reviewed-by: abner chenc <[email protected]>
Reviewed-by: Carlos Amedee <[email protected]>
net/http/httptest: redirect example.com requests to server
The default server cert used by NewServer already includes example.com
in its DNSNames, and by default, the client's RootCA configuration
means it won't trust a response from the real example.com.
Fixes #31054
Change-Id: I0686977e5ffe2c2f22f3fc09a47ee8ecc44765db
Reviewed-on: https://go-review.googlesource.com/c/go/+/666855
Reviewed-by: Damien Neil <[email protected]>
Reviewed-by: Carlos Amedee <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
internal/syscall/windows: increase internal Windows O_ flags values
The lowercase o_ flags are invented values. These conflict with
constants that will soon be allowed by os.OpenFile, which values will
be mandated by the Windows API. To avoid this overlap, the internal
values have been increased to the 33-63 bit range, as the Windows ones
are in the 0-32 bit range.
Updates #73676
Change-Id: I0f657f3ed3403de150f1730a5a65ae887a18a4e9
Reviewed-on: https://go-review.googlesource.com/c/go/+/697363
Reviewed-by: Damien Neil <[email protected]>
Reviewed-by: Carlos Amedee <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
crypto/tls: fix quic comment typo
Change-Id: Ibd6b8d10ecac3cdea33de1218d516b7425443313
GitHub-Last-Rev: 3d5568ba087be71f21cf816c5edd9b8b8c629865
GitHub-Pull-Request: golang/go#75092
Reviewed-on: https://go-review.googlesource.com/c/go/+/697575
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Carlos Amedee <[email protected]>
Reviewed-by: Daniel McCarney <[email protected]>
Reviewed-by: David Chase <[email protected]>
Reviewed-by: Sean Liao <[email protected]>
Auto-Submit: Sean Liao <[email protected]>
internal/poll: don't pass non-nil WSAMsg.Name with 0 namelen on windows
CL 692436 changed WriteMsgInet{4,6} on windows to pass a zero namelen
when the sockaddr is nil. Turns out Windows also requires name to be
nil when namelen is 0.
With this commit, WriteMsgInet4 and WriteMsgInet6 now nicely align with
WriteMsg.
For #74841
Change-Id: Ifadee2d12d9bce2411f11a0e12b9fa2b3d71990e
Reviewed-on: https://go-review.googlesource.com/c/go/+/698395
Reviewed-by: Damien Neil <[email protected]>
Reviewed-by: Sean Liao <[email protected]>
Auto-Submit: Sean Liao <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Carlos Amedee <[email protected]>
Auto-Submit: Damien Neil <[email protected]>
runtime/metrics: improve doc
Polish a sentence by removing redundant "in response".
Change-Id: I232198ad904333f8eaa0c25a12824f0dcbf3cfb6
GitHub-Last-Rev: 421bfc03874f84a280e09bbd59d0bd074b4c9574
GitHub-Pull-Request: golang/go#72793
Reviewed-on: https://go-review.googlesource.com/c/go/+/656735
Reviewed-by: Carlos Amedee <[email protected]>
Reviewed-by: Sean Liao <[email protected]>
Reviewed-by: Michael Knyszek <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Auto-Submit: Sean Liao <[email protected]>
os: fix Root.MkdirAll to handle race of directory creation
No tests were added, because in order to reproduce, the directory would
have to be created precisely between the rootOpenDir and mkdirat calls,
which is impossible to do in a test.
Fixes #75114
Change-Id: I6f86a5b33c87452c35728318eaf2169a7534ef37
Reviewed-on: https://go-review.googlesource.com/c/go/+/698215
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Sean Liao <[email protected]>
Reviewed-by: Damien Neil <[email protected]>
Reviewed-by: Carlos Amedee <[email protected]>
Auto-Submit: Sean Liao <[email protected]>
all: delete remaining windows/arm code
Fixes #43800
Updates #71671
Change-Id: Ib7aafe3a3f6ae48f23fa23f03103820e9fcf5161
Reviewed-on: https://go-review.googlesource.com/c/go/+/698415
Reviewed-by: Quim Muntal <[email protected]>
Reviewed-by: Cherry Mui <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
Reviewed-by: Filippo Valsorda <[email protected]>
cmd/asm: process forward jump to PCALIGN
The forward jump target are not processed when the target is PCALIGN, so
process it before emit nops for PCALIGN.
Fixes #74648
Change-Id: I690fbfacf79e26d7a37628a2551729b2381616c5
Reviewed-on: https://go-review.googlesource.com/c/go/+/696915
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Carlos Amedee <[email protected]>
Reviewed-by: Cherry Mui <[email protected]>
internal/poll: permit nil destination address in WriteMsg{Inet4,Inet6}
For #74841
Change-Id: If2ea23b1eb23e32680bd576f54a0020d7e115797
Reviewed-on: https://go-review.googlesource.com/c/go/+/692436
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Carlos Amedee <[email protected]>
Reviewed-by: Damien Neil <[email protected]>
runtime: remove remaining windows/arm files and comments
CL 648795 deleted most of windows/arm code, but some files escaped from
the purge.
This CL finishes the job.
For #71671
Change-Id: Id454c40a673a1a2a9f190d79248e6d56104cdd61
Reviewed-on: https://go-review.googlesource.com/c/go/+/698036
Reviewed-by: qiu laidongfeng <[email protected]>
Reviewed-by: Carlos Amedee <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
cmd/compile: use zero register instead of specialized *zero instructions on loong64
Refer to CL 633075, loong64 has a zero(R0) register that can be used to do this.
Change-Id: I846c6bdfcfd6dbfa18338afc13e34e350580ead4
Reviewed-on: https://go-review.googlesource.com/c/go/+/693876
Reviewed-by: Carlos Amedee <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
Auto-Submit: Keith Randall <[email protected]>
cmd/compile: simplify zerorange on loong64
Refer to CL 678936, we also did the same thing on loong64.
Change-Id: I156a9110a034878192f64baf8018115424aa5f0a
Reviewed-on: https://go-review.googlesource.com/c/go/+/697957
Reviewed-by: Carlos Amedee <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
Auto-Submit: Keith Randall <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
cmd/compile/internal/ssa: eliminate unnecessary extension operations
Reduce the number of go toolchain instructions on loong64 as follows:
file before after Δ %
go 1598706 1597230 -1476 -0.0923%
gofmt 325180 324736 -444 -0.1365%
asm 562538 562098 -440 -0.0782%
cgo 488298 487634 -664 -0.1360%
compile 2504502 2503590 -912 -0.0364%
cover 525976 525312 -664 -0.1262%
link 714182 713226 -956 -0.1339%
preprofile 241308 240988 -320 -0.1326%
vet 794112 793316 -796 -0.1002%
Change-Id: I048ef79518b41e83c53da1a3a6b7edaca7cb63f8
Reviewed-on: https://go-review.googlesource.com/c/go/+/693856
Reviewed-by: abner chenc <[email protected]>
Reviewed-by: Carlos Amedee <[email protected]>
Auto-Submit: Keith Randall <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: sophie zhao <[email protected]>
cmd/compile: optimize some patterns into revb2h/revb4h instruction on loong64
Pattern1: (the type of c is uint16)
c>>8 | c<<8
To:
revb2h c
Pattern2: (the type of c is uint32)
(c & 0xff00ff00)>>8 | (c & 0x00ff00ff)<<8
To:
revb2h c
Pattern3: (the type of c is uint64)
(c & 0xff00ff00ff00ff00)>>8 | (c & 0x00ff00ff00ff00ff)<<8
To:
revb4h c
Change-Id: Ic6231a3f476cbacbea4bd00e31193d107cb86cda
Reviewed-on: https://go-review.googlesource.com/c/go/+/696335
Reviewed-by: Meidan Li <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
Auto-Submit: Keith Randall <[email protected]>
Reviewed-by: Carlos Amedee <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
syscall: simplify execve handling on libc platforms
Rather than providing three different execve variables for different
platforms, use a single variable. Provide a small wrapper that handles
conversion to uintptr for the AIX/Solaris case.
Note that this removes special handling for openbsd/mips64, which is
now a dead port.
Updates #61546
Change-Id: I3d6387c31669f64bfb61639536803e595f478647
Reviewed-on: https://go-review.googlesource.com/c/go/+/693880
Reviewed-by: Keith Randall <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Auto-Submit: Keith Randall <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
Reviewed-by: Carlos Amedee <[email protected]>
cmd/compile: deduplication in the source code generated by mknode
Most types in the ir package don't have hidden children, so having
their doChildrenWithHidden and editChildrenWithHidden methods call
their own doChildren and editChildren methods can save a lot of
duplicate code.
Change-Id: Ib22a29d6a9a32855f3c3191ca2d26dff94ac556b
Reviewed-on: https://go-review.googlesource.com/c/go/+/697476
Reviewed-by: Keith Randall <[email protected]>
Auto-Submit: Keith Randall <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
Reviewed-by: Carlos Amedee <[email protected]>
cmd/compile: optimize rule (x + x) << c to x << c+1 on loong64
Change-Id: I782f93510bba92ba60b298c1c1cde456c8bcec38
Reviewed-on: https://go-review.googlesource.com/c/go/+/697956
Reviewed-by: Keith Randall <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
Auto-Submit: Keith Randall <[email protected]>
Reviewed-by: Carlos Amedee <[email protected]>
cmd/internal/objabi,cmd/link: add support for additional riscv64 relocations
These additional relocation types are encountered when using the
Go race detector with riscv64.
Updates #64345
Change-Id: I6de6430165fb378463da1af9402198a3a31485ca
Reviewed-on: https://go-review.googlesource.com/c/go/+/690496
Reviewed-by: Dmitri Shuralyov <[email protected]>
Reviewed-by: Cherry Mui <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Meng Zhuo <[email protected]>
errors: mention Is/As in Join docs
Fixes #74461
Change-Id: Ic1b1b2b43d59dd67f31c2388ca88650ee847ba93
Reviewed-on: https://go-review.googlesource.com/c/go/+/696737
Reviewed-by: David Chase <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Carlos Amedee <[email protected]>
Reviewed-by: Jorropo <[email protected]>
cmd/go/internal/doc: pass URL fragments separately with -http
Plumb URL fragments separately when invoking pkgsite so the `#` doesn't
get %-encoded into the path.
Fixes: #75088
Change-Id: I33814fc6a192dff3e4f3d0b9d81205056dddd438
Reviewed-on: https://go-review.googlesource.com/c/go/+/697435
Reviewed-by: Sean Liao <[email protected]>
Reviewed-by: Ian Alexander <[email protected]>
Reviewed-by: Michael Matloob <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Michael Matloob <[email protected]>
internal/poll: don't call Seek for overlapped Windows handles
Overlapped handles don't have the file pointer updated when performing
I/O operations, so there is no need to call FD.Seek to reset the file
pointer.
Also, some overlapped file handles don't support seeking. See #74951.
Fixes #74951.
Change-Id: I0edd53beed7d3862730f3b2ed5fe9ba490e66c06
Reviewed-on: https://go-review.googlesource.com/c/go/+/697295
Reviewed-by: Damien Neil <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
internal/poll: set the correct file offset in FD.Seek for Windows overlapped handles
Windows doesn't keep the file pointer for overlapped file handles.
To work around this, we keep track of the current offset ourselves
and use it on every Read/Write operation.
When the user calls File.Seek with whence == io.SeekCurrent, it expects
that the offset we keep track of is also accounted for, else the
the seek'ed value won't match the file pointer seen by the user.
Updates #74951.
Fixes #75081.
Change-Id: Ieca7c3779e5349292883ffc293a8474088a4dec7
Reviewed-on: https://go-review.googlesource.com/c/go/+/697275
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Damien Neil <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
runtime: save and restore all fcc registers in async preempt on loong64
Currently, all Op implementations on loong64 use fcc0 by default, so only
fcc0 is saved in CL 475577. However, fcc1-fcc7 may also be used by users
when writing assembly code, such as in CL 693878.
Change-Id: Idb60d8101a0f7d602dfcbbb39bd5da9f2c475bfd
Reviewed-on: https://go-review.googlesource.com/c/go/+/696875
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: David Chase <[email protected]>
Reviewed-by: sophie zhao <[email protected]>
Reviewed-by: Meidan Li <[email protected]>
Reviewed-by: Carlos Amedee <[email protected]>
cmd/go: document install outputs to $GOOS_$GOARCH when cross compiling
Fixes #74979
Change-Id: I2a93e3a78c953418cf62d93db107b9c8d25e8ed2
Reviewed-on: https://go-review.googlesource.com/c/go/+/696755
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Carlos Amedee <[email protected]>
Reviewed-by: Michael Matloob <[email protected]>
unique: deflake TestCanonMap/LoadOrStore/ConcurrentUnsharedKeys
I do not know yet what's causing this flake, but I've debugged it enough
to be confident that it's not a serious issue; it seems to be a test
flake. There is some path through which the tree nodes or keys might
still be transiently reachable, but I don't yet know what that is.
Details about what I tried and ruled out are in the code.
For #74083.
Change-Id: I97cdaf3f97e8c543fcc2ccde8b7e682893ae2f97
Reviewed-on: https://go-review.googlesource.com/c/go/+/697341
Auto-Submit: Michael Knyszek <[email protected]>
Reviewed-by: Carlos Amedee <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
os: fix path in MkdirTemp error message
Fixes #75012
Change-Id: I9dd3ba8987bde9db93769a1b05d13b162ba5332d
Reviewed-on: https://go-review.googlesource.com/c/go/+/696715
Reviewed-by: Carlos Amedee <[email protected]>
Reviewed-by: Sean Liao <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Auto-Submit: Sean Liao <[email protected]>
Reviewed-by: David Chase <[email protected]>
cmd/compile: tweak example command in README
While running ./src/all.bash, I got the following error:
all.bash must be run from $GOROOT/src
Change-Id: Iad271654ff8647501a324c282f01baf39605e3df
GitHub-Last-Rev: 2e289babf1bc81c1a44c9a72a29659d8bf9d827b
GitHub-Pull-Request: golang/go#75050
Reviewed-on: https://go-review.googlesource.com/c/go/+/696296
Reviewed-by: t hepudds <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Carlos Amedee <[email protected]>
internal/trace: remove redundant info from Event.String
Remove redundant information from state transition events. They
currently mention the proc and goroutine id that is transitioning twice.
Also reorder the reason to appear after the from->to state transition
information since it is a detail that is not available for all
transition.
Before example:
M=6164541440 P=3 G=17 StateTransition Time=7169014471424 Resource=Goroutine(17) Reason="chan receive" GoID=17 Running->Waiting
M=6166261760 P=3 G=10 StateTransition Time=7169908799040 Resource=Proc(4) Reason="" ProcID=4 Idle->Idle
After example:
M=6164541440 P=3 G=17 StateTransition Time=7169014471424 GoID=17 Running->Waiting Reason="chan receive"
M=6166261760 P=3 G=10 StateTransition Time=7169908799040 ProcID=4 Idle->Idle Reason=""
Change-Id: I6a6a696487ff2905f7c98dae7e887b998a2cb298
Reviewed-on: https://go-review.googlesource.com/c/go/+/697356
LUCI-TryBot-Result: Go LUCI <[email protected]>
Auto-Submit: Michael Knyszek <[email protected]>
Reviewed-by: Michael Knyszek <[email protected]>
Reviewed-by: Carlos Amedee <[email protected]>
cmd/compile/internal: make function comments match function names
Change-Id: I2ebadb87a4f60487c8f720930a72bc5ef953d7cf
Reviewed-on: https://go-review.googlesource.com/c/go/+/696695
Reviewed-by: Carlos Amedee <[email protected]>
Auto-Submit: Keith Randall <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
internal/trace: use RFC3339Nano for wall clock snapshots in Event.String
Improve the quality of life for people who use go tool trace -d=parsed
to look at clock snapshot wall timestamps. Many use cases will benefit
from seing the timestamp in sub-second resolution.
Change-Id: I6a6a696403a2164db0c12789c764e22a5c519b1c
Reviewed-on: https://go-review.googlesource.com/c/go/+/697355
LUCI-TryBot-Result: Go LUCI <[email protected]>
Auto-Submit: Michael Knyszek <[email protected]>
Reviewed-by: Carlos Amedee <[email protected]>
Reviewed-by: Michael Knyszek <[email protected]>
syscall: forkAndExecInChild1: don't reuse pid variable
A named return variable pid is reused in a few places, and while
the code is not wrong, it is somewhat confusing.
This variable used to be called r1 before CL 456516 (which did the right
thing, but slightly added to the confusion).
Now, the code calling SYS_WRITE (initially added by CL 158298) never
checks the number of bytes written, so let's remove the assignment.
In the code that calls SYS_READ it is used, so let's use a different
variable, c, which seems less confusing.
All this hopefully makes the code more readable.
Change-Id: I0d7ec311615100deb7e0aa3f02384eadcc1b47e8
Reviewed-on: https://go-review.googlesource.com/c/go/+/696835
Auto-Submit: Michael Pratt <[email protected]>
Reviewed-by: Michael Stapelberg <[email protected]>
Reviewed-by: Michael Pratt <[email protected]>
Reviewed-by: Tobias Klauser <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
cmd/go: use modern pprof flags in documentation
This change updates our mentions of pprof flags so that we now refer to
the modern flag names instead of the legacy ones.
Fixes #74336.
Change-Id: Ie8fbc7407178219b84ce5171fa5e94621129267e
Reviewed-on: https://go-review.googlesource.com/c/go/+/689095
Reviewed-by: Michael Matloob <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Carlos Amedee <[email protected]>
cmd/compile: ensure we use allowed registers for input-clobbering instructions
For instructions which clobber their input register, we make a second
copy of the input value so it is still available in a register for
future instructions.
That second copy might not respect the register input restrictions
for the instruction. So the second copy we make here can't actually
be used by the instruction - it should use the first copy, the second
copy is the one that will persist beyond the clobber.
Fixes #75063
Change-Id: I99acdc63f0c4e54567a174ff7ada601ae4e796b7
Reviewed-on: https://go-review.googlesource.com/c/go/+/697015
Auto-Submit: Keith Randall <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
Reviewed-by: David Chase <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
runtime: fix comments in tracetype.go
They seem to have been copy and pasted from tracestack.go without being
updated.
Change-Id: I6a6a69645a778fe8e6e8a2f4a80429f20e90162e
Reviewed-on: https://go-review.googlesource.com/c/go/+/674215
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: David Chase <[email protected]>
Reviewed-by: Michael Knyszek <[email protected]>
internal/trace: emit final sync event for generation in Go 1.26+
CL 693398 returned the error from reading a generation immediately, but
this is wrong -- a Sync event must be emitted to indicate the end of the
trace before reporting the error. This caused TestCrashWhileTracing
to fail because that test has a high likelihood of producing a truncated
trace, and it expects at least 2 Sync events. The truncated trace error
would be reported before the second Sync event, which is incorrect.
Fixes #75045.
Change-Id: Ia71592c4ec56a544afc85cdb7b575e143f80e048
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest
Reviewed-on: https://go-review.googlesource.com/c/go/+/696436
Reviewed-by: Carlos Amedee <[email protected]>
Auto-Submit: Michael Knyszek <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
runtime: don't overwrite global stop channel in tests
This is used by TestStopTheWorldDeadlock, and the new
TestReadMetricsSched test accidentally modifies this global variable
instead of (as intended) defining a local one.
Change-Id: I7aaece83f285d051ad8b56b7591c76613c39613a
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest
Reviewed-on: https://go-review.googlesource.com/c/go/+/696556
Reviewed-by: Michael Pratt <[email protected]>
TryBot-Bypass: Michael Knyszek <[email protected]>