| Age | Commit message (Collapse) | Author |
|
In the environment where GOMAXPROCS set explicitly, for example to 3 in
shell profile, the runtime tests will fail with the following error,
----
ok regexp/syntax 0.428s
--- FAIL: TestCgroupGOMAXPROCS (0.81s)
crash_test.go:186: running /home/ms/src/go/bin/go build -o /tmp/go-build1753772192/testprog.exe
crash_test.go:208: built testprog in 796.664277ms
--- FAIL: TestCgroupGOMAXPROCS/containermaxprocs=0 (0.00s)
cgroup_linux_test.go:60: /tmp/go-build1753772192/testprog.exe PrintGOMAXPROCS (907.06µs): ok
cgroup_linux_test.go:63: output got "3\n" want "4\n"
--- FAIL: TestCgroupGOMAXPROCSNoLimit (0.00s)
cgroup_linux_test.go:82: /tmp/go-build1753772192/testprog.exe PrintGOMAXPROCS (879.194µs): ok
cgroup_linux_test.go:85: output got "3\n" want "4\n"
--- FAIL: TestCgroupGOMAXPROCSHigherThanNumCPU (0.00s)
cgroup_linux_test.go:102: /tmp/go-build1753772192/testprog.exe PrintGOMAXPROCS (852.396µs): ok
cgroup_linux_test.go:105: output got "3\n" want "4\n"
--- FAIL: TestCgroupGOMAXPROCSRound (0.01s)
--- FAIL: TestCgroupGOMAXPROCSRound/50000 (0.00s)
cgroup_linux_test.go:156: /tmp/go-build1753772192/testprog.exe PrintGOMAXPROCS (852.099µs): ok
cgroup_linux_test.go:159: output got "3\n" want "2\n"
--- FAIL: TestCgroupGOMAXPROCSRound/100000 (0.00s)
cgroup_linux_test.go:156: /tmp/go-build1753772192/testprog.exe PrintGOMAXPROCS (894.001µs): ok
cgroup_linux_test.go:159: output got "3\n" want "2\n"
--- FAIL: TestCgroupGOMAXPROCSRound/150000 (0.00s)
cgroup_linux_test.go:156: /tmp/go-build1753772192/testprog.exe PrintGOMAXPROCS (850.897µs): ok
cgroup_linux_test.go:159: output got "3\n" want "2\n"
--- FAIL: TestCgroupGOMAXPROCSSchedAffinity (0.00s)
cgroup_linux_test.go:229: /tmp/go-build1753772192/testprog.exe PrintGOMAXPROCS (867.987µs): ok
cgroup_linux_test.go:232: output got "3\n" want "2\n"
FAIL
FAIL runtime 23.088s
----
This changes exclude the GOMAXPROCS when building program for testing so it
does not affect the tests.
|
|
|
|
Fixes #77404
Change-Id: I0402becb94855baf942d6ba3815cc2a3c1526d6e
Reviewed-on: https://go-review.googlesource.com/c/go/+/740921
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
|
|
CL 734980 swapped use of Type.Underlying() in Checker.hasVarSize for
traversal of Named.fromRHS. It forgot to call Named.unpack() before
inspecting Named.fromRHS, allowing access of unexpanded instantiated
types.
These unexpanded instantiated types are then mistakenly marked as having
fixed size, which fails assertions downstream. This change adds the
missing Named.unpack() call and swaps direct access of Named.fromRHS for
Named.rhs(), which verifies such access in debug mode.
Fixes #77382
Change-Id: I324bbbbf790f8b09e95902ebe67f775483f88417
Reviewed-on: https://go-review.googlesource.com/c/go/+/740620
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
mapaccess2*
mapaccess1* and mapaccess2* functions share the same implementation and differ only in whether the boolean "found" is returned.
This change replaces mapaccess1* calls with mapaccess2*.
We can do this transparently, since the call site can safely discard the second (boolean) result.
Ideally, mapacces1* functions could be removed entirely, but this change keeps them as thin wrappers for compatibility.
Fixes #73196
Change-Id: I07c3423d22ed1095ac3666d00e134c2747b2f9c1
Reviewed-on: https://go-review.googlesource.com/c/go/+/736020
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
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@golang.org>
|
|
This is a step towards deferring adding the handle to IOCP until the
first IO operation.
The goal of this CL is to avoid the fd.isBlocking check in fd.pin,
which was happening outside execIO, and making buffer pinning less
error-prone.
This also fixes an issue where buffer used in Pwrite and WriteTo
were unpinned too early when the write buffer was larger than the
maximum chunk size.
For #76391
Cq-Include-Trybots: luci.golang.try:gotip-windows-amd64-longtest,gotip-windows-amd64-race
Change-Id: Ia181dcb57a559ae466a4341c36a307ad6678aac0
Reviewed-on: https://go-review.googlesource.com/c/go/+/740561
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.
The main goal of this CL is to remove the fd.pollable() check in
cancelIO.
For #76391
Cq-Include-Trybots: luci.golang.try:gotip-windows-amd64-longtest,gotip-windows-amd64-race
Change-Id: I76263ce12980297d88a5f6c514e4074dfee428cb
Reviewed-on: https://go-review.googlesource.com/c/go/+/740540
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>
|
|
The code previously filters out VAES-only instructions, this CL added
them back.
This CL added the VAES feature check following the Intel xed data:
XED_ISA_SET_VAES: vaes.7.0.ecx.9 # avx.1.0.ecx.28
This CL also found out that the old AVX512VAES feature check is not
checking the correct bits, it also fixes it:
XED_ISA_SET_AVX512_VAES_128: vaes.7.0.ecx.9 aes.1.0.ecx.25 avx512f.7.0.ebx.16 avx512vl.7.0.ebx.31
XED_ISA_SET_AVX512_VAES_256: vaes.7.0.ecx.9 aes.1.0.ecx.25 avx512f.7.0.ebx.16 avx512vl.7.0.ebx.31
XED_ISA_SET_AVX512_VAES_512: vaes.7.0.ecx.9 aes.1.0.ecx.25 avx512f.7.0.ebx.16
It restricts to the most strict common set - includes avx512vl for even
512-bits although it doesn't requires it.
Change-Id: I4e2f72b312fd2411589fbc12f9ee5c63c09c2e9a
Reviewed-on: https://go-review.googlesource.com/c/go/+/738500
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
These symbols are part of the scan package, so they should include the
package name in the symbol name for consistency.
Change-Id: I6a6a636ca63b34a8da7fb2f0bfe1fa5f8672fff5
Reviewed-on: https://go-review.googlesource.com/c/go/+/738522
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
An index expression can also go from map[K]V to V. Since V could be
incomplete (due to some admittedly contrived syntax), we need a
check.
Change-Id: I03ffbfc0e5bcc9129591d60dfbaa5fafcf8fb183
Reviewed-on: https://go-review.googlesource.com/c/go/+/737620
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Mark Freeman <markfreeman@google.com>
|
|
This change establishes the invariant that Underlying() cannot observe
a nil RHS for a defined type, unless that type was created by go/types
with an explicitly nil underlying type.
It does so using isComplete, which is a guard to check that a type has
an underlying type. This guard is needed whenever we could produce a
value of a defined type or access some property of a defined type.
Examples include T{}, *x (where x has type *T), T.x, etc. (see CL
734600 for more).
The pendingType mechanism to deeply traverse values of a defined type
is moved to hasVarSize, since this is only truly needed at the site
of a built-in such as unsafe.Sizeof.
This ties cycle detection across value context directly to the syntax,
which seems like the right direction.
Change-Id: Ic47862a2038fb2ba3ae6621e9907265ccbd86ea3
Reviewed-on: https://go-review.googlesource.com/c/go/+/734980
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Mark Freeman <markfreeman@google.com>
|
|
Change-Id: I87ae45657a9bae85b0fbf52692f15552a2987847
Reviewed-on: https://go-review.googlesource.com/c/go/+/738941
Reviewed-by: Junyang Shao <shaojunyang@google.com>
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
We're finding some regressions in overall icache footprint at scale and
we should figure out how to deal with those before rolling this out to
everybody.
Change-Id: I98e792db31712bf64575d76dfeafedb48898f76a
Reviewed-on: https://go-review.googlesource.com/c/go/+/738780
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
|
|
For #76472.
Change-Id: Ia51b41639637b1de916625e73c26f625382be305
Reviewed-on: https://go-review.googlesource.com/c/go/+/736441
Reviewed-by: Alan Donovan <adonovan@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Commit-Queue: Robert Griesemer <gri@google.com>
|
|
internal/runtime/math.Mul64 is a copy of math/bits.Mul64 and redundant.
Change-Id: I4dd2ab531a32da97839c6b45cf90df6430811967
GitHub-Last-Rev: 1a73e16049ee346ccfa8f052856e49e10e202d70
GitHub-Pull-Request: golang/go#77187
Reviewed-on: https://go-review.googlesource.com/c/go/+/736500
Auto-Submit: Keith Randall <khr@google.com>
Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
Fixes #6814.
Change-Id: I659670998f8e89400d03d40189e8c54f7e705cdc
Reviewed-on: https://go-review.googlesource.com/c/go/+/738040
Reviewed-by: Alan Donovan <adonovan@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Griesemer <gri@google.com>
|
|
Go 1.27 is in the process of being opened for development (to be
eventually released). This change marks the very beginning of its
development cycle, updating the Version value accordingly.
For #40705.
For #76474.
Change-Id: Id64ac75e6727715c32a842501b4318281dd8998f
Reviewed-on: https://go-review.googlesource.com/c/go/+/737960
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
|
|
This change causes the "x is not a type" diagnostic to describe
x's actual kind, helping to reveal when shadowing is at work.
(The kind description could improve other errors too.)
Fixes #76877
Change-Id: Ia3484998bb384ff570c20b6792cf8461c60aa38c
Reviewed-on: https://go-review.googlesource.com/c/go/+/731180
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Alan Donovan <adonovan@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Robert Griesemer <gri@google.com>
|
|
net/url does not currently limit the number of query parameters parsed by
url.ParseQuery or URL.Query.
When parsing a application/x-www-form-urlencoded form,
net/http.Request.ParseForm will parse up to 10 MB of query parameters.
An input consisting of a large number of small, unique parameters can
cause excessive memory consumption.
We now limit the number of query parameters parsed to 10000 by default.
The limit can be adjusted by setting GODEBUG=urlmaxqueryparams=<n>.
Setting urlmaxqueryparams to 0 disables the limit.
Thanks to jub0bs for reporting this issue.
Fixes #77101
Fixes CVE-2025-61726
Change-Id: Iee3374c7ee2d8586dbf158536d3ade424203ff66
Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/3020
Reviewed-by: Nicholas Husin <husin@google.com>
Reviewed-by: Neal Patel <nealpatel@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/736712
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>
|
|
Currently, all FMA operations are marked as requiring AVX512, even on
smaller vector widths. This is happening because the narrower FMA
operations are marked as extension "FMA" in the XED. Since this
extension doesn't start with "AVX", we filter them out very early in
the XED process. However, this is just a quirk of naming: the FMA
feature depends on the AVX feature, so it is part of AVX, even if it
doesn't say so on the tin.
Fix this by accepting the FMA extension and adding FMA to the table of
CPU features. We also tweak internal/cpu slightly do it correctly
enforces that the logical FMA feature depends on both the FMA and AVX
CPUID flags.
This actually *deletes* a lot of generated code because we no longer
need the AVX-512 encoding of these 128- and 256-bit operations.
Change-Id: I744a18d0be888f536ac034fe88b110347622be7e
Reviewed-on: https://go-review.googlesource.com/c/go/+/736160
Auto-Submit: Austin Clements <austin@google.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/736201
Reviewed-by: Austin Clements <austin@google.com>
|
|
Exposition is also added to outline a difference between syntax which
can / cannot produce values of incomplete types.
For us to enforce non-nilness of type RHS and remove the pending type
mechanism, I suspect we would need to add completeness guards to
the syntax which *can*.
Enforcing non-nilness of type RHS currently breaks the below test
cases, but I suspect that is simply an implementation artifact.
In other words, they just call Underlying at a bad time.
- T0
- T3
- T6 / T7
- T10
- T12
If we also remove pendingType, all of these test cases break; again,
we would need guards in the appropriate syntax logic.
Change-Id: Ibe22042232e542de1d38b923dd1d5cc50dce08cb
Reviewed-on: https://go-review.googlesource.com/c/go/+/734600
TryBot-Bypass: Mark Freeman <markfreeman@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Mark Freeman <markfreeman@google.com>
|
|
Correct the wording in the error message returned by readFileHeader when
encountering a meta-data file with an unsupported version.
Change-Id: I49be1bb1509ccc64e8384103bd7f19382b536c26
GitHub-Last-Rev: 2ab8e05a21443c45635e42d788946bec2478ca99
GitHub-Pull-Request: golang/go#76981
Reviewed-on: https://go-review.googlesource.com/c/go/+/732581
Reviewed-by: Roland Shoemaker <roland@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@golang.org>
|
|
This is a pain to test.
Also the original test was never executed, because it was wrong.
It looks like processors that might lack this features
include Intel 11th generation and AMD Zen 4. These might
or might not have bit 2 set in the 7th cpuid "leaf" (SM4)
which is what the incorrect test was checking; the bug
is triggered by ^VNNI & SM4. Apparently the SM4 bit is
not usually set, else we would have seen a test failure.
The "Lion Cove" microarchitecture (Arrow Lake, Lunar Lake)
appears to trigger this problem, it's not clear if there are
others. It was hard to verify this from online information.
Fixes #76881.
Change-Id: I21be6b4f47134d81e89799b0f06f89fcb6563264
Reviewed-on: https://go-review.googlesource.com/c/go/+/731240
TryBot-Bypass: David Chase <drchase@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
|
|
Currently the trace summarization incorrectly handles GoUndetermined by
treating it too much like GoNotExist. In particular, it should be
accumulating all the time since the start of the trace in a particular
bucket, but it doesn't, so that instead gets counted as "unknown time"
because the "creation time" is at the start of the trace.
This change fixes the problem by simply doing the accumulation. It's
very straightforward. It also side-steps some other inaccuracies, like
associating a goroutine that is being named with the current task. I
don't think this can ever actually happen in practice, but splitting up
the two cases, GoUndetermined and GoNotExist, fixes it.
Fixes #76716.
Change-Id: I3ac1557044f99c92bada2cb0e124b2192b1d6ebb
Reviewed-on: https://go-review.googlesource.com/c/go/+/728822
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Nick Ripley <nick.ripley@datadoghq.com>
|
|
Fixes #76769
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest
Change-Id: I16b0e9463e2e10ee5a6f20967fb6377b6a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/729180
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: David Chase <drchase@google.com>
|
|
VZEROUPPER at the end of FilterNilAVX512 as we're leaving AVX
context. Also explicitly zero Z15, as the high bits are not
guaranteed zero as of CL 728240.
Change-Id: I000a199206d0b8fd4905c8a699e934551bbd3c60
Reviewed-on: https://go-review.googlesource.com/c/go/+/728740
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
Each type must be representable by a finite amount of Go source code
after replacing all alias type names, value names, and embedded
interfaces (per #56103) with the RHS from their respective declarations
("expansion"); otherwise the type is invalid.
Furthermore, each type must have a finite size.
Checking for finite source after expansion is handled in decl.go.
Checking for finite size is handled in validtype.go and is delayed to
the end of type checking (unless used in unsafe.Sizeof, in which case
it is computed eagerly).
We can only construct values of valid types. Thus, while a type is
pending (on the object path and thus not yet valid), it cannot construct
a value of its own type (directly or indirectly).
This change enforces the indirect case by validating each type at value
observance (and hence upholding the invariant that values of only valid
types are created). Validation is cached on Named types to avoid
duplicate work.
As an example, consider:
type A [unsafe.Sizeof(B{})]int
type B A
Clearly, since there are no aliases, A and B have finite source. At the
site of B{}, B will be checked for finite size, recursing down the
values of B, at which point A is seen. Since A is on the object path,
there is a cycle preventing B from being proven valid before B{},
violating our invariant.
Note that this change also works for generic types.
Fixes #75918
Fixes #76478
Change-Id: I76d493b5da9571780fed4b3c76803750ec184818
Reviewed-on: https://go-review.googlesource.com/c/go/+/726580
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Mark Freeman <markfreeman@google.com>
|
|
These tests are just too flaky and I don't have the time to fix them
right now. I also am thinking to just change how trace experiments work,
so it may not be worth taking the time to fix them.
For #70838.
Change-Id: Ia896215a0cbeccac99b73fefc836088f43530849
Reviewed-on: https://go-review.googlesource.com/c/go/+/728122
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
When enabling DIT on ARM64, add speculation barrier instructions to
ensure that subsequent instructions are executed using the updated
DIT state.
See https://developer.apple.com/documentation/xcode/writing-arm64-code-for-apple-platforms#Enable-DIT-for-constant-time-cryptographic-operations
which recommends doing this. The Arm documentation for DIT doesn't tell
you to do this, but it seems prudent.
Change-Id: Idbc87b332650a77b8cb3509c11377bf5c724f3cf
Reviewed-on: https://go-review.googlesource.com/c/go/+/726980
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
|
|
The probeSeq doc comment describes the probe sequence as triangular and
gives the formula for terms in the sequence. This formula isn't actually
used in the code, though. List the first few terms of the sequence
explicitly so the connection between the description and the code is
more clear.
Change-Id: I6a6a69648bc94e15df436815c16128ebef3c6eb8
Reviewed-on: https://go-review.googlesource.com/c/go/+/726820
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
|
|
Both CL 723241 and CL 723581 added identical definitions.
Change-Id: I6a6a636c9e5f8c9080b9389ebf9d3f10305d79ac
Reviewed-on: https://go-review.googlesource.com/c/go/+/725661
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
|
|
The original unit test is converted to a fuzz test, to be more confident
on future refactors. All sub-tests are converted to seed corpus.
Change-Id: Id0c167ed47729a00ea0614d17746ddcc284697d3
Reviewed-on: https://go-review.googlesource.com/c/go/+/723581
Auto-Submit: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
|
|
8 and 9 in escape sequence is invalid now, it should be octal.
Escape sequence larger than \377 is invalid now, it does not fit one
byte.
Change-Id: I3fdebce1d054c44919f0e66a33c778b5a2b099e2
Reviewed-on: https://go-review.googlesource.com/c/go/+/723242
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
|
|
We should trim the mount root (4th field in /proc/self/mountinfo) from
cgroup path read from /proc/self/cgroup before appending it to the mount
point. Non-root mount points are very common in containers with cgroup
v1.
parseCPURelativePath is renamed to parseCPUCgroup, as it is unclear what
it is relative to. cgroups(7) says "This pathname is relative to the
mount point of the hierarchy." It should mean the root of the hierarchy,
and we cannot concat it to arbirary cgroup mount point. So just use the
word cgroup, since it parses /proc/self/cgroup.
It now returns errMalformedFile if the cgroup pathname does not start
with "/", and errPathTooLong if the pathname can't fit into the buffer.
We already rely on this when composing the path, just make this explicit
to avoid incorrect paths.
We now parse cgroup first then parse the mount point accordingly. We
consider the previously read cgroup pathname and version to ensure we
got the desired mount point. The out buffer is reused to pass in the
cgroup, to avoid extra memory allocation.
This should also resolve the race mentioned in the comments, so removing
those comments. If our cgroup changed between the two read syscalls, we
will stick with the cgroup read from /proc/self/cgroup. This is the same
behavior as cgroup change after FindCPU() returns, so nothing special to
comment about now.
parseCPUMount now returns error when the combined path is too long, to
avoid panic or truncation if we got a really long path from mountinfo.
cgrouptest is changed to use dev returned from stat() to detect
filesystem boundary, since we don't return mount point and sub-path
separately now. This also avoid using os.Root since we don't handle
untrusted input here. os.Root is too complex, and the performance is
bad.
Fixes #76390
Change-Id: Ia9cbd7be3e58a2d51caf27a973fbd201dac06afc
Reviewed-on: https://go-review.googlesource.com/c/go/+/723241
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
|
|
Don't work on rune, kernel does not use utf-8 here.
Can be verified like this:
# mkdir "$(echo -e "\xff\x20")"
# mount -t tmpfs tmpfs "$(echo -e "\xff\x20")"
# tail -n 1 /proc/self/mountinfo | xxd
00000000: 3133 3334 2031 3030 2030 3a31 3632 202f 1334 100 0:162 /
00000010: 202f 726f 6f74 2fff 5c30 3430 2072 772c /root/.\040 rw,
00000020: 7265 6c61 7469 6d65 2073 6861 7265 643a relatime shared:
00000030: 3433 3520 2d20 746d 7066 7320 746d 7066 435 - tmpfs tmpf
00000040: 7320 7277 0a s rw.
Change-Id: I7468b56eb26f14bc809f8f7580535e6562795c62
Reviewed-on: https://go-review.googlesource.com/c/go/+/723300
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
|
|
Change-Id: I2d3c41b0e61b994d7b04bd16a791fd226dc45269
Reviewed-on: https://go-review.googlesource.com/c/go/+/720302
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
Given a type definition of the form:
type T RHS
The setDefType function would set T.fromRHS as soon as we knew its
top-level type. For instance, in:
type S struct { ... }
S.fromRHS is set to a struct type before type-checking anything inside
the struct.
This permit access to the (incomplete) RHS type in a cyclic type
declaration. Accessing this information is fraught (as it's incomplete),
but was used for reporting certain types of cycles.
This CL replaces setDefType with a check that ensures no value of type
T is used before its RHS is set up.
This CL is strictly more complete than what setDefType achieved. For
instance, it enables correct reporting for the below cycles:
type A [unsafe.Sizeof(A{})]int
var v any = 42
type B [v.(B)]int
func f() C {
return C{}
}
type C [unsafe.Sizeof(f())]int
Fixes #76383
Fixes #76384
Change-Id: I9dfab5b708013b418fa66e43362bb4d8483fedec
Reviewed-on: https://go-review.googlesource.com/c/go/+/724140
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>
|
|
First, we centralize all random bytes generation through drbg.Read. The
rest of the FIPS 140-3 module can't use external functions anyway, so
drbg.Read needs to have all the logic.
Then, make sure that the crypto/... tree uses drbg.Read (or the new
crypto/internal/rand.Reader wrapper) instead of crypto/rand, so it is
unaffected by applications setting crypto/rand.Reader.
Next, pass all unspecified random io.Reader parameters through the new
crypto/internal/rand.CustomReader, which just redirects to drbg.Read
unless GODEBUG=cryptocustomrand=1 is set. Move all the calls to
MaybeReadByte there, since it's only needed for these custom Readers.
Finally, add testing/cryptotest.SetGlobalRandom which sets
crypto/rand.Reader to a locked deterministic source and overrides
drbg.Read. This way SetGlobalRandom should affect all cryptographic
randomness in the standard library.
Fixes #70942
Co-authored-by: qiulaidongfeng <2645477756@qq.com>
Change-Id: I6a6a69641311d9fac318abcc6d79677f0e406100
Reviewed-on: https://go-review.googlesource.com/c/go/+/724480
Reviewed-by: Nicholas Husin <nsh@golang.org>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Nicholas Husin <husin@google.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
Implement secret.Do.
- When secret.Do returns:
- Clear stack that is used by the argument function.
- Clear all the registers that might contain secrets.
- On stack growth in secret mode, clear the old stack.
- When objects are allocated in secret mode, mark them and then zero
the marked objects immediately when they are freed.
- If the argument function panics, raise that panic as if it originated
from secret.Do. This removes anything about the secret function
from tracebacks.
For now, this is only implemented on linux for arm64 and amd64.
This is a rebased version of Keith Randalls initial implementation at
CL 600635. I have added arm64 support, signal handling, preemption
handling and dealt with vDSOs spilling into system stacks.
Fixes #21865
Change-Id: I6fbd5a233beeaceb160785e0c0199a5c94d8e520
Co-authored-by: Keith Randall <khr@golang.org>
Reviewed-on: https://go-review.googlesource.com/c/go/+/704615
Reviewed-by: Roland Shoemaker <roland@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
|
|
These file flags are supported by os.OpenFile since CL 699415.
Closes #73676
Change-Id: Ib37102a565f538d394d2a94bd605d6c6004f3028
Reviewed-on: https://go-review.googlesource.com/c/go/+/724621
Auto-Submit: Damien Neil <dneil@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
|
|
windows.IsNonblock can block for synchronous handles that have an
outstanding I/O operation. Console handles are always synchronous, so
we should not call IsNonblock for them. Stdin is often a pipe, and
almost always a synchronous handle, so we should not call IsNonblock for
it either. This avoids potential deadlocks during os package
initialization, which calls NewFile(syscall.Stdin).
Fixes #75949
Updates #76391
Cq-Include-Trybots: luci.golang.try:gotip-windows-amd64-longtest,gotip-windows-amd64-race,gotip-windows-arm64
Change-Id: I1603932b0a99823019aa0cad960f94cee9996505
Reviewed-on: https://go-review.googlesource.com/c/go/+/724640
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
Auto-Submit: Damien Neil <dneil@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
|
|
Implement the new APIs described in #74826.
Closes #74826
Change-Id: I6a6a6964229548e9d54e7af95185011e183ee50b
Reviewed-on: https://go-review.googlesource.com/c/go/+/691815
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>
|
|
Fixes #71206
Change-Id: If3cf75261c56828b87ae6805bd2913f56a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/722140
Auto-Submit: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
Add ability to test against inputs chosen by from the stress
tests computed by Vern Paxson's testbase program.
Checked that 'go test -testbase' passes.
Change-Id: I81057e55df6cd369b40ce623a59884e6ead0ed76
Reviewed-on: https://go-review.googlesource.com/c/go/+/719620
Reviewed-by: Alan Donovan <adonovan@google.com>
Auto-Submit: Russ Cox <rsc@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
CL 700075 made this dead code.
Benchmarks below for CL 700075, testing Dragonbox vs the old Ryu being deleted.
The "Fixed" benchmarks are unchanged, which gives a sense of the noise level.
benchmark \ host linux-amd64 s7 linux-arm64 local linux-386 s7:GOARCH=386 linux-arm
vs base vs base vs base vs base vs base vs base vs base
AppendFloat/Decimal -2.68% +2.76% +4.99% -7.44% +11.93% +10.51% +21.84%
AppendFloat/Float -21.98% -13.32% -16.50% -11.54% -33.37% -28.66% -15.64%
AppendFloat/Exp -32.44% -25.54% -28.85% -31.79% -39.60% -35.92% -20.89%
AppendFloat/NegExp -33.31% -25.91% -28.90% -31.29% -41.17% -35.52% -21.32%
AppendFloat/LongExp -19.35% -9.51% -15.29% -12.36% -30.46% -25.10% -10.18%
AppendFloat/Big -24.40% -15.84% -22.56% -24.05% -43.23% -36.28% -26.45%
AppendFloat/BinaryExp -0.52% -1.20% ~ ~ ~ +0.96% +1.94%
AppendFloat/32Integer -14.24% -7.01% -12.82% -18.99% -12.12% -10.85% -0.32%
AppendFloat/32ExactFraction -34.53% -28.47% -34.50% -30.50% -43.75% -38.73% -25.44%
AppendFloat/32Point -25.83% -18.54% -23.52% -21.26% -36.74% -33.11% -20.72%
AppendFloat/32Exp -37.55% -33.36% -37.74% -39.06% -51.37% -44.53% -31.76%
AppendFloat/32NegExp -35.99% -31.96% -36.02% -37.13% -44.62% -39.03% -26.91%
AppendFloat/32Shortest -23.25% -18.02% -21.41% -23.07% -35.56% -32.89% -20.13%
AppendFloat/32Fixed8Hard +1.09% -1.94% ~ ~ -2.33% -1.36% -0.10%
AppendFloat/32Fixed9Hard +1.45% -2.10% +0.10% ~ -4.20% -0.72% +1.31%
AppendFloat/64Fixed1 +0.45% ~ ~ -1.66% -3.74% -2.13% ~
AppendFloat/64Fixed2 +0.32% -0.92% +0.53% -1.75% -2.69% ~ -0.49%
AppendFloat/64Fixed2.5 +0.38% -0.38% ~ ~ -5.14% -1.15% -0.97%
AppendFloat/64Fixed3 +0.97% -0.53% ~ +0.23% -3.57% -4.04% -0.27%
AppendFloat/64Fixed4 +0.95% -2.77% +0.45% -1.57% -3.99% -2.58% -0.91%
AppendFloat/64Fixed5Hard +0.52% -1.22% ~ -0.87% -3.20% -1.60% +0.49%
AppendFloat/64Fixed12 +1.15% -0.62% ~ ~ -3.37% -1.43% -0.72%
AppendFloat/64Fixed16 +1.13% ~ -0.21% -0.59% -3.65% ~ +0.74%
AppendFloat/64Fixed12Hard +0.78% -1.26% ~ -0.95% -4.82% -2.98% +0.26%
AppendFloat/64Fixed17Hard ~ ~ -0.32% -6.34% -2.44% -2.19% +1.00%
AppendFloat/64Fixed18Hard ~ ~ ~ ~ ~ ~ +0.06%
AppendFloat/64FixedF1 +0.44% ~ +0.43% -1.87% -2.75% ~ -1.24%
AppendFloat/64FixedF2 +1.35% -1.04% +0.81% +1.26% -2.21% -2.36% ~
AppendFloat/64FixedF3 ~ -1.14% +0.39% -1.58% -3.46% ~ -1.08%
AppendFloat/Slowpath64 -15.51% -7.05% -14.59% -7.86% -22.54% -19.63% -5.90%
AppendFloat/SlowpathDenormal64 -15.10% -8.19% -14.62% -9.36% -26.86% -23.10% -14.48%
host: linux-amd64
goos: linux
goarch: amd64
pkg: internal/strconv
cpu: Intel(R) Xeon(R) CPU @ 2.30GHz
│ 3c26aef8fba │ 8a958b0d9c1 │
│ sec/op │ sec/op vs base │
AppendFloat/Decimal-16 63.37n ± 0% 61.67n ± 0% -2.68% (p=0.000 n=20)
AppendFloat/Float-16 92.83n ± 0% 72.43n ± 0% -21.98% (p=0.000 n=20)
AppendFloat/Exp-16 98.60n ± 0% 66.61n ± 0% -32.44% (p=0.000 n=20)
AppendFloat/NegExp-16 100.15n ± 0% 66.79n ± 0% -33.31% (p=0.000 n=20)
AppendFloat/LongExp-16 105.35n ± 0% 84.96n ± 0% -19.35% (p=0.000 n=20)
AppendFloat/Big-16 108.50n ± 0% 82.03n ± 0% -24.40% (p=0.000 n=20)
AppendFloat/BinaryExp-16 47.27n ± 0% 47.03n ± 0% -0.52% (p=0.000 n=20)
AppendFloat/32Integer-16 63.29n ± 0% 54.28n ± 0% -14.24% (p=0.000 n=20)
AppendFloat/32ExactFraction-16 89.72n ± 0% 58.74n ± 0% -34.53% (p=0.000 n=20)
AppendFloat/32Point-16 87.32n ± 0% 64.77n ± 0% -25.83% (p=0.000 n=20)
AppendFloat/32Exp-16 94.89n ± 0% 59.26n ± 0% -37.55% (p=0.000 n=20)
AppendFloat/32NegExp-16 92.68n ± 0% 59.32n ± 0% -35.99% (p=0.000 n=20)
AppendFloat/32Shortest-16 82.12n ± 0% 63.04n ± 0% -23.25% (p=0.000 n=20)
AppendFloat/32Fixed8Hard-16 57.76n ± 0% 58.38n ± 0% +1.09% (p=0.000 n=20)
AppendFloat/32Fixed9Hard-16 66.44n ± 0% 67.41n ± 0% +1.45% (p=0.000 n=20)
AppendFloat/64Fixed1-16 51.00n ± 0% 51.24n ± 0% +0.45% (p=0.000 n=20)
AppendFloat/64Fixed2-16 50.86n ± 0% 51.03n ± 0% +0.32% (p=0.000 n=20)
AppendFloat/64Fixed2.5-16 49.31n ± 0% 49.49n ± 0% +0.38% (p=0.000 n=20)
AppendFloat/64Fixed3-16 51.98n ± 0% 52.48n ± 0% +0.97% (p=0.000 n=20)
AppendFloat/64Fixed4-16 50.05n ± 0% 50.52n ± 0% +0.95% (p=0.000 n=20)
AppendFloat/64Fixed5Hard-16 58.01n ± 0% 58.31n ± 0% +0.52% (p=0.000 n=20)
AppendFloat/64Fixed12-16 82.81n ± 0% 83.77n ± 0% +1.15% (p=0.000 n=20)
AppendFloat/64Fixed16-16 70.66n ± 0% 71.46n ± 0% +1.13% (p=0.000 n=20)
AppendFloat/64Fixed12Hard-16 68.25n ± 0% 68.79n ± 0% +0.78% (p=0.000 n=20)
AppendFloat/64Fixed17Hard-16 79.78n ± 0% 79.82n ± 0% ~ (p=0.136 n=20)
AppendFloat/64Fixed18Hard-16 4.881µ ± 0% 4.876µ ± 0% ~ (p=0.432 n=20)
AppendFloat/64FixedF1-16 68.74n ± 0% 69.04n ± 0% +0.44% (p=0.000 n=20)
AppendFloat/64FixedF2-16 57.36n ± 0% 58.13n ± 0% +1.35% (p=0.000 n=20)
AppendFloat/64FixedF3-16 52.59n ± 0% 52.77n ± 0% ~ (p=0.001 n=20)
AppendFloat/Slowpath64-16 99.56n ± 0% 84.12n ± 0% -15.51% (p=0.000 n=20)
AppendFloat/SlowpathDenormal64-16 97.35n ± 0% 82.65n ± 0% -15.10% (p=0.000 n=20)
AppendFloat/ShorterIntervalCase32-16 56.27n ± 0%
AppendFloat/ShorterIntervalCase64-16 57.42n ± 0%
geomean 82.53n 71.80n -11.68%
host: s7
cpu: AMD Ryzen 9 7950X 16-Core Processor
│ 3c26aef8fba │ 8a958b0d9c1 │
│ sec/op │ sec/op vs base │
AppendFloat/Decimal-32 22.30n ± 0% 22.91n ± 0% +2.76% (p=0.000 n=20)
AppendFloat/Float-32 34.54n ± 0% 29.94n ± 0% -13.32% (p=0.000 n=20)
AppendFloat/Exp-32 34.55n ± 0% 25.72n ± 0% -25.54% (p=0.000 n=20)
AppendFloat/NegExp-32 35.08n ± 0% 25.99n ± 1% -25.91% (p=0.000 n=20)
AppendFloat/LongExp-32 36.85n ± 0% 33.35n ± 1% -9.51% (p=0.000 n=20)
AppendFloat/Big-32 38.28n ± 0% 32.21n ± 1% -15.84% (p=0.000 n=20)
AppendFloat/BinaryExp-32 17.52n ± 0% 17.30n ± 0% -1.20% (p=0.000 n=20)
AppendFloat/32Integer-32 22.31n ± 0% 20.75n ± 0% -7.01% (p=0.000 n=20)
AppendFloat/32ExactFraction-32 32.74n ± 1% 23.41n ± 1% -28.47% (p=0.000 n=20)
AppendFloat/32Point-32 32.88n ± 0% 26.79n ± 0% -18.54% (p=0.000 n=20)
AppendFloat/32Exp-32 34.10n ± 0% 22.72n ± 1% -33.36% (p=0.000 n=20)
AppendFloat/32NegExp-32 33.17n ± 1% 22.57n ± 0% -31.96% (p=0.000 n=20)
AppendFloat/32Shortest-32 29.85n ± 1% 24.47n ± 0% -18.02% (p=0.000 n=20)
AppendFloat/32Fixed8Hard-32 22.62n ± 1% 22.19n ± 1% -1.94% (p=0.000 n=20)
AppendFloat/32Fixed9Hard-32 25.75n ± 1% 25.21n ± 0% -2.10% (p=0.000 n=20)
AppendFloat/64Fixed1-32 19.02n ± 1% 18.98n ± 0% ~ (p=0.351 n=20)
AppendFloat/64Fixed2-32 18.94n ± 0% 18.76n ± 0% -0.92% (p=0.000 n=20)
AppendFloat/64Fixed2.5-32 18.23n ± 0% 18.16n ± 0% -0.38% (p=0.001 n=20)
AppendFloat/64Fixed3-32 19.79n ± 0% 19.68n ± 0% -0.53% (p=0.000 n=20)
AppendFloat/64Fixed4-32 18.93n ± 0% 18.40n ± 1% -2.77% (p=0.000 n=20)
AppendFloat/64Fixed5Hard-32 21.81n ± 0% 21.54n ± 1% -1.22% (p=0.000 n=20)
AppendFloat/64Fixed12-32 30.58n ± 1% 30.39n ± 0% -0.62% (p=0.000 n=20)
AppendFloat/64Fixed16-32 26.98n ± 1% 26.80n ± 1% ~ (p=0.010 n=20)
AppendFloat/64Fixed12Hard-32 26.20n ± 0% 25.86n ± 1% -1.26% (p=0.000 n=20)
AppendFloat/64Fixed17Hard-32 30.01n ± 1% 30.10n ± 1% ~ (p=0.112 n=20)
AppendFloat/64Fixed18Hard-32 1.809µ ± 1% 1.806µ ± 0% ~ (p=0.713 n=20)
AppendFloat/64FixedF1-32 26.78n ± 1% 26.59n ± 0% ~ (p=0.005 n=20)
AppendFloat/64FixedF2-32 20.24n ± 1% 20.03n ± 0% -1.04% (p=0.000 n=20)
AppendFloat/64FixedF3-32 18.88n ± 0% 18.67n ± 0% -1.14% (p=0.000 n=20)
AppendFloat/Slowpath64-32 35.37n ± 0% 32.88n ± 1% -7.05% (p=0.000 n=20)
AppendFloat/SlowpathDenormal64-32 35.17n ± 0% 32.29n ± 1% -8.19% (p=0.000 n=20)
AppendFloat/ShorterIntervalCase32-32 21.76n ± 0%
AppendFloat/ShorterIntervalCase64-32 22.11n ± 0%
geomean 30.34n 27.23n -8.96%
host: linux-arm64
goarch: arm64
cpu: unknown
│ 3c26aef8fba │ 8a958b0d9c1 │
│ sec/op │ sec/op vs base │
AppendFloat/Decimal-8 60.08n ± 0% 63.07n ± 0% +4.99% (p=0.000 n=20)
AppendFloat/Float-8 88.53n ± 0% 73.92n ± 0% -16.50% (p=0.000 n=20)
AppendFloat/Exp-8 93.07n ± 0% 66.22n ± 0% -28.85% (p=0.000 n=20)
AppendFloat/NegExp-8 93.35n ± 0% 66.38n ± 0% -28.90% (p=0.000 n=20)
AppendFloat/LongExp-8 100.15n ± 0% 84.84n ± 0% -15.29% (p=0.000 n=20)
AppendFloat/Big-8 103.80n ± 0% 80.38n ± 0% -22.56% (p=0.000 n=20)
AppendFloat/BinaryExp-8 47.36n ± 0% 47.34n ± 0% ~ (p=0.033 n=20)
AppendFloat/32Integer-8 60.28n ± 0% 52.55n ± 0% -12.82% (p=0.000 n=20)
AppendFloat/32ExactFraction-8 86.11n ± 0% 56.40n ± 0% -34.50% (p=0.000 n=20)
AppendFloat/32Point-8 82.88n ± 0% 63.39n ± 0% -23.52% (p=0.000 n=20)
AppendFloat/32Exp-8 89.33n ± 0% 55.62n ± 0% -37.74% (p=0.000 n=20)
AppendFloat/32NegExp-8 87.48n ± 0% 55.97n ± 0% -36.02% (p=0.000 n=20)
AppendFloat/32Shortest-8 76.31n ± 0% 59.97n ± 0% -21.41% (p=0.000 n=20)
AppendFloat/32Fixed8Hard-8 52.83n ± 0% 52.82n ± 0% ~ (p=0.370 n=20)
AppendFloat/32Fixed9Hard-8 60.90n ± 0% 60.96n ± 0% +0.10% (p=0.000 n=20)
AppendFloat/64Fixed1-8 46.96n ± 0% 46.95n ± 0% ~ (p=0.702 n=20)
AppendFloat/64Fixed2-8 46.96n ± 0% 47.21n ± 0% +0.53% (p=0.000 n=20)
AppendFloat/64Fixed2.5-8 44.24n ± 0% 44.29n ± 0% ~ (p=0.006 n=20)
AppendFloat/64Fixed3-8 47.73n ± 0% 47.78n ± 0% ~ (p=0.020 n=20)
AppendFloat/64Fixed4-8 44.40n ± 0% 44.60n ± 0% +0.45% (p=0.000 n=20)
AppendFloat/64Fixed5Hard-8 52.52n ± 0% 52.50n ± 0% ~ (p=0.722 n=20)
AppendFloat/64Fixed12-8 78.57n ± 0% 78.56n ± 0% ~ (p=0.222 n=20)
AppendFloat/64Fixed16-8 65.36n ± 0% 65.22n ± 0% -0.21% (p=0.000 n=20)
AppendFloat/64Fixed12Hard-8 62.04n ± 0% 61.97n ± 0% ~ (p=0.004 n=20)
AppendFloat/64Fixed17Hard-8 74.30n ± 0% 74.06n ± 0% -0.32% (p=0.000 n=20)
AppendFloat/64Fixed18Hard-8 4.282µ ± 0% 4.284µ ± 0% ~ (p=0.296 n=20)
AppendFloat/64FixedF1-8 66.05n ± 0% 66.33n ± 0% +0.43% (p=0.000 n=20)
AppendFloat/64FixedF2-8 53.67n ± 0% 54.11n ± 0% +0.81% (p=0.000 n=20)
AppendFloat/64FixedF3-8 47.41n ± 0% 47.59n ± 0% +0.39% (p=0.000 n=20)
AppendFloat/Slowpath64-8 97.42n ± 0% 83.21n ± 0% -14.59% (p=0.000 n=20)
AppendFloat/SlowpathDenormal64-8 94.74n ± 0% 80.88n ± 0% -14.62% (p=0.000 n=20)
AppendFloat/ShorterIntervalCase32-8 53.77n ± 0%
AppendFloat/ShorterIntervalCase64-8 55.22n ± 0%
geomean 77.14n 67.89n -10.73%
host: local
goos: darwin
cpu: Apple M3 Pro
│ 3c26aef8fba │ 8a958b0d9c1 │
│ sec/op │ sec/op vs base │
AppendFloat/Decimal-12 21.09n ± 0% 19.52n ± 0% -7.44% (p=0.000 n=20)
AppendFloat/Float-12 32.36n ± 0% 28.63n ± 1% -11.54% (p=0.000 n=20)
AppendFloat/Exp-12 31.77n ± 0% 21.67n ± 0% -31.79% (p=0.000 n=20)
AppendFloat/NegExp-12 31.56n ± 1% 21.68n ± 0% -31.29% (p=0.000 n=20)
AppendFloat/LongExp-12 33.33n ± 0% 29.21n ± 0% -12.36% (p=0.000 n=20)
AppendFloat/Big-12 35.24n ± 1% 26.77n ± 0% -24.05% (p=0.000 n=20)
AppendFloat/BinaryExp-12 18.88n ± 1% 19.38n ± 2% ~ (p=0.031 n=20)
AppendFloat/32Integer-12 21.32n ± 1% 17.27n ± 0% -18.99% (p=0.000 n=20)
AppendFloat/32ExactFraction-12 30.85n ± 1% 21.44n ± 0% -30.50% (p=0.000 n=20)
AppendFloat/32Point-12 31.02n ± 1% 24.42n ± 0% -21.26% (p=0.000 n=20)
AppendFloat/32Exp-12 31.55n ± 0% 19.23n ± 0% -39.06% (p=0.000 n=20)
AppendFloat/32NegExp-12 30.32n ± 1% 19.06n ± 0% -37.13% (p=0.000 n=20)
AppendFloat/32Shortest-12 26.68n ± 0% 20.52n ± 0% -23.07% (p=0.000 n=20)
AppendFloat/32Fixed8Hard-12 17.34n ± 1% 17.24n ± 0% ~ (p=0.017 n=20)
AppendFloat/32Fixed9Hard-12 19.05n ± 1% 19.25n ± 1% ~ (p=0.155 n=20)
AppendFloat/64Fixed1-12 15.66n ± 0% 15.40n ± 0% -1.66% (p=0.000 n=20)
AppendFloat/64Fixed2-12 15.39n ± 0% 15.12n ± 0% -1.75% (p=0.000 n=20)
AppendFloat/64Fixed2.5-12 15.14n ± 0% 15.14n ± 0% ~ (p=0.645 n=20)
AppendFloat/64Fixed3-12 15.53n ± 0% 15.56n ± 0% +0.23% (p=0.000 n=20)
AppendFloat/64Fixed4-12 15.28n ± 0% 15.04n ± 0% -1.57% (p=0.000 n=20)
AppendFloat/64Fixed5Hard-12 18.32n ± 0% 18.16n ± 0% -0.87% (p=0.000 n=20)
AppendFloat/64Fixed12-12 25.51n ± 1% 25.48n ± 0% ~ (p=0.256 n=20)
AppendFloat/64Fixed16-12 21.32n ± 0% 21.20n ± 0% -0.59% (p=0.000 n=20)
AppendFloat/64Fixed12Hard-12 21.11n ± 1% 20.91n ± 1% -0.95% (p=0.001 n=20)
AppendFloat/64Fixed17Hard-12 26.89n ± 1% 25.18n ± 3% -6.34% (p=0.000 n=20)
AppendFloat/64Fixed18Hard-12 2.057µ ± 6% 2.065µ ± 1% ~ (p=0.856 n=20)
AppendFloat/64FixedF1-12 24.65n ± 0% 24.19n ± 0% -1.87% (p=0.000 n=20)
AppendFloat/64FixedF2-12 20.68n ± 0% 20.94n ± 0% +1.26% (p=0.000 n=20)
AppendFloat/64FixedF3-12 16.44n ± 0% 16.18n ± 0% -1.58% (p=0.000 n=20)
AppendFloat/Slowpath64-12 31.68n ± 0% 29.18n ± 0% -7.86% (p=0.000 n=20)
AppendFloat/SlowpathDenormal64-12 29.92n ± 1% 27.12n ± 0% -9.36% (p=0.000 n=20)
AppendFloat/ShorterIntervalCase32-12 18.44n ± 1%
AppendFloat/ShorterIntervalCase64-12 18.57n ± 0%
geomean 26.90n 23.50n -11.27%
host: linux-386
goos: linux
goarch: 386
cpu: Intel(R) Xeon(R) CPU @ 2.30GHz
│ 3c26aef8fba │ 8a958b0d9c1 │
│ sec/op │ sec/op vs base │
AppendFloat/Decimal-16 128.2n ± 0% 143.5n ± 0% +11.93% (p=0.000 n=20)
AppendFloat/Float-16 236.3n ± 0% 157.5n ± 0% -33.37% (p=0.000 n=20)
AppendFloat/Exp-16 245.3n ± 0% 148.2n ± 0% -39.60% (p=0.000 n=20)
AppendFloat/NegExp-16 251.2n ± 0% 147.8n ± 0% -41.17% (p=0.000 n=20)
AppendFloat/LongExp-16 253.2n ± 0% 176.0n ± 0% -30.46% (p=0.000 n=20)
AppendFloat/Big-16 278.6n ± 0% 158.1n ± 0% -43.23% (p=0.000 n=20)
AppendFloat/BinaryExp-16 89.72n ± 0% 89.47n ± 0% ~ (p=0.155 n=20)
AppendFloat/32Integer-16 127.1n ± 0% 111.7n ± 0% -12.12% (p=0.000 n=20)
AppendFloat/32ExactFraction-16 206.9n ± 1% 116.3n ± 1% -43.75% (p=0.000 n=20)
AppendFloat/32Point-16 196.9n ± 0% 124.5n ± 1% -36.74% (p=0.000 n=20)
AppendFloat/32Exp-16 235.1n ± 1% 114.3n ± 0% -51.37% (p=0.000 n=20)
AppendFloat/32NegExp-16 206.4n ± 0% 114.3n ± 1% -44.62% (p=0.000 n=20)
AppendFloat/32Shortest-16 189.7n ± 0% 122.3n ± 0% -35.56% (p=0.000 n=20)
AppendFloat/32Fixed8Hard-16 137.2n ± 0% 134.0n ± 0% -2.33% (p=0.000 n=20)
AppendFloat/32Fixed9Hard-16 160.8n ± 0% 154.0n ± 0% -4.20% (p=0.000 n=20)
AppendFloat/64Fixed1-16 140.2n ± 0% 135.0n ± 0% -3.74% (p=0.000 n=20)
AppendFloat/64Fixed2-16 135.5n ± 0% 131.8n ± 0% -2.69% (p=0.000 n=20)
AppendFloat/64Fixed2.5-16 133.3n ± 0% 126.5n ± 0% -5.14% (p=0.000 n=20)
AppendFloat/64Fixed3-16 135.8n ± 0% 130.9n ± 0% -3.57% (p=0.000 n=20)
AppendFloat/64Fixed4-16 127.9n ± 0% 122.8n ± 0% -3.99% (p=0.000 n=20)
AppendFloat/64Fixed5Hard-16 140.7n ± 0% 136.2n ± 0% -3.20% (p=0.000 n=20)
AppendFloat/64Fixed12-16 166.1n ± 0% 160.5n ± 0% -3.37% (p=0.000 n=20)
AppendFloat/64Fixed16-16 160.1n ± 0% 154.2n ± 0% -3.65% (p=0.000 n=20)
AppendFloat/64Fixed12Hard-16 156.6n ± 0% 149.0n ± 0% -4.82% (p=0.000 n=20)
AppendFloat/64Fixed17Hard-16 173.9n ± 1% 169.6n ± 0% -2.44% (p=0.000 n=20)
AppendFloat/64Fixed18Hard-16 10.59µ ± 1% 10.60µ ± 0% ~ (p=0.664 n=20)
AppendFloat/64FixedF1-16 158.5n ± 0% 154.1n ± 0% -2.75% (p=0.000 n=20)
AppendFloat/64FixedF2-16 147.1n ± 0% 143.8n ± 0% -2.21% (p=0.000 n=20)
AppendFloat/64FixedF3-16 135.8n ± 0% 131.1n ± 0% -3.46% (p=0.000 n=20)
AppendFloat/Slowpath64-16 244.9n ± 0% 189.7n ± 0% -22.54% (p=0.000 n=20)
AppendFloat/SlowpathDenormal64-16 241.8n ± 0% 176.9n ± 0% -26.86% (p=0.000 n=20)
AppendFloat/ShorterIntervalCase32-16 114.9n ± 0%
AppendFloat/ShorterIntervalCase64-16 130.6n ± 0%
geomean 195.7n 157.4n -18.30%
host: s7:GOARCH=386
cpu: AMD Ryzen 9 7950X 16-Core Processor
│ 3c26aef8fba │ 8a958b0d9c1 │
│ sec/op │ sec/op vs base │
AppendFloat/Decimal-32 42.76n ± 0% 47.25n ± 0% +10.51% (p=0.000 n=20)
AppendFloat/Float-32 71.44n ± 1% 50.97n ± 0% -28.66% (p=0.000 n=20)
AppendFloat/Exp-32 75.51n ± 0% 48.39n ± 1% -35.92% (p=0.000 n=20)
AppendFloat/NegExp-32 74.70n ± 0% 48.17n ± 1% -35.52% (p=0.000 n=20)
AppendFloat/LongExp-32 76.52n ± 0% 57.32n ± 1% -25.10% (p=0.000 n=20)
AppendFloat/Big-32 83.05n ± 0% 52.92n ± 1% -36.28% (p=0.000 n=20)
AppendFloat/BinaryExp-32 31.92n ± 1% 32.22n ± 0% +0.96% (p=0.000 n=20)
AppendFloat/32Integer-32 41.29n ± 1% 36.81n ± 0% -10.85% (p=0.000 n=20)
AppendFloat/32ExactFraction-32 62.29n ± 1% 38.16n ± 0% -38.73% (p=0.000 n=20)
AppendFloat/32Point-32 60.45n ± 1% 40.44n ± 1% -33.11% (p=0.000 n=20)
AppendFloat/32Exp-32 69.32n ± 1% 38.45n ± 1% -44.53% (p=0.000 n=20)
AppendFloat/32NegExp-32 63.39n ± 0% 38.64n ± 1% -39.03% (p=0.000 n=20)
AppendFloat/32Shortest-32 58.90n ± 1% 39.53n ± 0% -32.89% (p=0.000 n=20)
AppendFloat/32Fixed8Hard-32 43.30n ± 0% 42.70n ± 1% -1.36% (p=0.000 n=20)
AppendFloat/32Fixed9Hard-32 49.96n ± 1% 49.60n ± 0% -0.72% (p=0.000 n=20)
AppendFloat/64Fixed1-32 42.99n ± 1% 42.08n ± 0% -2.13% (p=0.000 n=20)
AppendFloat/64Fixed2-32 41.58n ± 0% 41.42n ± 1% ~ (p=0.077 n=20)
AppendFloat/64Fixed2.5-32 40.47n ± 1% 40.00n ± 1% -1.15% (p=0.000 n=20)
AppendFloat/64Fixed3-32 43.43n ± 1% 41.67n ± 0% -4.04% (p=0.000 n=20)
AppendFloat/64Fixed4-32 40.44n ± 0% 39.40n ± 0% -2.58% (p=0.000 n=20)
AppendFloat/64Fixed5Hard-32 43.41n ± 0% 42.72n ± 0% -1.60% (p=0.000 n=20)
AppendFloat/64Fixed12-32 52.00n ± 0% 51.26n ± 0% -1.43% (p=0.000 n=20)
AppendFloat/64Fixed16-32 50.62n ± 1% 50.55n ± 0% ~ (p=0.234 n=20)
AppendFloat/64Fixed12Hard-32 49.36n ± 0% 47.89n ± 0% -2.98% (p=0.000 n=20)
AppendFloat/64Fixed17Hard-32 56.91n ± 0% 55.66n ± 1% -2.19% (p=0.000 n=20)
AppendFloat/64Fixed18Hard-32 3.983µ ± 0% 3.964µ ± 0% ~ (p=0.014 n=20)
AppendFloat/64FixedF1-32 49.31n ± 1% 49.10n ± 1% ~ (p=0.005 n=20)
AppendFloat/64FixedF2-32 45.06n ± 0% 44.00n ± 1% -2.36% (p=0.000 n=20)
AppendFloat/64FixedF3-32 42.22n ± 0% 42.20n ± 1% ~ (p=0.644 n=20)
AppendFloat/Slowpath64-32 75.77n ± 0% 60.89n ± 1% -19.63% (p=0.000 n=20)
AppendFloat/SlowpathDenormal64-32 74.88n ± 1% 57.59n ± 1% -23.10% (p=0.000 n=20)
AppendFloat/ShorterIntervalCase32-32 37.66n ± 1%
AppendFloat/ShorterIntervalCase64-32 42.49n ± 1%
geomean 61.34n 51.27n -15.08%
host: linux-arm
goarch: arm
cpu: ARMv8 Processor rev 1 (v8l)
│ 3c26aef8fba │ 8a958b0d9c1 │
│ sec/op │ sec/op vs base │
AppendFloat/Decimal-4 110.8n ± 0% 135.0n ± 0% +21.84% (p=0.000 n=20)
AppendFloat/Float-4 172.0n ± 0% 145.1n ± 0% -15.64% (p=0.000 n=20)
AppendFloat/Exp-4 172.1n ± 0% 136.2n ± 0% -20.89% (p=0.000 n=20)
AppendFloat/NegExp-4 172.6n ± 0% 135.8n ± 0% -21.32% (p=0.000 n=20)
AppendFloat/LongExp-4 180.2n ± 0% 161.9n ± 0% -10.18% (p=0.000 n=20)
AppendFloat/Big-4 195.5n ± 0% 143.8n ± 0% -26.45% (p=0.000 n=20)
AppendFloat/BinaryExp-4 84.75n ± 0% 86.40n ± 0% +1.94% (p=0.000 n=20)
AppendFloat/32Integer-4 110.4n ± 0% 110.0n ± 0% -0.32% (p=0.000 n=20)
AppendFloat/32ExactFraction-4 152.9n ± 0% 114.0n ± 0% -25.44% (p=0.000 n=20)
AppendFloat/32Point-4 151.5n ± 0% 120.1n ± 0% -20.72% (p=0.000 n=20)
AppendFloat/32Exp-4 163.1n ± 0% 111.3n ± 0% -31.76% (p=0.000 n=20)
AppendFloat/32NegExp-4 152.0n ± 0% 111.1n ± 0% -26.91% (p=0.000 n=20)
AppendFloat/32Shortest-4 145.8n ± 0% 116.5n ± 0% -20.13% (p=0.000 n=20)
AppendFloat/32Fixed8Hard-4 104.1n ± 0% 104.0n ± 0% -0.10% (p=0.000 n=20)
AppendFloat/32Fixed9Hard-4 114.2n ± 0% 115.7n ± 0% +1.31% (p=0.000 n=20)
AppendFloat/64Fixed1-4 97.35n ± 0% 97.31n ± 0% ~ (p=0.357 n=20)
AppendFloat/64Fixed2-4 95.74n ± 0% 95.28n ± 0% -0.49% (p=0.000 n=20)
AppendFloat/64Fixed2.5-4 94.24n ± 0% 93.32n ± 0% -0.97% (p=0.000 n=20)
AppendFloat/64Fixed3-4 95.56n ± 0% 95.30n ± 0% -0.27% (p=0.000 n=20)
AppendFloat/64Fixed4-4 92.36n ± 0% 91.52n ± 0% -0.91% (p=0.000 n=20)
AppendFloat/64Fixed5Hard-4 101.5n ± 0% 102.0n ± 0% +0.49% (p=0.000 n=20)
AppendFloat/64Fixed12-4 125.5n ± 0% 124.6n ± 0% -0.72% (p=0.000 n=20)
AppendFloat/64Fixed16-4 121.8n ± 0% 122.7n ± 0% +0.74% (p=0.000 n=20)
AppendFloat/64Fixed12Hard-4 116.1n ± 0% 116.4n ± 0% +0.26% (p=0.000 n=20)
AppendFloat/64Fixed17Hard-4 129.8n ± 0% 131.1n ± 0% +1.00% (p=0.000 n=20)
AppendFloat/64Fixed18Hard-4 7.945µ ± 0% 7.950µ ± 0% +0.06% (p=0.000 n=20)
AppendFloat/64FixedF1-4 112.8n ± 0% 111.4n ± 0% -1.24% (p=0.000 n=20)
AppendFloat/64FixedF2-4 100.6n ± 0% 100.5n ± 0% ~ (p=0.066 n=20)
AppendFloat/64FixedF3-4 96.45n ± 0% 95.41n ± 0% -1.08% (p=0.000 n=20)
AppendFloat/Slowpath64-4 176.3n ± 0% 165.9n ± 0% -5.90% (p=0.000 n=20)
AppendFloat/SlowpathDenormal64-4 178.2n ± 0% 152.4n ± 0% -14.48% (p=0.000 n=20)
AppendFloat/ShorterIntervalCase32-4 112.8n ± 0%
AppendFloat/ShorterIntervalCase64-4 119.0n ± 0%
geomean 144.6n 132.1n -7.84%
Change-Id: I1eb3c7b8756ad6cf938bc9b81180e01fd8a4cd9e
Reviewed-on: https://go-review.googlesource.com/c/go/+/723861
Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Russ Cox <rsc@golang.org>
|
|
Dragonbox is a faster ftoa algorithm that provides the same guarantees
as Ryu: round-trip conversion, shortest length, and correct rounding.
Dragonbox only supports shortest-precision conversion, so we continue to
use Ryu-printf for fixed precision.
The new implementation has been fuzz-tested against the current
Ryu implementation in addition to the existing test suite.
Benchmarks show at least ~15-20% performance improvement.
The following shows the relevant output from benchstat. Full benchmark
results and plots are available at:
https://github.com/taichimaeda/dragonbox-bench/
goos: darwin
goarch: arm64
pkg: strconv
cpu: Apple M1
│ old.txt │ new.txt │
│ sec/op │ sec/op vs base │
FormatFloat/Decimal-8 32.71n ± 14% 31.89n ± 12% ~ (p=0.165 n=10)
FormatFloat/Float-8 45.54n ± 1% 42.48n ± 0% -6.70% (p=0.000 n=10)
FormatFloat/Exp-8 50.06n ± 0% 32.27n ± 1% -35.54% (p=0.000 n=10)
FormatFloat/NegExp-8 47.15n ± 1% 31.33n ± 0% -33.56% (p=0.000 n=10)
FormatFloat/LongExp-8 46.15n ± 1% 43.66n ± 0% -5.38% (p=0.000 n=10)
FormatFloat/Big-8 50.02n ± 0% 39.36n ± 0% -21.31% (p=0.000 n=10)
FormatFloat/BinaryExp-8 27.89n ± 0% 27.88n ± 1% ~ (p=0.798 n=10)
FormatFloat/32Integer-8 31.41n ± 0% 23.00n ± 3% -26.79% (p=0.000 n=10)
FormatFloat/32ExactFraction-8 44.93n ± 1% 29.91n ± 0% -33.43% (p=0.000 n=10)
FormatFloat/32Point-8 43.22n ± 1% 33.82n ± 0% -21.74% (p=0.000 n=10)
FormatFloat/32Exp-8 45.91n ± 0% 25.48n ± 0% -44.50% (p=0.000 n=10)
FormatFloat/32NegExp-8 44.66n ± 0% 25.12n ± 0% -43.76% (p=0.000 n=10)
FormatFloat/32Shortest-8 37.96n ± 0% 27.83n ± 1% -26.68% (p=0.000 n=10)
FormatFloat/Slowpath64-8 47.74n ± 2% 45.85n ± 0% -3.96% (p=0.000 n=10)
FormatFloat/SlowpathDenormal64-8 42.78n ± 1% 41.46n ± 0% -3.07% (p=0.000 n=10)
FormatFloat/ShorterIntervalCase32-8 25.49n ± 2%
FormatFloat/ShorterIntervalCase64-8 27.72n ± 1%
geomean 41.95n 31.89n -22.11%
Fixes #74886
Co-authored-by: Junekey Jeon <j6jeon@ucsd.edu>
Change-Id: I923f7259c9cecd0896b2340a43d1041cc2ed7787
GitHub-Last-Rev: fd735db0b1e3fab5fbad4d8b75c8e29247069d94
GitHub-Pull-Request: golang/go#75195
Reviewed-on: https://go-review.googlesource.com/c/go/+/700075
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
TryBot-Bypass: Russ Cox <rsc@golang.org>
|
|
Move non-Linux specific part out of _linux.go. The parsing code itself
doesn't depend anything Linux specific, even if it the format is Linux
specific.
This should benefit developers working on non-Linux OSes.
Change-Id: I1692978d583c3dd9a57ff269c97e8fca53a7a057
Reviewed-on: https://go-review.googlesource.com/c/go/+/723240
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Carrillo Rodriguez <carrillorodriguez672@gmail.com>
|
|
Change-Id: Ia383d4d322008901cd1e57b05fb522db44076fa2
GitHub-Last-Rev: 5c7cbeb7371c6afa47c280e164087e45ca89f3d2
GitHub-Pull-Request: golang/go#66375
Reviewed-on: https://go-review.googlesource.com/c/go/+/572178
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Sean Liao <sean@liao.dev>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Reviewed-by: Sean Liao <sean@liao.dev>
|
|
Copy LabelSet to an internal package as label.Set, and include (escaped)
labels within goroutine stack dumps.
Labels are added to the goroutine header as quoted key:value pairs, so
the line may get long if there are a lot of labels.
To handle escaping, we add a printescaped function to the
runtime and hook it up to the print function in the compiler with a new
runtime.quoted type that's a sibling to runtime.hex. (in fact, we
leverage some of the machinery from printhex to generate escape
sequences).
The escaping can be improved for printable runes outside basic ASCII
(particularly for languages using non-latin stripts). Additionally,
invalid UTF-8 can be improved.
So we can experiment with the output format make this opt-in via a
a new tracebacklabels GODEBUG var.
Updates #23458
Updates #76349
Change-Id: I08e78a40c55839a809236fff593ef2090c13c036
Reviewed-on: https://go-review.googlesource.com/c/go/+/694119
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: Alan Donovan <adonovan@google.com>
|
|
Merge List:
+ 2025-11-24 02d1f3a06b runtime: respect GOTRACEBACK for user-triggered runtime panics
+ 2025-11-24 a593ca9d65 runtime/cgo: add support for `any` param and return type
+ 2025-11-24 89552911b3 cmd/compile, internal/buildcfg: enable regABI on s390x, and add s390x
+ 2025-11-24 2fe0ba8d52 internal/bytealg: port bytealg functions to reg ABI on s390x
+ 2025-11-24 4529c8fba6 runtime: port memmove, memclr to register ABI on s390x
+ 2025-11-24 58a48a3e3b internal/runtime/syscall: Syscall changes for s390x regabi
+ 2025-11-24 2a185fae7e reflect, runtime: add reflect support for regabi on s390x
+ 2025-11-24 e92d2964fa runtime: mark race functions on s390x as ABIInternal
+ 2025-11-24 41af98eb83 runtime: add runtime changes for register ABI on s390x
+ 2025-11-24 85e6080089 cmd/internal/obj: set morestack arg spilling and regabi prologue on s390x
+ 2025-11-24 24697419c5 cmd/compile: update s390x CALL* ops
+ 2025-11-24 81242d034c cmd/compile/internal/s390x: add initial spill support
+ 2025-11-24 73b6aa0fec cmd/compile/internal: add register ABI information for s390x
+ 2025-11-24 1036f6f485 internal/abi: define s390x ABI constants
+ 2025-11-24 2e5d12a277 cmd/compile: document register-based ABI for s390x
Change-Id: I57b4ae6f9b65d99958b9fe5974205770e18f7788
|