| Age | Commit message (Collapse) | Author |
|
Change-Id: If06d5b5f4a491ea80f001d930f3f4a5f22290460
Reviewed-on: https://go-review.googlesource.com/c/go/+/742560
Reviewed-by: Cherry Mui <cherryyz@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: Michael Knyszek <mknyszek@google.com>
|
|
Running these tests on other systems is a pointless waste of time.
This runs cmd/link/internal/ld/elf_test.go in the same cases that
we run cmd/link/elf_test.go.
Change-Id: I318fb5c2de9e4cfdb976bc2389c72cede6661b47
Reviewed-on: https://go-review.googlesource.com/c/go/+/740782
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
This adds a test case to resolveReferenceTests to ensure that a
relative path is correctly appended to a base URL that ends with a
trailing slash.
Change-Id: I94ea65355bb96f23acff09a3992c9dcf6e47da60
Reviewed-on: https://go-review.googlesource.com/c/go/+/741880
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
|
|
After CL 538737 these no longer need to be exported. They are only
used in internal/bytealg and can be unexported.
Change-Id: Idd405f397c7ec9f96425d2b7e0e74de61daa7a6e
Reviewed-on: https://go-review.googlesource.com/c/go/+/741920
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
|
|
The existing code was just wrong. On AIX the go.type section is
folded into the .text section (when internally linking),
or the .data section (when externally linking).
It follows that the data section adjustment is useless when
internally linking, which is currently what happens with this test.
Change-Id: Icf8ac07f754fdcf08b9d3dfffde83b3391c9404b
Reviewed-on: https://go-review.googlesource.com/c/go/+/740821
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
|
|
CL 724261 changed the linker to put all type descriptors that
are used for typelinks in a single list. This caused trouble on AIX when
linking externally, because the AIX linker aligns symbols individually,
rather than honoring the layout of the object file generated by the
internal linker.
I fixed internal linking problems with CL 740220,
but that just made things worse for the external linker.
This CL rolls back 740220, and adds commentary.
With this CL we force a smaller alignment for type descriptors,
use the same alignment for runtime.types and type:*,
and use a consistent size for runtime.types in all cases.
With this change all the type descriptor related code
passes again on AIX, except for the new TestTypePlacement test
which I will fix in a followup CL.
Fixes #77400
Change-Id: I9f25847eb0588001cb4ce453f211a655400d6a59
Reviewed-on: https://go-review.googlesource.com/c/go/+/740820
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
If we start the covctrs blob at an odd alignment, then covctrs will
not be correctly aligned. Each individual entry is aligned properly,
but the start marker may be before any padding inserted to enforce
that alignment.
Fixes #58936
Change-Id: I802fbe40eacfa5a3c8c4864e078b0e078da956d5
Reviewed-on: https://go-review.googlesource.com/c/go/+/733740
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Keith Randall <khr@google.com>
|
|
The remaining race reported in go.dev/issue/66519 is that it's possible
for copying.Wait to start running before all copying.Add calls complete.
It happens infrequently as is, but padding both Wait and Add calls with
a 100 ms sleep makes it highly reproducible.
Arranging the Add call to happen before responding "foo" to the POST
request should be enough to guarantee that Wait doesn't start running
until all Add calls have already happened.
While here, delete a blank line that gets more in the way of reading
error handling code than it helps.
For #64252.
Fixes #66519 (optimistically).
Change-Id: Ibf264d8cc5ffc2495e8ae8e66a15591310c65e71
Reviewed-on: https://go-review.googlesource.com/c/go/+/739060
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
|
|
This is a step towards deferring adding the handle to IOCP until the
first IO operation.
Having all isBlocking checks inside execIO will make it easier to delay
getting that information until the first IO operation.
It also makes the code simpler, as Pread and Pwrite now only modify
the overlapped object offset, not the one in the FD struct, so they
don't need to reverse the offset change after the IO operation.
For #76391
Cq-Include-Trybots: luci.golang.try:gotip-windows-amd64-longtest,gotip-windows-amd64-race
Change-Id: Iea680c502c9417b9569a0b1a9da6f7e6bf916f6a
Reviewed-on: https://go-review.googlesource.com/c/go/+/742283
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
|
|
FILE_SKIP_SET_EVENT_ON_HANDLE is always safe to use.
FILE_SKIP_COMPLETION_PORT_ON_SUCCESS is safe as long as the socket
is provided by an IFS provider.
While here, stop using the kindFileNet type, it doesn't provide any
value.
Fixes #77448
Change-Id: Ib3dc0d68c7ff57b6a1f15f017e60a092e4b87f46
Reviewed-on: https://go-review.googlesource.com/c/go/+/742281
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
This is a step towards deferring adding the handle to IOCP until the
first IO operation.
waitIO should use the overlapped event if it is provided, regardless of
whether FD is pollable or not. This simplifies reasoning about the code
and makes it more robust to race conditions.
While here, remove the panic in waitIO that was triggered when called
with a blocking handle. That shouldn't happen, but if it does,
fd.pd.wait will return an error that will already be promoted to
a panic.
For #76391
Change-Id: I8e84592568a3ef66e71161eb2c5f515dde638117
Reviewed-on: https://go-review.googlesource.com/c/go/+/742280
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
The Scan methods for NullString, NullInt64, NullInt32, NullFloat64,
NullBool, and NullTime set Valid=true before calling convertAssign.
If convertAssign returns an error, Valid remains true, which creates
an inconsistent state where Valid=true but err!=nil.
Fix by setting Valid only after successful conversion.
Fixes #45662
Change-Id: I855a20abbe517ed017f7c9b8f5603b17bd9d487d
Reviewed-on: https://go-review.googlesource.com/c/go/+/739160
Auto-Submit: Sean Liao <sean@liao.dev>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Sean Liao <sean@liao.dev>
Reviewed-by: Michael Pratt <mpratt@google.com>
|
|
The three SHA256 ops (SHA256Message1, SHA256Message2 and SHA256TwoRounds)
all incorrectly referred to the SHA1 algorithm in their documentation
rather than SHA256.
Change-Id: Id6c1bfe4fee4517c0e498fb063cc9112464bc1e7
Reviewed-on: https://go-review.googlesource.com/c/go/+/735420
Reviewed-by: Junyang Shao <shaojunyang@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
The Go compiler always generates Loong64 binaries, which can execute any
processor of LA364, LA464, LA664 or higher core. And these processors
support unaligned memory access [1].
goos: linux
goarch: loong64
pkg: strings
cpu: Loongson-3A6000 @ 2500.00MHz
| old.txt | new.txt |
| sec/op | sec/op vs base |
StringPrefix3 4.0040n ± 0% 0.4003n ± 0% -90.00% (p=0.000 n=10)
StringPrefix5 4.0040n ± 0% 0.4003n ± 0% -90.00% (p=0.000 n=10)
StringPrefix6 3.6030n ± 0% 0.4002n ± 0% -88.89% (p=0.000 n=10)
StringPrefix7 4.0040n ± 0% 0.4002n ± 0% -90.00% (p=0.000 n=10)
geomean 3.900n 0.4003n -89.74%
goos: linux
goarch: loong64
pkg: strings
cpu: Loongson-3A5000-HV @ 2500.00MHz
| old.txt │ new.txt |
| sec/op │ sec/op vs base |
StringPrefix3 5.6160n ± 0% 0.4011n ± 0% -92.86% (p=0.000 n=10)
StringPrefix5 5.6180n ± 0% 0.4011n ± 0% -92.86% (p=0.000 n=10)
StringPrefix6 5.2170n ± 0% 0.4011n ± 0% -92.31% (p=0.000 n=10)
StringPrefix7 5.6170n ± 0% 0.4009n ± 0% -92.86% (p=0.000 n=10)
geomean 5.514n 0.4010n -92.73%
goos: linux
goarch: loong64
pkg: strings
cpu: Loongson-3B6000M @ 2400.00MHz
| old.txt │ new.txt |
| sec/op │ sec/op vs base |
StringPrefix3 5.0060n ± 0% 0.4223n ± 1% -91.56% (p=0.000 n=10)
StringPrefix5 4.5890n ± 0% 0.4214n ± 0% -90.82% (p=0.000 n=10)
StringPrefix6 4.5890n ± 0% 0.4190n ± 1% -90.87% (p=0.000 n=10)
StringPrefix7 4.5890n ± 0% 0.4226n ± 1% -90.79% (p=0.000 n=10)
geomean 4.690n 0.4213n -91.02%
[1]: https://go.dev/wiki/MinimumRequirements#loong64
Change-Id: I1870080e0122a7d136685e3045699d0cf1e4194d
Reviewed-on: https://go-review.googlesource.com/c/go/+/742260
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Meidan Li <limeidan@loongson.cn>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
|
|
windows: retry file open with DELETE access after access denied
Additional access rights when opening files, including SYNCHRONIZE,
break deletion when the caller has FILE_DELETE_CHILD on the parent
directory but not the file. Retry with DELETE only restores correct
Windows semantics.
Fixes #77402
Change-Id: Ie53bc6f1673de1a8af4dcfb7496daf99e71098cb
GitHub-Last-Rev: 0ad635cf1a13c0242e3b1922cf47a8c594dd7215
GitHub-Pull-Request: golang/go#77403
Reviewed-on: https://go-review.googlesource.com/c/go/+/741040
Reviewed-by: Quim Muntal <quimmuntal@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
|
|
The Mozilla developer documentation link for the NSS key log format
has been broken since early 2022. Update the documentation to point
to the IETF TLS working group draft which is currently in the RFC
publication queue.
Fixes #63331
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Change-Id: I1a87cca839e503790170a6f3a48bef3b4c6bd624
Reviewed-on: https://go-review.googlesource.com/c/go/+/741444
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net>
Auto-Submit: Sean Liao <sean@liao.dev>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Sean Liao <sean@liao.dev>
Auto-Submit: Michael Pratt <mpratt@google.com>
|
|
Fix a typo in findIntrinsic function where "GrtCallerSP" should be
"GetCallerSP". This typo was in the condition checking for runtime
intrinsic functions that don't have definitions.
Fixes #77432
Change-Id: I8667a42456b4b2c4533dfcbca198b46793f71c89
GitHub-Last-Rev: 00ea4034177381ca7f851ae002487dba3dba20f8
GitHub-Pull-Request: golang/go#77476
Reviewed-on: https://go-review.googlesource.com/c/go/+/742680
Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Jorropo <jorropo.pgm@gmail.com>
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
decoderune is only called by generated code, so we can guarantee that
it's non-negative. This allows eliminating the automatic bounds check in
it.
To make this work, we need to expand the existing optimization to uints.
This generally enables BCE for cases like this:
```go
func test(list []int, idx uint64) int {
if idx >= uint64(len(list)) {
return 0
}
list1 := list[idx:]
return list1[0]
}
```
Change-Id: I86a51b26ca0e63522dec99f7d6efe6bdcd2d6487
GitHub-Last-Rev: 82d44e0a080b53ee02c31ee1f92a8a0acd8d2621
GitHub-Pull-Request: golang/go#76610
Reviewed-on: https://go-review.googlesource.com/c/go/+/725101
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
|
|
Fixes #77436
Change-Id: I37d852a89678c929156c4765e774c819eb515e6f
Reviewed-on: https://go-review.googlesource.com/c/go/+/742220
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
|
|
The message said we were ignoring the symbols, but we aren't.
We are treating them as an error.
For #77436
Change-Id: I5492d81717c539b09f6956b591178f1f3a42893d
Reviewed-on: https://go-review.googlesource.com/c/go/+/742060
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
Fixes #76651
Change-Id: I306e127375095bc0caedb01ac458107cfec5f085
Reviewed-on: https://go-review.googlesource.com/c/go/+/725740
Auto-Submit: Sean Liao <sean@liao.dev>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Sean Liao <sean@liao.dev>
|
|
After CL 742320, using vector type as type parameter now works.
Updates #77444
Change-Id: I4f8cd2c9c18e04efbc884cb57dfcf9f2b48306d8
Reviewed-on: https://go-review.googlesource.com/c/go/+/742400
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
|
|
When a SIMD type is used to instantiate a type parameter, the SIMD's
underlying type is its shape. This shape type must be marked as a SIMD
type, otherwise, the backend will confuse and does not know how to put
this SIMD type to proper registers.
Fixing this by marking a type as SIMD type if its underlying is already
a SIMD one.
Fixes #77444
Change-Id: I745c474469889c94bc68435472ba4820e9f752a1
Reviewed-on: https://go-review.googlesource.com/c/go/+/742320
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
|
|
Fixes #77428
Change-Id: I02d76ac9220fb2e0df404e4a446953bc0b56475f
Reviewed-on: https://go-review.googlesource.com/c/go/+/741560
Auto-Submit: Rhys Hiltner <rhys.hiltner@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
|
|
On https://pkg.go.dev/bufio#Reader, the reference to the Reset
method is rendered as [Reset]. Fix it by referring to the method
via its type.
Change-Id: I4256ca80ebef7b850e6a97b96503dd7178cb361b
Reviewed-on: https://go-review.googlesource.com/c/go/+/736320
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Daniel Morsing <daniel.morsing@gmail.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
|
|
The documentation states that g objects are "never freed" but does not
clarify that goroutine stack memory is managed separately. This can be
confusing as it might imply that all goroutine memory (including stacks)
is retained indefinitely.
Add a paragraph in the Stacks section clarifying that:
- Stack memory may be freed when a goroutine exits
- Stacks at the starting size are retained for reuse
- Grown stacks are freed and reallocated when needed
- The g object itself is never freed, only its stack memory
Fixes #65843
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Change-Id: Icb3afbb5392401d695ab129c341ce10106e5a4f0
Reviewed-on: https://go-review.googlesource.com/c/go/+/741505
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
Methods on QUICConn are synchronous:
The connection state is expected to change only in reaction
to a user calling a QUICConn method, and the state change
should finish completely before the method returns.
The connection context provided to QUICConn.Start violates
this model, because canceling the context causes an
asynchronous state change.
Prior to CL 719040, this caused no problems because canceling
the context did not cause any user-visible state changes.
In particular, canceling the context did not cause any new
events to be immediately returned by QUICConn.NextEvent.
CL 719040 introduced a new error event. Now, canceling a
QUICConn's context causes a new connection event to be
generated.
Receiving this event causes a data race visible to the
race detector, but the core problem is not the data race
itself: It's that an asynchronous event (canceling the
connection context) causes an change to the connection
events.
Fix this race by reworking the handling of QUICConn
context cancellation a bit. We no longer react to
cancellation while control of the connection lies
with the user. We only process cancellation as
part of a user call, such as QUICConn.Close
or QUICConn.HandleData.
Fixes #77274
Change-Id: If2e0f73618c4852114e0931b6bd0cb0b6a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/742561
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Damien Neil <dneil@google.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
|
|
Change-Id: I2e98178a42ad225aa3803dc4ccd26d50938f29b7
Reviewed-on: https://go-review.googlesource.com/c/go/+/742501
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Mark Freeman <markfreeman@google.com>
|
|
Change-Id: I7802b10f63a52e5f864d550a7ad7678d4581a796
Reviewed-on: https://go-review.googlesource.com/c/go/+/742500
Auto-Submit: Mark Freeman <markfreeman@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Griesemer <gri@google.com>
|
|
Change-Id: Ib832f4f9fde45b1308208f05756960191953e8f8
Reviewed-on: https://go-review.googlesource.com/c/go/+/742081
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Mark Freeman <markfreeman@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
This provides a hook to enforce that operand.typ is only observed where
operand.mode is not invalid.
For #76110
Change-Id: I915f3ac09dc10bfe3f9f688d6190ad58e195ddcb
Reviewed-on: https://go-review.googlesource.com/c/go/+/741220
Auto-Submit: Mark Freeman <markfreeman@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
Change-Id: I7a978b4a448a25c596c8af346e2ebc11f0ed67e7
Reviewed-on: https://go-review.googlesource.com/c/go/+/742080
Auto-Submit: Mark Freeman <markfreeman@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Griesemer <gri@google.com>
|
|
Change-Id: Iba87b8bc6188e5e784542f2c0f6f4c4cc3f70b28
Reviewed-on: https://go-review.googlesource.com/c/go/+/742022
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Mark Freeman <markfreeman@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
|
|
Enable partitioning together memory user instructions, such as regular
loads, across disjoint memory defining instructions (currently only stores).
Keep a memory table to remember appropriate memory definition for any
supported memory using instruction. This allows to match more load
instructions and potentially may be further improved with handling
additional cases in the common utility `disjoint`.
Generally this change allows to improve code size. For example, here is
code size difference on linux_arm64:
Executable Old .text New .text Change
-------------------------------------------------------
asm 1963124 1961972 -0.06%
cgo 1734228 1733140 -0.06%
compile 8948740 8948516 -0.00%
cover 1864500 1863588 -0.05%
link 2555700 2552676 -0.12%
preprofile 863636 862980 -0.08%
vet 2869220 2867556 -0.06%
Some benchmarks result from a local run:
shortname: aws_jsonutil
pkg: github.com/aws/aws-sdk-go/private/protocol/json/jsonutil
│ Orig-rand.stdout │ Cse1-rand.stdout │
│ sec/op │ sec/op vs base │
BuildJSON-8 1.511µ ± 0% 1.516µ ± 0% +0.33% (p=0.003 n=15)
StdlibJSON-8 1.254µ ± 0% 1.227µ ± 0% -2.15% (p=0.000 n=15)
geomean 1.377µ 1.364µ -0.92%
shortname: kanzi
toolchain: Cse1-rand
goos: linux
goarch: arm64
pkg: github.com/flanglet/kanzi-go/benchmark
│ Orig-rand.stdout │ Cse1-rand.stdout │
│ sec/op │ sec/op vs base │
FPAQ-4 26.11m ± 0% 25.61m ± 0% -1.93% (p=0.000 n=10)
LZ-4 1.461m ± 1% 1.445m ± 1% ~ (p=0.105 n=10)
MTFT-4 1.197m ± 0% 1.201m ± 0% +0.36% (p=0.000 n=10)
geomean 3.574m 3.543m -0.88%
This change also tends to increase number of NilChecks matched, which
led to moving statement boundary marks from OpNilCheck to its user
instruction (such as OpOffPtr), where it is more likely to be lost
during subsequent optimizations - e.g. see #75249. Because we don't
remove the nil checks in cse, here we also update it to not move
the statement boundary marks from OpNilCheck - the later related
optimizations can handle that better.
Change-Id: Iddf4aa13d44de78ffecf6ccb4c0fd1d35533e844
Reviewed-on: https://go-review.googlesource.com/c/go/+/608115
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
|
|
This changes does 2 things:
- Move `-L` to `prefixesToKeep` since it allows providing a custom
default libs search path.
- Allow various flags that impact the behaviour of the clang driver.
The latter allows for LLVM only toolchains to be compatible with
linkerFlagSupported checks.
The end goal of this PR is to allow fully hermetic toolchains,
especially pure LLVM ones, to be used to cross-compile CGO.
Fixes #76825
Change-Id: I2311c9566ce9c7e8f6b325258af58eb333663cf0
GitHub-Last-Rev: 74342aae35124cf174a3f8b888999ffd4cea191f
GitHub-Pull-Request: golang/go#76858
Reviewed-on: https://go-review.googlesource.com/c/go/+/730561
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
|
|
mkcallstmt1 already walks the map argument of clear. mapClear then
walks it again, which can cause problems if it is some syntax that is
non-idempotent under walk. That is the case for the new way map
lookups are being lowered in CL 736020.
Fixes #77435
Change-Id: Ib2f6d7f2270308c2462aa276ed4413aaf7799fe3
Reviewed-on: https://go-review.googlesource.com/c/go/+/742120
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
|
|
goos: linux
goarch: amd64
pkg: net/http
cpu: 12th Gen Intel(R) Core(TM) i7-12700
│ master.txt │ patch.txt │
│ sec/op │ sec/op vs base │
ReadCookies/readCookies-20 1.499µ ± 1% 1.482µ ± 3% ~ (p=0.197 n=10)
ReadCookies/ParseCookie-20 1.552µ ± 2% 1.437µ ± 2% -7.44% (p=0.000 n=10)
geomean 1.525µ 1.459µ -4.34%
│ master.txt │ patch.txt │
│ B/op │ B/op vs base │
ReadCookies/readCookies-20 1.953Ki ± 0% 1.953Ki ± 0% ~ (p=1.000 n=10) ¹
ReadCookies/ParseCookie-20 2.109Ki ± 0% 1.953Ki ± 0% -7.41% (p=0.000 n=10)
geomean 2.030Ki 1.953Ki -3.77%
¹ all samples are equal
│ master.txt │ patch.txt │
│ allocs/op │ allocs/op vs base │
ReadCookies/readCookies-20 11.00 ± 0% 11.00 ± 0% ~ (p=1.000 n=10) ¹
ReadCookies/ParseCookie-20 12.00 ± 0% 11.00 ± 0% -8.33% (p=0.000 n=10)
geomean 11.49 11.00 -4.26%
¹ all samples are equal
Change-Id: I7e84d52ac8d25991595d1b0480334fe9d1a84ffb
Reviewed-on: https://go-review.googlesource.com/c/go/+/727520
Reviewed-by: Sean Liao <sean@liao.dev>
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Sean Liao <sean@liao.dev>
Reviewed-by: Carlos Amedee <carlos@golang.org>
|
|
Change-Id: Id4c95138788d90779aa7b9a54e58f9e4cb271163
GitHub-Last-Rev: ee43b95269e8f67130c56693acd99bc46c815c61
GitHub-Pull-Request: golang/go#65985
Reviewed-on: https://go-review.googlesource.com/c/go/+/567539
Reviewed-by: Sean Liao <sean@liao.dev>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
|
|
Fixes #68556
Change-Id: I36b08577243a6b3a13b3adef116411d73a2d3428
Reviewed-on: https://go-review.googlesource.com/c/go/+/700337
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
This is to enable use of package httptrace on TinyGo, which does not have an implementation of reflect.MakeFunc.
Change-Id: I4f1f94352797bfe3553c1c2d4d1d3dca44b03e43
GitHub-Last-Rev: 4587368ad875bd55e6a8cbdcd7e13738a8d02400
GitHub-Pull-Request: golang/go#69172
Reviewed-on: https://go-review.googlesource.com/c/go/+/609763
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Sean Liao <sean@liao.dev>
|
|
Merge two nearly identical loops into one by selecting the fallback
method (IndexString vs IndexRabinKarp) inside the loop based on
whether n <= bytealg.MaxLen.
Fixes #77364#
Change-Id: Iefbef60922ca24e4dda3016127f54290096bcfed
Reviewed-on: https://go-review.googlesource.com/c/go/+/741340
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
|
|
Change-Id: Icf94808a6c137c3c114a0be1f8da85ee5f68d58e
Reviewed-on: https://go-review.googlesource.com/c/go/+/740740
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Keith Randall <khr@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
|
|
Implement a new pkg-config safe flag list (containing everything except
for --log-file) and use that when checking flags passed to pkg-config,
instead of using checkCompilerFlags.
Fixes #77387
Change-Id: Id6141d0a2934053aa43e3aa8ce402bd499c4c028
Reviewed-on: https://go-review.googlesource.com/c/go/+/741042
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Roland Shoemaker <roland@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
|
|
If the write lock acquisition fails, the read lock acquired earlier is
not released, leading to a potential deadlock.
The deadlock shouldn't occur because when the write lock fails, it
indicates that the FD is closing, and no other goroutine should be
holding the read lock. However, better to be safe and release the read
lock in such cases.
Change-Id: If593c36040a97357f835b42bb3133ff1dc55a638
Reviewed-on: https://go-review.googlesource.com/c/go/+/740560
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
|
|
On AIX the runtime adjusts the GCData field in getGCMaskOnDemand
to account for the AIX dynamic loader moving the data section.
That works fine for statically generated types,
but it breaks user generated types. The user generated type
will have a normal, correct, pointer, and adjusting the pointer
will make it point elsewhere.
This all happens to work OK when doing an external link,
because in that case we do have dynamic relocs and there is no adjustment.
But it fails with an internal link.
This CL fixes the problem by applying a reverse adjustment to
user generated types, so that the adjustment winds up with the
original pointer value.
Change-Id: Ibf3199b9ffb36e79af134fbed41db2853297de74
Reviewed-on: https://go-review.googlesource.com/c/go/+/740800
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
|
|
Previously we added a slash to the end of objdir only after
processing input files. The effect was that the temporary gcc
output files were placed in /tmp, using objdir as a prefix.
Those output files were not removed by anything.
Now we consistently use objdir as a directory, not a prefix.
We only create it when needed; there is already a test for that in
cmd/go/testdata/script/build_cwd_newline.txt.
Change-Id: Ie66d9c04ecc3c0f5950fc1111c74e1d01c67304c
Reviewed-on: https://go-review.googlesource.com/c/go/+/740742
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
We used to do this but it broke in Go 1.10. This restores the rewrite,
but only applied to compiler output for packages that use cgo.
That is all that the original rewrite applied to anyhow.
Fixes #76339
Change-Id: Ife8ee858ddd0ff7bcc7423455b2eabf8381b7bde
Reviewed-on: https://go-review.googlesource.com/c/go/+/721821
Reviewed-by: David Chase <drchase@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: Roland Shoemaker <roland@golang.org>
|
|
AI-generated code, plus a lot of reviewing and tweaking
of arrows and fonts.
This adds subtree collapse/expand triangles.
Change-Id: I2dd322abdf7ef956b1435946d79f864a6150f976
Reviewed-on: https://go-review.googlesource.com/c/go/+/740481
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
AI-generated code, 3 merged commits, plus a LOT of hand
cleanups and tweaks, including removing cargo-culted dead
code from the SSA example, reorganizing CSS and JS out of a
single giant comment, using defer appropriately to ensure
balanced open/close tags, running output through tidy to
check compliance. Prompts are included for reference.
This is intended to produce an HTML file in the style of "ssa.html",
but for AST. The result of various phases appears in columns,
which can be scrolled side to side, and also dragged sideways
to make them wider (because AST tends wide).
This supports three kinds of highlighting, which I tweaked
along the way to make them (in my opinion) more useful.
1) Node outlining. This outlines a node and all of its subtrees.
When the cursor is a "cell" (outlined cross) node highlighting
is available. Note that "NAME" nodes are repeated within the
tree, so click on one of these will outline every occurrence.
This is actually done with pointer identity.
2) Name highlighting, available with a "crosshair" cursor.
This highlights a name, e.g. "autotmp_1".
3) Position highlighting, available with a "crosshair" cursor.
This highlights either a file (all occurrences of that file's positions),
a line within a file (all occurrences of that file:line combination),
or a column (all occurrences of that particular file:line:column).
Inlined positions are treated as a sequence of positions, not a single
position.
Prompts:
```
The file cmd/compile/internal/ir/dump.go contains a function AstDump
that calls FDump to generate a textual representation of the AST from
several phases within the compiler.
The file cmd/compile/internal/ir/fmt.go contains the definition of
FDump.
The SSA phases of the compiler use code in
cmd/compile/internal/ssa/html.go to render its textual representation
into an html display that allows hiding phases and highlighting blocks,
identifiers and line numbers.
Please write a similar HTML-generating phase for AST that produces an
output that will allow hiding phases and perhaps hiding subtrees, and
highlighting identifiers and line numbers. The idioms and hacks used
in the SSA html display have worked well, if you want to copy them.
```
```
Not bad, but the output contains a strike-through beginning on a line
that contains "TYPE type *testing.B tc(1)". The strike through
begins after "TYPE " and continues for the rest of the output. Can you
find that bug and fix it?
```
```
The AST output is often wider than the statically sized columns in the
HTML output. Either the columns need to have a width that can be
resized (dragged wider, for example) or the AST needs to be draggable,
side-to-side, within the columns. Resizable columns seems like the
preferable choice, if it is possible.
```
```
The highlighting for file name and line number is not quite right -- all
the lines in the same file are grouped together, where what I want, is
that each different file:line:column gets its own number. There's also
the issue of inlining, in some cases the location is described as more
than one file:line:column, where the first is the call site and the
second is the inlined function. I think it makes sense to treat each
single file:line:column as its own item for highlighting, instead of
trying to treat the sequence of file:line:column as a single distinct
location. One thing that might be interesting, but I am not sure how
hard it would be, is to distinguish between clicks to the file part,
the line part, and the column part -- click on file means highlight
all that matches file, click on line means all that machines file:line
(not just the line numner, since there may be different files, with
inlining) and click on the column means to highlight the specific
file:line:column triple. That is, if it is possible.
```
```
Lovely. Can you implement highlighting for names, strings
like "NAME-testing.b" so that all uses of a variable or a temporary can
easily be seen?
```
Change-Id: I1ed97cd92cdae16d556e3334e543af37973799e5
Reviewed-on: https://go-review.googlesource.com/c/go/+/740563
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: t hepudds <thepudds1460@gmail.com>
Reviewed-by: Keith Randall <khr@google.com>
|
|
This was extraordinarily useful for inlining work.
I have cleaned it up somewhat, and did some additional tweaks
after working on changes to bloop.
-gcflags=-d=astdump=SomeFunc
-gcflags=-d=astdump=SomeSubPkg.SomeFunc
-gcflags=-d=astdump=Some/Pkg.SomeFunc
-gcflags=-d=astdump=~YourRegExpHere
Change-Id: I3f98601ca96c87d6b191d4b64b264cd236e6d8bf
Reviewed-on: https://go-review.googlesource.com/c/go/+/629775
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
|