forked from golang/go
-
-
Notifications
You must be signed in to change notification settings - Fork 1
[pull] master from golang:master #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
pull
wants to merge
4,533
commits into
golangFame:master
Choose a base branch
from
golang:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+527,619
−170,391
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Change-Id: I13f54f04ccb8452e625dba4249e0d56bafd1fad8 Reviewed-on: https://go-review.googlesource.com/c/go/+/682397 Reviewed-by: Michael Knyszek <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: David Chase <[email protected]>
When we see an ASCII character, we will probably see many. Grab & check increasingly large chunks of the string for ASCII-only-ness. Also redo some of the non-ASCII code to make it more optimizer friendly. goos: linux goarch: amd64 pkg: unicode/utf8 cpu: 12th Gen Intel(R) Core(TM) i7-12700 │ base │ exp │ │ sec/op │ sec/op vs base │ ValidTenASCIIChars-20 3.596n ± 3% 2.522n ± 1% -29.86% (p=0.000 n=10) Valid100KASCIIChars-20 6.094µ ± 2% 2.115µ ± 1% -65.29% (p=0.000 n=10) ValidTenJapaneseChars-20 21.02n ± 0% 18.61n ± 2% -11.44% (p=0.000 n=10) ValidLongMostlyASCII-20 51.774µ ± 0% 3.836µ ± 1% -92.59% (p=0.000 n=10) ValidLongJapanese-20 102.40µ ± 1% 50.95µ ± 1% -50.24% (p=0.000 n=10) ValidStringTenASCIIChars-20 2.640n ± 3% 2.526n ± 1% -4.34% (p=0.000 n=10) ValidString100KASCIIChars-20 5.585µ ± 7% 2.118µ ± 1% -62.07% (p=0.000 n=10) ValidStringTenJapaneseChars-20 21.29n ± 2% 18.67n ± 1% -12.31% (p=0.000 n=10) ValidStringLongMostlyASCII-20 52.431µ ± 1% 3.841µ ± 0% -92.67% (p=0.000 n=10) ValidStringLongJapanese-20 102.66µ ± 1% 50.90µ ± 1% -50.42% (p=0.000 n=10) geomean 1.152µ 454.8n -60.53% This is an attempt to see if we can get enough performance that we don't need to consider assembly like that in CL 681695. Change-Id: I8250feb797a6b4e7d335c23929f6e3acc8b24840 Reviewed-on: https://go-review.googlesource.com/c/go/+/682778 Reviewed-by: Cuong Manh Le <[email protected]> Reviewed-by: Michael Knyszek <[email protected]> Auto-Submit: Keith Randall <[email protected]> Reviewed-by: Keith Randall <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
Use stack unwinding instead of keeping incremental track of the argp of defers that are allowed to recover. It's much simpler, and it lets us get rid of the incremental tracking by wrapper code. (Ripped out in a subsequent CL.) We only need to stack unwind a few frames to get the right answer, and only when recover()ing in a panic situation. It will be more expensive in that case, but cheaper in all others. Change-Id: Id095807db6864b7ac1e1baf09285b77a07c46d19 Reviewed-on: https://go-review.googlesource.com/c/go/+/685355 Reviewed-by: Cherry Mui <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Michael Knyszek <[email protected]> Reviewed-by: Cuong Manh Le <[email protected]>
The previous CL made this adjustment unnecessary. The argp field is no longer used by the runtime. Change-Id: I3491eeef4103c6653ec345d604c0acd290af9e8f Reviewed-on: https://go-review.googlesource.com/c/go/+/685356 Reviewed-by: Michael Knyszek <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Cherry Mui <[email protected]> Reviewed-by: Cuong Manh Le <[email protected]>
For #61476 Change-Id: I29f4c1c3c3303e70ec2d7f380112eb2d00754018 Reviewed-on: https://go-review.googlesource.com/c/go/+/665655 Reviewed-by: Mark Ryan <[email protected]> Reviewed-by: Michael Knyszek <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Mark Freeman <[email protected]> Reviewed-by: Meng Zhuo <[email protected]>
cd is a uint32 converted again. Change-Id: Ia41e247e0644c17cd9e0593d79457db77512fc3e GitHub-Last-Rev: 1ba8596 GitHub-Pull-Request: #74679 Reviewed-on: https://go-review.googlesource.com/c/go/+/689055 Auto-Submit: Jorropo <[email protected]> Reviewed-by: Michael Knyszek <[email protected]> Reviewed-by: Keith Randall <[email protected]> Reviewed-by: Jorropo <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
There were minor and unnecessary error text changes when v1 was implemented using v2. Reduce divergences if possible. Of the cases reported in #74713, there are no more differences for: v1: json: cannot unmarshal number into Go value of type chan int v2: json: cannot unmarshal number into Go value of type chan int and v1: json: cannot unmarshal number into Go value of type error v2: json: cannot unmarshal number into Go value of type error However, there is a difference between: v1: json: cannot unmarshal string into Go struct field .F.V of type int v2: json: cannot unmarshal string into Go struct field S.F.V of type int For reasons unclear, the v1 logic was always inconsistent about whether it could properly record the root struct type, while the v1 emulation layer under v2 is always able to. This only modifies code that is compiled in under goexperiment.jsonv2. Fixes #74713 Change-Id: I9e87323b1810130cb929288fdd86aff4be82d5f2 Reviewed-on: https://go-review.googlesource.com/c/go/+/689918 Reviewed-by: Damien Neil <[email protected]> Auto-Submit: Joseph Tsai <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Michael Knyszek <[email protected]>
When operating under v1 semantics in the v2 implementation, a extra data error should take precedence over any semantic error that could theoretically occur within the value itself. This change only affects code compiled under goexperiment.jsonv2. Fixes #74614 Change-Id: I055a606b053fa66b0c766ae205487b8290109285 Reviewed-on: https://go-review.googlesource.com/c/go/+/689919 Reviewed-by: Damien Neil <[email protected]> Reviewed-by: Michael Knyszek <[email protected]> Auto-Submit: Michael Knyszek <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
Since CL 682496 we need more stack space to handle bounds checks. The code modified here normally has no bounds checks, but in -N builds it still does and thus uses too much stack. Use unsafe arithmetic to avoid the bounds check. This will hopefully fix some of the arm64 linux builders. Change-Id: I5b3096a14b4fb9553e635b7f340e60b8ffba8755 Reviewed-on: https://go-review.googlesource.com/c/go/+/690415 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: David Chase <[email protected]> Reviewed-by: Keith Randall <[email protected]>
This does the equivalent of CL 681177 for the Encoder. It preserves the internal buffer between resets. Change-Id: I5e9353b6d7755e067d4f9a4d1ea3d8f056253027 Reviewed-on: https://go-review.googlesource.com/c/go/+/690375 Reviewed-by: Johan Brandhorst-Satzkorn <[email protected]> Auto-Submit: Joseph Tsai <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Damien Neil <[email protected]> Reviewed-by: Michael Knyszek <[email protected]>
…sonv2 The jsontext.Decoder.ReadToken method reports a non-EOF error, if the token stream is truncated and does not form a valid JSON value. In contrast, the v1 json.Decoder.Token method would report EOF so long as the input was a prefix of some valid JSON value. Modify json.Decoder.Token to preserve historical behavior. This only modifies code that is compiled in under goexperiment.jsonv2. Updates #69449 Fixes #74750 Change-Id: Ifd281c46f118f0e748076013fefc7659f77c56ed Reviewed-on: https://go-review.googlesource.com/c/go/+/689516 Reviewed-by: Damien Neil <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Joseph Tsai <[email protected]> Reviewed-by: Michael Knyszek <[email protected]>
We care about the wrapper-ness of logical frames, not physical frames. Fixes #73916 Fixes #73917 Fixex #73920 Change-Id: Ia17c8390e71e6c0e13e23dcbb7bc7273ef25da90 Reviewed-on: https://go-review.googlesource.com/c/go/+/685375 Reviewed-by: Keith Randall <[email protected]> Reviewed-by: Cuong Manh Le <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Cherry Mui <[email protected]>
We don't need this argument anymore to match up a recover with its corresponding panic. Change-Id: I5d3646cdd766259ee9d3d995a2f215f02e17abc6 Reviewed-on: https://go-review.googlesource.com/c/go/+/685555 Reviewed-by: Michael Knyszek <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Keith Randall <[email protected]> Reviewed-by: Cuong Manh Le <[email protected]>
This change exists to help differentiate profile samples spent on Green Tea and non-Green-Tea GC time in mixed contexts. Change-Id: I8dea340d2d11ba4c410ae939fb5f37020d0b55d1 Reviewed-on: https://go-review.googlesource.com/c/go/+/689477 Reviewed-by: Michael Pratt <[email protected]> Auto-Submit: Michael Knyszek <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
This is long overdue. Change-Id: I891b114cb581e82b903c20d1c455bbbdad548fe8 Reviewed-on: https://go-review.googlesource.com/c/go/+/690535 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Michael Pratt <[email protected]> Auto-Submit: Michael Knyszek <[email protected]>
TestImpersonated and TestGroupIdsTestUser are flaky due to sporadic failures when creating the test user account when running the tests from different processes at the same time. This flakiness can be fixed by using a random name for the test user account. Fixes #73523 Fixes #74727 Fixes #74728 Fixes #74729 Fixes #74745 Fixes #74751 Cq-Include-Trybots: luci.golang.try:gotip-windows-amd64-longtest Change-Id: Ib2283a888437420502b1c11d876c975f5af4bc03 Reviewed-on: https://go-review.googlesource.com/c/go/+/690175 Auto-Submit: Quim Muntal <[email protected]> Reviewed-by: Michael Pratt <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> TryBot-Bypass: Dmitri Shuralyov <[email protected]>
…d constraint expansion There is a deadlock issue when calling SetConstraint from a lazy loader because the loader is called from resolve(), which is holding a lock on the loaded type. If the loaded type has a generic constraint which refers back to the loaded type (such as an argument or result), then we will loop back to the loaded type and deadlock. This change postpones calls to SetConstraint and passes them back to resolve(). At that point, the loaded type is mostly constructed, but its constraints might be unexpanded. Similar to how we handle resolved instances, we advance the state for the loaded type to a, appropriately named, loaded state. When we expand the constraint, we don't try to acquire the lock on the loaded type. Thus, no deadlock. Fixes #63285 Change-Id: Ie0204b58a5b433f6d839ce8fd8a99542246367b7 Reviewed-on: https://go-review.googlesource.com/c/go/+/681875 Commit-Queue: Mark Freeman <[email protected]> Reviewed-by: Robert Griesemer <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
Using Invalid to represent an incomplete alias is problematic since it implies that an error has been reported somewhere. This causes confusion for observers of invalid aliases trying not to emit follow-on errors. This change uses nil instead to represent an incomplete alias. This has a mild benefit of making alias memoization more convenient. We additionally can now memoize Invalid aliases. This necessitates a minor change to our cycle error reporting for aliases. Care is taken to separate logic according to gotypesalias. Otherwise, a cycle as simple as "type T = T" panics. A test is also added which uses go/types to inspect for Invalid types. Currently, the problematic Invalid does not cause an error in type checking, but rather a panic in noding. Thus, we cannot use the familiar test facilities relying on error reporting. Fixes #74181 Change-Id: Iea5ebce567a2805f5647de0fb7ded4a96f6c5f8d Reviewed-on: https://go-review.googlesource.com/c/go/+/683796 Reviewed-by: Robert Griesemer <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
The previous algorithm was incorrect, as it reused the dominatedByCall slice without resetting it. It also used the depth fields even though they were not yet calculated. Also, clean up a lot of the loop detector code that we never use. Always compute depths. It is cheap. Update #71868 Not really sure how to test this. As it is just an advisory bit, nothing goes really wrong when the result is incorrect. Change-Id: Ic0ae87a4d3576554831252d88b05b058ca68af41 Reviewed-on: https://go-review.googlesource.com/c/go/+/680775 LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Keith Randall <[email protected]> Reviewed-by: Keith Randall <[email protected]> Reviewed-by: David Chase <[email protected]>
We now calculate depths by default, no need to ask. All calls were removed in CL 680775 when that CL was written, but an additional call appeared between then and submitting the CL. Oops. Another case for which a presubmit check would help. Fixes #74762 Change-Id: I1b70ed7f91b56e4939b4a3d0ad7a5f31fe396b4c Reviewed-on: https://go-review.googlesource.com/c/go/+/690036 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Keith Randall <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]> Reviewed-by: t hepudds <[email protected]>
CRC value loaded from incorrect register, which happened to line up with actual register on default compile. Therefore failures would only show up with -race. Add regression test with longer payloads. Fix regression from CL 689435. Fixes #74767. Change-Id: Ib63ddade998a5630297b285f3d566361f36f28e5 GitHub-Last-Rev: 5074012 GitHub-Pull-Request: #74775 Reviewed-on: https://go-review.googlesource.com/c/go/+/690855 Reviewed-by: Keith Randall <[email protected]> Reviewed-by: Keith Randall <[email protected]> Auto-Submit: Keith Randall <[email protected]> Reviewed-by: David Chase <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
Factor out the code related to doing calls using the Windows stdcall calling convention into a separate package. This will allow us to reuse it in other low-level packages that can't depend on syscall. Updates #51087. Cq-Include-Trybots: luci.golang.try:gotip-windows-arm64,gotip-windows-amd64-longtest,gotip-solaris-amd64 Change-Id: I68640b07091183b50da6bef17406c10a397896e9 Reviewed-on: https://go-review.googlesource.com/c/go/+/689156 Reviewed-by: Michael Pratt <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Michael Knyszek <[email protected]>
There is no need for syscall.Syscall{3,6,9,12,15,18} to be implemented in the runtime and linknamed from syscall. All of them can be implemented using the single runtime.syscall_syscalln function. While here, improve the documentation of syscall.SyscallN. Change-Id: I0e09d42e855d6baf900354c9b7992a4329c4ffc7 Reviewed-on: https://go-review.googlesource.com/c/go/+/690515 Reviewed-by: Michael Knyszek <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Michael Pratt <[email protected]>
These recently added tests failed when using the -all_codgen flag. Fixes #74770 Change-Id: Idea1ea02af2bd9f45c7d0a28d633c7442328e6df Reviewed-on: https://go-review.googlesource.com/c/go/+/690715 Reviewed-by: Jorropo <[email protected]> Run-TryBot: Michael Munday <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Michael Knyszek <[email protected]> Reviewed-by: Mark Freeman <[email protected]> Auto-Submit: Jorropo <[email protected]> TryBot-Bypass: Michael Knyszek <[email protected]>
Change-Id: Ibfb330eaf24e004ddec60a5ca08cdc780235ad8c Reviewed-on: https://go-review.googlesource.com/c/go/+/688315 Reviewed-by: Damien Neil <[email protected]> Auto-Submit: Damien Neil <[email protected]> Reviewed-by: Mark Freeman <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
I don't think branchelim will intentionally generate theses. But at the time where branchelim is generating them they might different, and through opt process they become the same value. Change-Id: I4a19f1db14c08057b7e782a098f4c18ca36ab7fe Reviewed-on: https://go-review.googlesource.com/c/go/+/690519 Auto-Submit: Keith Randall <[email protected]> Reviewed-by: Mark Freeman <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Keith Randall <[email protected]> Reviewed-by: Keith Randall <[email protected]>
Change-Id: I7b8e8cd88c4d6d562aa25df91593d35d331ef63c Reviewed-on: https://go-review.googlesource.com/c/go/+/690595 Reviewed-by: Mark Freeman <[email protected]> Reviewed-by: Keith Randall <[email protected]> Auto-Submit: Keith Randall <[email protected]> Reviewed-by: Keith Randall <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
Found by github.com/mdempsky/unconvert Change-Id: Ib78cceb718146509d96dbb6da87b27dbaeba1306 GitHub-Last-Rev: dedf354 GitHub-Pull-Request: #74771 Reviewed-on: https://go-review.googlesource.com/c/go/+/690735 Reviewed-by: Mark Freeman <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Keith Randall <[email protected]> Auto-Submit: Keith Randall <[email protected]> Reviewed-by: Keith Randall <[email protected]>
When ok is true, err can't be nil. Make it behave more like the Unwrap function. Change-Id: Ieba5de57d60f5ff4d6a3468d703e6f72be02a97d GitHub-Last-Rev: 6df9365 GitHub-Pull-Request: #74764 Reviewed-on: https://go-review.googlesource.com/c/go/+/689920 LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Jorropo <[email protected]> Reviewed-by: Keith Randall <[email protected]> Reviewed-by: Mark Freeman <[email protected]> Reviewed-by: Jorropo <[email protected]>
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]>
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]>
… 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]>
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]>
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]>
…ons 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]>
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]>
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]>
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]>
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]>
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]>
Polish a sentence by removing redundant "in response". Change-Id: I232198ad904333f8eaa0c25a12824f0dcbf3cfb6 GitHub-Last-Rev: 421bfc0 GitHub-Pull-Request: #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]>
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]>
Change-Id: Ibd6b8d10ecac3cdea33de1218d516b7425443313 GitHub-Last-Rev: 3d5568b GitHub-Pull-Request: #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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
… 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]>
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]>
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]>
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]>
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]>
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]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )