| Age | Commit message (Collapse) | Author |
|
For instructions that clobber both of their input registers, make
sure we don't clobber the same register twice when both input
registers are the same.
This is rare, but it can happen.
Fixes #77604
Change-Id: I794249cf43a8cc4ab3262055daef9193e2442f73
Reviewed-on: https://go-review.googlesource.com/c/go/+/745621
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
|
|
Folding a 64-bit integer into a 32-bit constant may result in a negative
integer if the value exceeds math.MaxInt32 (the maximum value of a 32-
bit signed integer). This negative value will be sign-extended to 64
bits at runtime, leading to unexpected results when used in bitwise
AND/OR operations.
Fixes #77613
Change-Id: Idb081a3c20c28bddddcc8eff1225d62123b37a2d
Reviewed-on: https://go-review.googlesource.com/c/go/+/745581
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
|
|
When resolving ARNG type names, the base value was not subtracted
when calculating the variable simd_type, causing its actual value
to not match the expected meaning after the base value adjustment.
Fixes #77414
Change-Id: I713bab849ecdb5610d2593ba9bd9e1169842f00e
Reviewed-on: https://go-review.googlesource.com/c/go/+/742980
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: WANG Xuerui <git@xen0n.name>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
Reviewed-by: Meidan Li <limeidan@loongson.cn>
|
|
Ensure `go mod init` validates the module path even when it is inferred from GOPATH.
Fixes #73121
Change-Id: I8b7785ff57eec17bba432f48c8e3a18a2f92aab5
GitHub-Last-Rev: 8ff1ca2d71bee2b948f114ad1f0a4706a4c0b152
GitHub-Pull-Request: golang/go#76432
Reviewed-on: https://go-review.googlesource.com/c/go/+/723640
Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Sean Liao <sean@liao.dev>
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
|
|
Allow the MarshalJSONTo and UnmarshalJSONFrom methods
to return errors.ErrUnsupported to be skipped in a similar manner
to how the caller-specified functions can be skipped as well.
Note that the v1 MarshalJSON and UnmarshalJSON methods may not
return errors.ErrUnsupported as that would be a breaking change.
Also, we couldn't implement it for UnmarshalJSON since
that requires consuming the value, which changes the state of
the underlying jsontext.Decoder.
A side-effect of this change is that MarshalJSONTo and UnmarshalJSONFrom
methods may now return sentinel errors. We document that users
should avoid calling this methods directly and instead
rely on MarshalEncode and UnmarshalDecode,
which can handle the ErrUnsupported sentinel error and
others that we may add in the future.
Fixes #74324
Fixes #76712
Change-Id: I851e907ef8d25e31964148515879a243cb5069c5
Reviewed-on: https://go-review.googlesource.com/c/go/+/744941
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
|
|
These two code paths handle arguments internally used by the go command,
but CL 736710 removed all of their uses. Remove their handling code too.
Change-Id: I99f50ef4916f29e56f5d5aaeb3c48bae4bf0b74d
GitHub-Last-Rev: 0f109f2c48098c4ac5a8b695cead075f12e22e81
GitHub-Pull-Request: golang/go#77600
Reviewed-on: https://go-review.googlesource.com/c/go/+/745300
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Tony Tang <jianfeng.tony@gmail.com>
|
|
WARNING: This commit contains breaking changes
for those already using GOEXPERIMENT=jsonv2.
Existing users of SkipFunc should migrate to errors.ErrUnsupported,
for which support was added in at least one prior commit.
Updates #74324
Change-Id: Ifbdee39165a134a33ea0005bbc88df0df15f517f
Reviewed-on: https://go-review.googlesource.com/c/go/+/745041
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ethan Lee <ethanalee@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Nicholas Husin <husin@google.com>
|
|
Fixes #77509
Change-Id: I1b6b38f86e4c8b18dd7638b4dd8246e2993e8307
Reviewed-on: https://go-review.googlesource.com/c/go/+/745100
Reviewed-by: Sean Liao <sean@liao.dev>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
|
|
Enable PIE builds on linux/s390x when CGO is disabled by teaching
the linker to handle dynamic relocations against SDYNIMPORT
symbols.
This adds support for TLS_IE and handles R_CALL, R_PCRELDBL, and
R_ADDR relocations by generating the appropriate PLT/GOT entries
instead of rejecting them as unsupported.
Fixes #77449
Cq-Include-Trybots: luci.golang.try:gotip-linux-s390x
Change-Id: Ib6586780073fedbcbd42b9a2c554a99dd7386aa6
Reviewed-on: https://go-review.googlesource.com/c/go/+/742342
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Quim Muntal <quimmuntal@gmail.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
This change supports both errors.ErrUnsupported and SkipFunc.
In a future change, we will remove SkipFunc entirely in favor
of using errors.ErrUnsupported, which exists for a similar pupose.
Updates #74324
Change-Id: I5f1ada8e3914513d7d23c504f5965ca8dd95ad18
Reviewed-on: https://go-review.googlesource.com/c/go/+/745040
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>
Reviewed-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
|
|
Change-Id: I21a23870ba1917c72efaa6438f7cd32f6a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/745280
Reviewed-by: Junyang Shao <shaojunyang@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Mateusz Poliwczak <mpoliwczak34@gmail.com>
|
|
this method seems implements for the old span's memory layout,
and is not suitable for the new implements.
Change-Id: I30d274bc18f4af440b003ade6f9342038783fc8a
GitHub-Last-Rev: d8ac30e3ab32148ef7fd91df57a1590161124303
GitHub-Pull-Request: golang/go#77599
Reviewed-on: https://go-review.googlesource.com/c/go/+/745260
Reviewed-by: Tony Tang <jianfeng.tony@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>
|
|
goos: linux
goarch: amd64
pkg: net/netip
cpu: Intel(R) Core(TM) Ultra 9 285K
│ /tmp/BenchmarkPrefixString_before.txt │ /tmp/BenchmarkPrefixString_after.txt │
│ sec/op │ sec/op vs base │
PrefixString-24 33.70n ± 4% 16.28n ± 21% -51.69% (p=0.000 n=10)
│ /tmp/BenchmarkPrefixString_before.txt │ /tmp/BenchmarkPrefixString_after.txt │
│ B/op │ B/op vs base │
PrefixString-24 32.00 ± 0% 16.00 ± 0% -50.00% (p=0.000 n=10)
│ /tmp/BenchmarkPrefixString_before.txt │ /tmp/BenchmarkPrefixString_after.txt │
│ allocs/op │ allocs/op vs base │
PrefixString-24 2.000 ± 0% 1.000 ± 0% -50.00% (p=0.000 n=10)
Change-Id: Idc652368c227314ccc74309cded28f40b8d92d90
Reviewed-on: https://go-review.googlesource.com/c/go/+/744320
Auto-Submit: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
|
|
Add logic to exclude purely commented lines from coverage instrumentation.
When instrumenting Go code for coverage, the cover tool now identifies
and excludes lines that contain only comments from coverage blocks.
This prevents commented-out code from being reported as "uncovered"
in coverage reports, which can be misleading.
The implementation adds a splitBlockByComments function that parses
source code character by character to identify segments containing
executable code versus segments containing only comments. The
addCounters function now uses this to create coverage counters only
for segments that contain actual executable code.
The parser correctly handles:
- Single-line comments (//)
- Multi-line comments (/* */)
- String literals containing comment-like sequences
- Raw string literals with fake comments
- Mixed lines with both code and comments
This improves the accuracy of coverage reports by ensuring that
commented-out code, TODOs, and documentation comments don't inflate
the count of uncovered lines.
Fixes #22545
Change-Id: Ib428e6569011abb5f315387e81547147a2dadd2b
GitHub-Last-Rev: 915058146bb5f929f08d63ee191edebd51b2ab56
GitHub-Pull-Request: golang/go#76692
Reviewed-on: https://go-review.googlesource.com/c/go/+/726800
Reviewed-by: Alan Donovan <adonovan@google.com>
Auto-Submit: Alan Donovan <adonovan@google.com>
Reviewed-by: Nicholas Husin <husin@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
Most platforms share the same implementation for x_cgo_init and
crosscall1. Solaris diverges too much and is left for a future CL.
Cq-Include-Trybots: luci.golang.try:gotip-freebsd-amd64,gotip-darwin-amd64_14,gotip-darwin-arm64_15,gotip-netbsd-arm64,gotip-openbsd-ppc64,gotip-solaris-amd64,gotip-linux-ppc64_power10
Change-Id: Ib2eeb6456caa5c055e1ac1907c2fdf63db58dafc
Reviewed-on: https://go-review.googlesource.com/c/go/+/708035
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
|
|
Almost all pthread-related functions are exactly the same for Unix OSes.
Their implementation can be shared, taking into account the small
differences using standard predefined macros.
Cq-Include-Trybots: luci.golang.try:gotip-freebsd-amd64,gotip-darwin-amd64_14,gotip-darwin-arm64_15,gotip-netbsd-arm64,gotip-openbsd-amd64,gotip-openbsd-ppc64,gotip-solaris-amd64,gotip-linux-ppc64_power10
Change-Id: I8bee25f0619a5b315439cf12d94312c36c3e5a73
Reviewed-on: https://go-review.googlesource.com/c/go/+/707955
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
|
|
WARNING: This commit contains breaking changes
for those already using GOEXPERIMENT=jsonv2.
This removes support for the `unknown` tag option and
the DiscardUnknownMembers marshal option.
The `unknown` tag option semantics are a bit too subtle
even for experienced Go programmers to understand.
Remove support for it. The exact same feature (or something similar)
can be added back into a future release of json/v2.
We already support the `inline` tag option,
which can handle most cases of what someone might want to do
with unknown fields (such as preserve them).
Fixes #77271
Updates #76444
Change-Id: I875952f0755e58aac4c571869b2cdb56e75cfda9
Reviewed-on: https://go-review.googlesource.com/c/go/+/741320
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
|
|
Fixes #50888
Change-Id: I2691442d7fccd716cd19939cf3931317e21ee4ed
Reviewed-on: https://go-review.googlesource.com/c/go/+/743060
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
|
|
Fixes #77385
Change-Id: I7e7ddb1c71f0aebd893f640d476b273e229b059a
Reviewed-on: https://go-review.googlesource.com/c/go/+/743040
Reviewed-by: Ian Lance Taylor <iant@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
|
|
When build information is not needed for go list output (when -export=false and Stale and StaleReason fields are not printed), the "SuppressBuildInfo" option is set to true, so that cmd/go/internal/load does not collect it (in particular VCS information, which is costly to compute).
However the option is only checked in "PackagesAndErrors", not in "TestPackagesAndErrors", so when running go list -test=true, build information is still collected, significantly increasing the duration of the command.
This CL updates TestPackagesAndErrors to check SuppressBuildInfo before calling setBuildInfo, like PackagesAndErrors does.
Fixes #77419
Change-Id: I13f60d179c26d79d94899498f76ba9093566eeb6
Reviewed-on: https://go-review.googlesource.com/c/go/+/740901
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Ian Alexander <jitsu@google.com>
Auto-Submit: Ian Alexander <jitsu@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Sean Liao <sean@liao.dev>
|
|
When the field is parsed from a file, it would never
have len(servers) == 0, lets enforce that and update
test cases where we had it wrong.
Change-Id: I7fa6ebcf63b9fe20fbbf791113ca948d6a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/743020
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Sean Liao <sean@liao.dev>
|
|
Fixes #77483
Change-Id: Ie772ce1619beadc1a6db87aaf28a8d9c31f7d1b8
Reviewed-on: https://go-review.googlesource.com/c/go/+/742860
Reviewed-by: Junyang Shao <shaojunyang@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Alexander <jitsu@google.com>
Reviewed-by: Sean Liao <sean@liao.dev>
Reviewed-by: Ian Alexander <jitsu@google.com>
Auto-Submit: Sean Liao <sean@liao.dev>
|
|
Change-Id: Ibfdc79d94f5406e2e387b75163f26d2ab0f207f9
Reviewed-on: https://go-review.googlesource.com/c/go/+/741580
Reviewed-by: Junyang Shao <shaojunyang@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
|
|
Change-Id: I1aac166aea4f907a7fb93028a39ef9d1e3888c9c
Reviewed-on: https://go-review.googlesource.com/c/go/+/743800
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: abner chenc <chenguoqi@loongson.cn>
|
|
Keep the issue body generated by go bug in the same order as the
GitHub bug form: what happened first, then what was expected.
This updates the footer headings and replaces the old
"What did you see instead?" wording.
Fixes #77488.
Change-Id: Id20d68c1e109abb0d0397a7522fea91c5f2f3609
GitHub-Last-Rev: fa463a42a13cb1ad2ab33675ea2eefaa337e11c7
GitHub-Pull-Request: golang/go#77500
Reviewed-on: https://go-review.googlesource.com/c/go/+/743162
Reviewed-by: Junyang Shao <shaojunyang@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
|
|
The sdom tree has a feature where the ordering of child nodes could be
customized, but in actuality, we only ever used one ordering: reverse
postorder. This order has a nice property that walking the tree will
always visit the source block of any non-retreating edge before the
destination block.
Make this ordering the default and document it. This allows passes that
use it to use the cached sdom tree instead of calculating it from
scratch each time.
Change-Id: I907b8ff7cc722e94bf364c183f26ead66a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/742340
Reviewed-by: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
|
|
There is no need to have two sets of the same slices.
The names are chosen to be the same as in ../imports.
Change-Id: I92dca46127e25b5226cce3cc11749cd5957ad609
Reviewed-on: https://go-review.googlesource.com/c/go/+/718800
Reviewed-by: Sean Liao <sean@liao.dev>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Sean Liao <sean@liao.dev>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
|
|
When creating a dynamically-sized slice, the compiler attempts to use a
stack-allocated buffer if the slice does not escape and its buffer size
is ≤ 32 bytes.
In this case, the SSA will contain a (OpPhi (OpSliceMake) (OpSliceMake))
value: one OpSliceMake uses the stack-allocated buffer, and the other
uses the heap-allocated buffer. The len and cap arguments for these two
OpSliceMake values are expected to be identical.
This CL enables the prove pass to recognize this scenario and handle
OpSliceLen and OpSliceCap as intended.
Fixes #77375
Change-Id: Id77a2473caf66d366f5c94108aa6cb6d3df5b887
Reviewed-on: https://go-review.googlesource.com/c/go/+/740840
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
|
|
Remove the "NewBulk too big" check that prevented bulk bit vector
allocations exceeding ~2GB. This limit was overly restrictive and
caused compilation failures for large generated code.
The actual constraint is in the runtime's stackmap reader, which uses
int32 arithmetic. Add overflow checks in cmd/compile/internal/liveness
before stackmap serialization to detect this condition, allowing
NewBulk itself to allocate bulk large bit vector.
Fixes #77170
Change-Id: Ib7f2cabb28683258fc4e85418ba7fa70b48620b0
Reviewed-on: https://go-review.googlesource.com/c/go/+/736240
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
|
|
SecP256r1MLKEM768 appeared twice while the second should have been
SecP384r1MLKEM1024.
Change-Id: I0587b53248d2948fe7a33313871c39fe76251e9c
GitHub-Last-Rev: de535819a33347feacfaa32d984ce58d206613d0
GitHub-Pull-Request: golang/go#77551
Reviewed-on: https://go-review.googlesource.com/c/go/+/744481
Reviewed-by: Junyang Shao <shaojunyang@google.com>
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net>
Auto-Submit: Roland Shoemaker <roland@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
|
|
There is nothing particularly special about content-addressable
symbols, it's just a place to start.
This reduces the size of the tailscaled binary by about 16K.
This happens mainly because before this CL the linker's symalign
function kicks in for all static composite literals and PCDATA symbols,
and gives them an alignment based on their size. If the size happens
to be a multiple of 32, it gets an alignment of 32.
That wastes space.
For #6853
For #36313
Change-Id: I2f049eee8f2463dd2b5e20d7c9a270ac32a31e50
Reviewed-on: https://go-review.googlesource.com/c/go/+/727920
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
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>
|
|
This change introduces a new SSA pass that converts conditionals
with logical AND into CMP/CCMP instruction sequences on ARM64.
Fixes #71268
Change-Id: I3eba9c05b88ed6eb70350d30f6e805e6a4dddbf1
Reviewed-on: https://go-review.googlesource.com/c/go/+/698099
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
|
|
When handling type descriptors, we add some space at the start
to ensure that offset 0 does not refer to a valid type descriptor.
AIX has an initial runtime.types symbol with a non-zero size,
so we used that instead of adding some space.
In some cases Darwin also has a runtime.types symbol with a non-zero size.
Before CL 727021, this was always fine, because the 8 byte size of
runtime.types was swamped by the 32-byte alignment of type descriptors.
That didn't work for AIX with the external linker, because on AIX the
external linker lays out each symbol separately. Darwin doesn't have
that problem, so the layout of the internal linker was preserved.
However, CL 727021 changed the alignment of type descriptors to 8.
That means that on Darwin the 8 byte size of runtime.types was no
longer hidden by the alignment. In effect we were skipping twice:
once for runtime.types, and then again explicitly. This only failed
when runtime.types has a non-zero size, which is only in a few
specific cases.
This CL cleans this up by not skipping explicitly in any case
where runtime.types has a non-zero size. That handles both AIX
and Darwin consistently.
To make this clearer, I changed the skip from a single byte to
the size of a pointer in all cases.
I considered always giving runtime.types a non-zero size,
but that is a bigger change, and potentially confusing since
there really isn't any data associated with runtime.types.
The cases where we must give it a non-zero size are special,
and I think it's simpler to keep it that way.
For #6853
For #36313
Fixes #77569
Change-Id: I22ebbd0194527ecca96d48849aa00a4fc899e55c
Reviewed-on: https://go-review.googlesource.com/c/go/+/744820
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
|
|
This is a step towards deferring adding the handle to IOCP until the
first IO operation.
FD.pollable() obscures the fact that it is really checking if the handle
is associated with the IOCP. This doesn't need to be a function that
checks multiple conditions. It can be a simple boolean field that tracks
whether the handle is associated with the IOCP or not.
For #76391
Cq-Include-Trybots: luci.golang.try:gotip-windows-amd64-longtest,gotip-windows-amd64-race
Change-Id: I3ee6532f8a387fb5cfae8ae3d20ea9569f585e71
Reviewed-on: https://go-review.googlesource.com/c/go/+/742282
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
|
|
This is a step towards deferring adding the handle to IOCP until the
first IO operation.
There is a small race windows between execIO and DisassociateIOCP where
execIO checks if the fd is disassociated before passing the operation to
the OS. DisassociateIOCP can set the disassociated flag right after that
check but before Windows started processing the IO operation. Once
Windows takes over, the race doesn't matter anymore because Windows
doesn't allow disassociating a handle that has pending IO operations.
If that still hasn't happened, an overlapped IO operation will start
assuming the they can be waited using the Go runtime IOCP, which is
wrong due to the disassociation, leading to undefined behavior.
Fix that race by trying to take a write/read lock in DisassociateIOCP
before setting the disassociated flag, but failing if there is an
ongoing execIO operation so that DisassociateIOCP doesn't block
indefinitely waiting for execIO to finish.
For #76391
Cq-Include-Trybots: luci.golang.try:gotip-windows-amd64-longtest,gotip-windows-amd64-race
Change-Id: Iec265fa1900383aace50051d2be750bc76aa0944
Reviewed-on: https://go-review.googlesource.com/c/go/+/741020
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>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
|
|
Conservatively scan the extended register state when GC scans
asynchronously preempted goroutines. This ensures that any pointers
that appear only in vector registers at preemption time are kept alive.
Using vector registers for small memory moves may load pointers into
these registers. If async preemption occurs mid-move, with no write
barrier (e.g., heap-to-stack copies) and the source register clobbered
or source memory modified by a racing goroutine, the pointer may exist
only in the vector register. Without scanning this state, GC could miss
live pointers.
This addresses concerns raised in CL 738261 and enables safe use of
vector registers for operations that may involve pointers.
Change-Id: I5f5ce98d6ed6f7cde34b33da0aea1f880c2fcf41
Reviewed-on: https://go-review.googlesource.com/c/go/+/740681
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
|
|
Ref: https://github.com/riscv-non-isa/riscv-elf-psabi-doc/issues/114
Fixes #77209
Change-Id: I8b575a95ad4e6a7e792514d7fcf9497599c1e404
Reviewed-on: https://go-review.googlesource.com/c/go/+/737180
Reviewed-by: Pengcheng Wang <wangpengcheng.pp@bytedance.com>
Reviewed-by: Quim Muntal <quimmuntal@gmail.com>
TryBot-Bypass: Meng Zhuo <mengzhuo1203@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
|
|
This trivial change reduces the size of cmd/go by 88K.
For #6853
For #36313
Change-Id: I5e74acf118bd1c63cbdd256879d8aa8d72a50505
Reviewed-on: https://go-review.googlesource.com/c/go/+/727021
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
|
|
This will permit the compiler and assembler to specify the alignment
of symbols that they create.
Careful placement of the new field, plus rearranging an existing field,
means that LSym does not change size (as tested by TestSizeof).
The new alignment field is int16, permitting alignment up to 16384,
more than we ever need in practice. If necessary we could change the
field to uint8 and store the alignment as a power of two,
as is done in the linker.
This replaces the Align field in FuncInfo.
For #6853
For #36313
Change-Id: I421e8238ab57958fea8e4eab0649ce5288e7f92f
Reviewed-on: https://go-review.googlesource.com/c/go/+/727020
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Keith Randall <khr@google.com>
|
|
Calls to Go functions from threads not started by Go have to wait
for Go initialization to be complete. Before this CL they did this
by receiving from a channel that is closed when initialization is done.
That works well but introduces a channel operation into cgo calls.
This is particularly frustrating because the channel is approximately
always closed.
This CL adds an atomic bool before the channel, so that in the normal
case we are just adding a single locked memory load. We still use
the channel as a fallback.
For #77522
Change-Id: I8f609bf349bb0f836cefa5f6ad6d0c3c7bbfe5e0
Reviewed-on: https://go-review.googlesource.com/c/go/+/743940
Reviewed-by: Keith Randall <khr@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>
|
|
When we are about to enter a loop, we try to put values that will
be used soon into registers, so we put them into registers once outside
the loop instead of N times inside the loop.
But we currently don't kick out values we won't use for a while to
make room. This CL does that. So even if register pressure is large
around the loop, we can still use registers for all the in-loop
values. The values generating the register pressure, but not used
inside the loop, will get spilled around the loop.
This is particularly useful for Phi arguments. We want to promote
from fixed zero registers or other rematerializeable values to
a general register before the loop starts.
Fixes #77299
Change-Id: I00efc3d3014163aaf377693830c7d7957eaa515f
Reviewed-on: https://go-review.googlesource.com/c/go/+/743640
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
|
|
Provide an optimised assembly implementation of sha1 for riscv64.
goos: linux
goarch: riscv64
pkg: crypto/sha1
cpu: Spacemit(R) X60
│ oldsha1 │ newsha1 │
│ sec/op │ sec/op vs base │
Hash8Bytes/New-8 2.136µ ± 0% 1.173µ ± 0% -45.09% (p=0.000 n=8)
Hash8Bytes/Sum-8 2.079µ ± 0% 1.116µ ± 0% -46.32% (p=0.000 n=8)
Hash320Bytes/New-8 10.704µ ± 0% 4.954µ ± 0% -53.72% (p=0.000 n=8)
Hash320Bytes/Sum-8 10.645µ ± 0% 4.872µ ± 0% -54.23% (p=0.000 n=8)
Hash1K/New-8 29.66µ ± 0% 13.38µ ± 0% -54.90% (p=0.000 n=8)
Hash1K/Sum-8 29.63µ ± 0% 13.24µ ± 0% -55.32% (p=0.000 n=8)
Hash8K/New-8 226.8µ ± 1% 104.7µ ± 2% -53.84% (p=0.000 n=8)
Hash8K/Sum-8 226.7µ ± 1% 102.9µ ± 1% -54.62% (p=0.000 n=8)
geomean 19.72µ 9.387µ -52.40%
│ oldsha1 │ newsha1 │
│ B/s │ B/s vs base │
Hash8Bytes/New-8 3.572Mi ± 0% 6.504Mi ± 0% +82.11% (p=0.000 n=8)
Hash8Bytes/Sum-8 3.672Mi ± 0% 6.838Mi ± 0% +86.23% (p=0.000 n=8)
Hash320Bytes/New-8 28.51Mi ± 0% 61.60Mi ± 0% +116.02% (p=0.000 n=8)
Hash320Bytes/Sum-8 28.67Mi ± 0% 62.64Mi ± 0% +118.51% (p=0.000 n=8)
Hash1K/New-8 32.92Mi ± 0% 73.00Mi ± 0% +121.74% (p=0.000 n=8)
Hash1K/Sum-8 32.96Mi ± 0% 73.76Mi ± 0% +123.78% (p=0.000 n=8)
Hash8K/New-8 34.44Mi ± 1% 74.61Mi ± 2% +116.61% (p=0.000 n=8)
Hash8K/Sum-8 34.46Mi ± 1% 75.93Mi ± 1% +120.37% (p=0.000 n=8)
geomean 18.51Mi 38.89Mi +110.07%
Change-Id: I3d4d05fe19872412fdf77a337395e0bf84c41dd5
Reviewed-on: https://go-review.googlesource.com/c/go/+/732560
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Joel Sing <joel@sing.id.au>
|
|
CL 688335 accidentally introduced a blank line between the Profile doc
comment and the type definition, causing the entire doc to get dropped.
Change-Id: I97b1c0e57d142d7caea6e543a0138ed6dcd1c3fe
Reviewed-on: https://go-review.googlesource.com/c/go/+/743660
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Auto-Submit: Austin Clements <austin@google.com>
|
|
The finalPermutation array operates on a 64-bit preoutput block,
not a 4-bit block. This updates the comment to accurately
reflect the size of the data being processed in the DES
algorithm's final permutation step.
Change-Id: Ib6a5828a2e72d8bc8d04a3d413eaac320c15df15
Reviewed-on: https://go-review.googlesource.com/c/go/+/730020
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
|
|
Change-Id: Ia80dd969a2033328692d337ececef4e13986aa88
Reviewed-on: https://go-review.googlesource.com/c/go/+/726381
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net>
Reviewed-by: Neal Patel <nealpatel@google.com>
Auto-Submit: Roland Shoemaker <roland@golang.org>
Reviewed-by: Nicholas Husin <husin@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
From Cherry Mui on the CL review:
The reason why we need race instrumentation is tricky. The runtime
package is not compiled with race instrumentation, therefore the race
detector doesn't know about synchronizations within the runtime, and
usually it doesn't care, as it also doesn't know about the concurrent
data accesses in the runtime.
However, in this case the concurrent access is in a map. Map accesses
are always instrumented
https://cs.opensource.google/go/go/+/master:src/internal/runtime/maps/runtime_fast64.go;l=25,
even if the map is defined in the runtime. So the race detector does see
the concurrent access. But it doesn't see the synchronization. So this
CL adds them.
Go maps are not common in the runtime. But I recall an issue like this
did occur. Maybe we could make the compiler/runtime not to instrument
map accesses for maps defined in the runtime (which would be a more
involved change).
---
The reproducer in src/runtime/testdata/testprog/typelinksrace.go was
provided by Cherry Mui.
Change-Id: I03b27c51b7278ee4b2939a1a0665169966999b33
Reviewed-on: https://go-review.googlesource.com/c/go/+/742740
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
|
|
As opposed to old style (*[1 << 16]T(p)[:n:n].
Change-Id: I6836f87741a2e2f6cef34f87cc839d15e309cc67
Reviewed-on: https://go-review.googlesource.com/c/go/+/726401
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
|
|
Change-Id: I4ecfda9f85b00a228e8cf51d7ff4457ef7f83ce5
Reviewed-on: https://go-review.googlesource.com/c/go/+/726160
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
goos: linux
goarch: loong64
pkg: time
cpu: Loongson-3A6000 @ 2500.00MHz
| old.txt | new.txt |
| sec/op | sec/op vs base |
Now 34.82n ± 0% 34.24n ± 0% -1.67% (p=0.000 n=10)
NowUnixNano 35.44n ± 0% 35.82n ± 0% +1.07% (p=0.000 n=10)
NowUnixMilli 36.05n ± 0% 34.24n ± 0% -5.02% (p=0.000 n=10)
NowUnixMicro 36.83n ± 0% 34.83n ± 0% -5.43% (p=0.000 n=10)
geomean 35.78n 34.78n -2.80%
Change-Id: I6ab143b61dbf94c91df2e9dfb80ec9b908219825
Reviewed-on: https://go-review.googlesource.com/c/go/+/741380
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: sophie zhao <zhaoxiaolin@loongson.cn>
Reviewed-by: Meidan Li <limeidan@loongson.cn>
|
|
Also recommend os.Root for constraining access.
Fixes #77447
Change-Id: Id8d178163438e9264fe19ed37ba03e1ee5d0bd35
Reviewed-on: https://go-review.googlesource.com/c/go/+/742284
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
|