aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/internal
AgeCommit message (Collapse)Author
2022-10-14runtime/internal/startlinetest: add NO_LOCAL_POINTERS macro to asm functionCherry Mui
Should fix the mayMoreStack test. Change-Id: Iab99192629ab62ced81e95d756f2dd15f9b7e869 Reviewed-on: https://go-review.googlesource.com/c/go/+/443064 Auto-Submit: Austin Clements <austin@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> Reviewed-by: Austin Clements <austin@google.com> Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-10-14cmd/compile,cmd/link,runtime: add start line numbers to func metadataMichael Pratt
This adds the function "start line number" to runtime._func and runtime.inlinedCall objects. The "start line number" is the line number of the func keyword or TEXT directive for assembly. Subtracting the start line number from PC line number provides the relative line offset of a PC from the the start of the function. This helps with source stability by allowing code above the function to move without invalidating samples within the function. Encoding start line rather than relative lines directly is convenient because the pprof format already contains a start line field. This CL uses a straightforward encoding of explictly including a start line field in every _func and inlinedCall. It is possible that we could compress this further in the future. e.g., functions with a prologue usually have <line of PC 0> == <start line>. In runtime.test, 95% of functions have <line of PC 0> == <start line>. According to bent, this is geomean +0.83% binary size vs master and -0.31% binary size vs 1.19. Note that //line directives can change the file and line numbers arbitrarily. The encoded start line is as adjusted by //line directives. Since this can change in the middle of a function, `line - start line` offset calculations may not be meaningful if //line directives are in use. For #55022. Change-Id: Iaabbc6dd4f85ffdda294266ef982ae838cc692f6 Reviewed-on: https://go-review.googlesource.com/c/go/+/429638 Run-TryBot: Michael Pratt <mpratt@google.com> Auto-Submit: Michael Pratt <mpratt@google.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
2022-10-07runtime: move epoll syscalls to runtime/internal/syscallAndrew Pogrebnoy
This change moves Linux epoll's syscalls implementation to the "runtime/internal/syscall" package. The intention in this CL was to minimise behavioural changes but make the code more generalised. This also will allow adding new syscalls (like epoll_pwait2) without the need to implement assembly stubs for each arch. It also drops epoll_create as not all architectures provide this call. epoll_create1 was added to the kernel in version 2.6.27 and Go requires Linux kernel version 2.6.32 or later since Go 1.18. So it is safe to always use epoll_create1. This is a resubmit as the previous CL 421994 was reverted due to test failures after the merge with the master. The issue was fixed in CL 438615 For #53824 For #51087 Change-Id: I1bd0f23a85b4f9b80178c5dd36fd3e95ff4f9648 Reviewed-on: https://go-review.googlesource.com/c/go/+/440115 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Michael Pratt <mpratt@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> Run-TryBot: Michael Pratt <mpratt@google.com>
2022-09-30Revert "runtime: move epoll syscalls to runtime/internal/syscall"Michael Pratt
This reverts CL 421994. Reason for revert: breaks runtime.TestCheckPtr2 For #53824 For #51087 Change-Id: I044ea4d6efdffe0a4b7fb0d2bb3717d9f391fc59 Reviewed-on: https://go-review.googlesource.com/c/go/+/437295 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Michael Pratt <mpratt@google.com> Auto-Submit: Michael Pratt <mpratt@google.com> Reviewed-by: Bryan Mills <bcmills@google.com>
2022-09-30runtime: move epoll syscalls to runtime/internal/syscallAndrew Pogrebnoy
This change moves Linux epoll's syscalls implementation to the "runtime/internal/syscall" package. The intention in this CL was to minimise behavioural changes but make the code more generalised. This also will allow adding new syscalls (like epoll_pwait2) without the need to implement assembly stubs for each arch. It also drops epoll_create as not all architectures provide this call. epoll_create1 was added to the kernel in version 2.6.27 and Go requires Linux kernel version 2.6.32 or later since Go 1.18. So it is safe to always use epoll_create1. For #53824 For #51087 Change-Id: I9a6a26b7f2075a38e041de1bab4691da0ecb94fc Reviewed-on: https://go-review.googlesource.com/c/go/+/421994 Reviewed-by: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Run-TryBot: Michael Pratt <mpratt@google.com> Auto-Submit: Michael Pratt <mpratt@google.com>
2022-09-17runtime/internal/sys: make Len64 nosplitMichael Anthony Knyszek
CL 427615 causes failures when Len64 can't be inlined. It's unclear to me why this wasn't a problem before, but it is used in sensitive contexts and therefore really should be marked. Confirmed that the failures in question reproduce without this change, and don't reproduce with it. Fixes #55117. Change-Id: Ic3aa96af1420cc0c39551908d83f954725c712f5 Reviewed-on: https://go-review.googlesource.com/c/go/+/431058 Reviewed-by: Cherry Mui <cherryyz@google.com> Run-TryBot: Michael Knyszek <mknyszek@google.com> Auto-Submit: Michael Knyszek <mknyszek@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-09-02cmd/compile: make runtime/internal/sys.NotInHeap intrinsicCuong Manh Le
So next CL can get rid of go:notinheap pragma. Updates #46731 Change-Id: Ib2e2f2d381767e11cec10f76261b516188ddaa6a Reviewed-on: https://go-review.googlesource.com/c/go/+/422814 Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: David Chase <drchase@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-08-26runtime: mark all methods of atomic types with go:nosplitAndy Pan
Atomic types may be used anywhere in the runtime, so they must omit its usual stack overflow checks to avoid errors from stack splits. Change-Id: Icb497334c860bcaa284a2d5a3edc47ee89844301 Reviewed-on: https://go-review.googlesource.com/c/go/+/425484 Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: David Chase <drchase@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Pratt <mpratt@google.com>
2022-08-19runtime/internal/atomic: remove double-check in kernelcas on linux/armTobias Klauser
Older kernels which require the double check of the __kuser_cmpxchg result are no longer supported as of Go 1.18 which requires at least Linux 2.6.32. For #45964 Change-Id: Ic3d6691bf006353ac51b9d43e742d970e3d4e961 Reviewed-on: https://go-review.googlesource.com/c/go/+/424556 Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Pratt <mpratt@google.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
2022-08-19runtime: add and use runtime/internal/sys.NotInHeapCuong Manh Le
Updates #46731 Change-Id: Ic2208c8bb639aa1e390be0d62e2bd799ecf20654 Reviewed-on: https://go-review.googlesource.com/c/go/+/421878 Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
2022-08-12runtime: mark atomic methods which call nosplit functions as nosplitCuong Manh Le
Fixes #54411 Change-Id: I482ebca7365862bfb82a9daf8111c6f395aa1170 Reviewed-on: https://go-review.googlesource.com/c/go/+/423255 Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-08-08runtime/internal/atomic: add Pointer[T] typeAustin Clements
Change-Id: If8fcb37f4a8fcc0668af0df12f1cb8c66f2d2eea Reviewed-on: https://go-review.googlesource.com/c/go/+/418954 Run-TryBot: Austin Clements <austin@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-08-05cmd/dist: force stackGuardMultiplierDefault to 1Russ Cox
Nothing seems to break, not even the noopt builder. For #51256 (the conversation there is headed toward additional changes). Change-Id: Icb7ca451159a74f351c25d2cefb32c773b9bb017 Reviewed-on: https://go-review.googlesource.com/c/go/+/416859 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-06-15syscall, runtime/internal/syscall: always zero the higher bits of return ↵Guoqi Chen
value on linux/loong64 All loong64 syscalls return values only via R4/A0, and R5/A1 may contain unrelated content. Always zero the second return value. Change-Id: I62af59369bece5bd8028b937c74f4694150f7a55 Reviewed-on: https://go-review.googlesource.com/c/go/+/411615 Run-TryBot: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Austin Clements <austin@google.com>
2022-05-26runtime/internal/syscall: use correct result names for loong64Ian Lance Taylor
Fixes "GOARCH=loong64 go vet runtime/internal/syscall" Change-Id: I5879eec3ff07b0c69a5a8ac8e854733261e98fbf Reviewed-on: https://go-review.googlesource.com/c/go/+/408695 Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: xiaodong liu <teaofmoli@gmail.com> Auto-Submit: Ian Lance Taylor <iant@golang.org>
2022-05-19runtime/internal/atomic: add atomic support for loong64Xiaodong Liu
Contributors to the loong64 port are: Weining Lu <luweining@loongson.cn> Lei Wang <wanglei@loongson.cn> Lingqin Gong <gonglingqin@loongson.cn> Xiaolin Zhao <zhaoxiaolin@loongson.cn> Meidan Li <limeidan@loongson.cn> Xiaojuan Zhai <zhaixiaojuan@loongson.cn> Qiyuan Pu <puqiyuan@loongson.cn> Guoqi Chen <chenguoqi@loongson.cn> This port has been updated to Go 1.15.6: https://github.com/loongson/go Updates #46229 Change-Id: I0333503db044c6f39df2d7f8d9dff213b1361d6c Reviewed-on: https://go-review.googlesource.com/c/go/+/342320 Reviewed-by: David Chase <drchase@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
2022-05-19runtime: implement syscalls for runtime bootstrap on linux/loong64Xiaodong Liu
Contributors to the loong64 port are: Weining Lu <luweining@loongson.cn> Lei Wang <wanglei@loongson.cn> Lingqin Gong <gonglingqin@loongson.cn> Xiaolin Zhao <zhaoxiaolin@loongson.cn> Meidan Li <limeidan@loongson.cn> Xiaojuan Zhai <zhaixiaojuan@loongson.cn> Qiyuan Pu <puqiyuan@loongson.cn> Guoqi Chen <chenguoqi@loongson.cn> This port has been updated to Go 1.15.6: https://github.com/loongson/go Updates #46229 Change-Id: I848608267932717895d5cff9e33040029c3f3c4b Reviewed-on: https://go-review.googlesource.com/c/go/+/368080 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com> Auto-Submit: Ian Lance Taylor <iant@golang.org>
2022-05-13runtime/internal/atomic: align 64-bit types to 8 bytes everywhereMichael Anthony Knyszek
This change extends https://go.dev/cl/381317 to the runtime/internal/atomic package in terms of aligning 64-bit types to 8 bytes, even on 32-bit platforms. Change-Id: Id8c45577d07b256e3144d88b31f201264295cfcd Reviewed-on: https://go-review.googlesource.com/c/go/+/404096 Reviewed-by: David Chase <drchase@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Michael Knyszek <mknyszek@google.com>
2022-04-22runtime/internal/syscall: use ABIInternal for Syscall6 on amd64Michael Pratt
This is an exact copy of CL 401096 after fixing #52472 in CL 401654. For #51087 For #52472 Change-Id: Ib3c914949a15517aacdca2d72e69e1c7b217e430 Reviewed-on: https://go-review.googlesource.com/c/go/+/401656 Run-TryBot: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
2022-04-21Revert "runtime/internal/syscall: use ABIInternal for Syscall6 on amd64"Michael Pratt
This reverts CL 401096. Grandparent CL 388477 breaks cmd/go TestScript/cover_pkgall_runtime. For #51087. For #52472. Change-Id: Ie82fe5f50975f66eb91fb0d01cd8bbbd0265eb4e Reviewed-on: https://go-review.googlesource.com/c/go/+/401634 Run-TryBot: Michael Pratt <mpratt@google.com> Auto-Submit: Michael Pratt <mpratt@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-04-21runtime/internal/syscall: use ABIInternal for Syscall6 on amd64Michael Pratt
For #51087. Change-Id: I25971760b63ec0d23d0f011521dd197d81a38976 Reviewed-on: https://go-review.googlesource.com/c/go/+/401096 Run-TryBot: Michael Pratt <mpratt@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-04-21runtime/internal/syscall, syscall: replace RawSyscall6 with runtime ↵Michael Pratt
implementation on linux For #51087 Change-Id: I75a1bdeb5089454595f5ca04765a9c6e45cf9bd5 Reviewed-on: https://go-review.googlesource.com/c/go/+/388475 Run-TryBot: Michael Pratt <mpratt@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-04-05all: separate doc comment from //go: directivesRuss Cox
A future change to gofmt will rewrite // Doc comment. //go:foo to // Doc comment. // //go:foo Apply that change preemptively to all comments (not necessarily just doc comments). For #51082. Change-Id: Iffe0285418d1e79d34526af3520b415a12203ca9 Reviewed-on: https://go-review.googlesource.com/c/go/+/384260 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-03-31runtime/internal/atomic: add BoolMichael Anthony Knyszek
This change adds the Bool type, a convenient wrapper around Uint8 for atomic bool values. Change-Id: I86127d6f213b730d6999db5718ca1a5af0c5b538 Reviewed-on: https://go-review.googlesource.com/c/go/+/393395 Reviewed-by: Michael Pratt <mpratt@google.com> Reviewed-by: Austin Clements <austin@google.com> Trust: Michael Knyszek <mknyszek@google.com>
2022-03-03syscall, runtime/internal/syscall: always return 0 in r2 on ppc64{,le} linux ↵Paul E. Murphy
syscalls Both endians perform syscalls similarly. Only CR0S0 and R3 hold the resultant status of a syscall. A random value may be stored into the second return value (r2) result in some cases. Always set it to zero. Fixes #51192 Change-Id: Ida6a5692578d2cdadf3099af28478b3bc364f623 Reviewed-on: https://go-review.googlesource.com/c/go/+/385796 Run-TryBot: Paul Murphy <murp@ibm.com> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com> Trust: Paul Murphy <murp@ibm.com>
2022-02-25runtime/internal/atomic: set SP delta correctly for 64-bit atomic functions ↵Cherry Mui
on ARM 64-bit atomic functions on ARM have the following structure: - check if the address is 64-bit aligned, if not, prepare a frame and call panicUnaligned - tail call armXXX or goXXX depending on GOARM The alignment check calls panicUnaligned after preparing a frame, so the stack can be unwound. The call never returns, so the SP is not set back. However, the assembler assigns SP delta following the instruction stream order, not the control flow. So it leaves a nonzero SP delta after the check, to the tail call instructions, which is wrong because when they are executed the SP is not decremented. This CL fixes this by adding the SP back (the instruction never executes, just tells the assembler to set the SP delta back). Should fix #51353. Change-Id: I976cb1cfb0e9008b13538765cbc7eea0c19c7130 Reviewed-on: https://go-review.googlesource.com/c/go/+/388014 Trust: Cherry Mui <cherryyz@google.com> Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Pratt <mpratt@google.com>
2022-02-15runtime/internal/syscall: new package for linuxMichael Pratt
Add a generic syscall package for use by the runtime. Eventually we'd like to clean up system calls in the runtime to use more code generation and be moved out of the main runtime package. The implementations of the assembly functions are based on copies of syscall.RawSyscall6, modified slightly for more consistency between arches. e.g., renamed trap to num, always set syscall num register first. For now, this package is just the bare minimum needed for doAllThreadsSyscall to make an arbitrary syscall. For #51087. For #50113. Change-Id: Ibecb5e6303279ce15286759e1cd6a2ddc52f7c72 Reviewed-on: https://go-review.googlesource.com/c/go/+/383999 Trust: Michael Pratt <mpratt@google.com> Run-TryBot: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
2021-12-13all: gofmt -w -r 'interface{} -> any' srcRuss Cox
And then revert the bootstrap cmd directories and certain testdata. And adjust tests as needed. Not reverting the changes in std that are bootstrapped, because some of those changes would appear in API docs, and we want to use any consistently. Instead, rewrite 'any' to 'interface{}' in cmd/dist for those directories when preparing the bootstrap copy. A few files changed as a result of running gofmt -w not because of interface{} -> any but because they hadn't been updated for the new //go:build lines. Fixes #49884. Change-Id: Ie8045cba995f65bd79c694ec77a1b3d1fe01bb09 Reviewed-on: https://go-review.googlesource.com/c/go/+/368254 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
2021-11-06all: remove more leftover // +build linesTobias Klauser
CL 344955 and CL 359476 removed almost all // +build lines, but leaving some assembly files and generating scripts. Also, some files were added with // +build lines after CL 359476 was merged. Remove these or rename files where more appropriate. For #41184 Change-Id: I7eb85a498ed9788b42a636e775f261d755504ffa Reviewed-on: https://go-review.googlesource.com/c/go/+/361480 Trust: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
2021-10-28all: go fix -fix=buildtag std cmd (except for bootstrap deps, vendor)Russ Cox
When these packages are released as part of Go 1.18, Go 1.16 will no longer be supported, so we can remove the +build tags in these files. Ran go fix -fix=buildtag std cmd and then reverted the bootstrapDirs as defined in src/cmd/dist/buildtool.go, which need to continue to build with Go 1.4 for now. Also reverted src/vendor and src/cmd/vendor, which will need to be updated in their own repos first. Manual changes in runtime/pprof/mprof_test.go to adjust line numbers. For #41184. Change-Id: Ic0f93f7091295b6abc76ed5cd6e6746e1280861e Reviewed-on: https://go-review.googlesource.com/c/go/+/344955 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
2021-10-20runtime/internal/atomic: add atomic types for all functionsMichael Anthony Knyszek
Change-Id: I74f365316484feb819c31c77fbffd78fadfe32a9 Reviewed-on: https://go-review.googlesource.com/c/go/+/356169 Trust: Michael Knyszek <mknyszek@google.com> Run-TryBot: Michael Knyszek <mknyszek@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Michael Pratt <mpratt@google.com>
2021-09-07cmd/compile: add prefetch intrinsic supportRuslan Andreev
This CL provide new intrinsics to emit prefetch instructions for AMD64 and ARM64 platforms: Prefetch - prefetches data from memory address to cache; PrefetchStreamed - prefetches data from memory address, with a hint that this data is being streamed. This patch also provides prefetch calls pointed by RSC inside scanobject and greyobject of GC mark logic. Performance results provided by Michael: https://perf.golang.org/search?q=upload:20210901.9 Benchmark parameters: tree2 -heapsize=1000000000 -cpus=8 tree -n=18 parser peano Benchmarks AMD64 (Xeon - Cascade Lake): name old time/op new time/op delta Tree2-8 36.1ms ± 6% 33.4ms ± 5% -7.65% (p=0.000 n=9+9) Tree-8 326ms ± 1% 324ms ± 1% -0.44% (p=0.006 n=9+10) Parser-8 2.75s ± 1% 2.71s ± 1% -1.47% (p=0.008 n=5+5) Peano-8 63.1ms ± 1% 63.0ms ± 1% ~ (p=0.730 n=9+9) [Geo mean] 213ms 207ms -2.45% Benchmarks ARM64 (Kunpeng 920): name old time/op new time/op delta Tree2-8 50.3ms ± 8% 44.1ms ± 5% -12.24% (p=0.000 n=10+9) Tree-8 494ms ± 1% 493ms ± 1% ~ (p=0.684 n=10+10) Parser-8 3.99s ± 1% 3.93s ± 1% -1.37% (p=0.016 n=5+5) Peano-8 84.4ms ± 0% 84.1ms ± 1% ~ (p=0.068 n=8+10) [Geo mean] 302ms 291ms -3.67% Change-Id: I43e10bc2f9512dc49d7631dd8843a79036fa43d0 Reviewed-on: https://go-review.googlesource.com/c/go/+/328289 Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Go Bot <gobot@golang.org>
2021-06-30[dev.typeparams] all: merge master (4711bf3) into dev.typeparamsMatthew Dempsky
Conflicts: - src/cmd/compile/internal/walk/builtin.go On dev.typeparams, CL 330194 changed OCHECKNIL to not require manual SetTypecheck(1) anymore; while on master, CL 331070 got rid of the OCHECKNIL altogether by moving the check into the runtime support functions. - src/internal/buildcfg/exp.go On master, CL 331109 refactored the logic for parsing the GOEXPERIMENT string, so that it could be more easily reused by cmd/go; while on dev.typeparams, several CLs tweaked the regabi experiment defaults. Merge List: + 2021-06-30 4711bf30e5 doc/go1.17: linkify "language changes" in the runtime section + 2021-06-30 ed56ea73e8 path/filepath: deflake TestEvalSymlinksAboveRoot on darwin + 2021-06-30 c080d0323b cmd/dist: pass -Wno-unknown-warning-option in swig_callback_lto + 2021-06-30 7d0e9e6e74 image/gif: fix typo in the comment (io.ReadByte -> io.ByteReader) + 2021-06-30 0fa3265fe1 os: change example to avoid deprecated function + 2021-06-30 d19a53338f image: add Uniform.RGBA64At and Rectangle.RGBA64At + 2021-06-30 c45e800e0c crypto/x509: don't fail on optional auth key id fields + 2021-06-29 f9d50953b9 net: fix failure of TestCVE202133195 + 2021-06-29 e294b8a49e doc/go1.17: fix typo "MacOS" -> "macOS" + 2021-06-29 3463852b76 math/big: fix typo of comment (`BytesScanner` to `ByteScanner`) + 2021-06-29 fd4b587da3 cmd/compile: suppress details error for invalid variadic argument type + 2021-06-29 e2e05af6e1 cmd/internal/obj/arm64: fix an encoding error of CMPW instruction + 2021-06-28 4bb0847b08 cmd/compile,runtime: change unsafe.Slice((*T)(nil), 0) to return []T(nil) + 2021-06-28 1519271a93 spec: change unsafe.Slice((*T)(nil), 0) to return []T(nil) + 2021-06-28 5385e2386b runtime/internal/atomic: drop Cas64 pointer indirection in comments + 2021-06-28 956c81bfe6 cmd/go: add GOEXPERIMENT to `go env` output + 2021-06-28 a1d27269d6 cmd/go: prep for 'go env' refactoring + 2021-06-28 901510ed4e cmd/link/internal/ld: skip the windows ASLR test when CGO_ENABLED=0 + 2021-06-28 361159c055 cmd/cgo: fix 'see gmp.go' to 'see doc.go' + 2021-06-27 c95464f0ea internal/buildcfg: refactor GOEXPERIMENT parsing code somewhat + 2021-06-25 ed01ceaf48 runtime/race: use race build tag on syso_test.go + 2021-06-25 d1916e5e84 go/types: in TestCheck/issues.src, import regexp/syntax instead of cmd/compile/internal/syntax + 2021-06-25 5160896c69 go/types: in TestStdlib, import from source instead of export data + 2021-06-25 d01bc571f7 runtime: make ncgocall a global counter Change-Id: I1ce4a3b3ff7c824c67ad66dd27d9d5f1d25c0023
2021-06-28runtime/internal/atomic: drop Cas64 pointer indirection in commentsMia Zhu
Change-Id: Ieff0065cbd81e045594ce12e10338b0666816d70 GitHub-Last-Rev: d842f5cb3e5d75f87957c068f6accc9d4a4ac224 GitHub-Pull-Request: golang/go#46949 Reviewed-on: https://go-review.googlesource.com/c/go/+/331309 Trust: Keith Randall <khr@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-06-25[dev.typeparams] all: merge master (37f9a8f) into dev.typeparamsCuong Manh Le
Conflicts: - src/go/types/check_test.go CL 330629 fixed a bug in package qualification logic - src/internal/buildcfg/exp.go CL 329930 make parseExperiments get go arch string as input param Merge List: + 2021-06-25 37f9a8f69d go/types: fix a bug in package qualification logic + 2021-06-24 c309c89db5 reflect: document that InterfaceData is a low-entropy RNG + 2021-06-24 cce621431a cmd/compile: fix wrong type in SSA generation for OSLICE2ARRPTR + 2021-06-24 600a2a4ffb cmd/go: don't try to add replaced versions that won't be selected + 2021-06-24 a9bb38222a net: remove hard-coded timeout in dialClosedPort test helper + 2021-06-24 86d72fa2cb time: handle invalid UTF-8 byte sequences in quote to prevent panic + 2021-06-24 44a12e5f33 cmd/go: search breadth-first instead of depth-first for test dependency cycles + 2021-06-24 73496e0df0 net: use absDomainName in the Windows lookupPTR test helper + 2021-06-24 222ed1b38a os: enable TestFifoEOF on openbsd + 2021-06-22 0ebd5a8de0 cmd/go: update ToolTags based on GOARCH value + 2021-06-22 5bd09e5efc spec: unsafe.Add/Slice are not permitted in statement context + 2021-06-22 666315b4d3 runtime/internal/atomic: remove incorrect pointer indirection in comment + 2021-06-22 63daa774b5 go/types: guard against checking instantiation when generics is disabled + 2021-06-22 197a5ee2ab cmd/gofmt: remove stale documentation for the -G flag + 2021-06-22 9afd158eb2 go/parser: parse an ast.IndexExpr for a[] + 2021-06-21 1bd5a20e3c cmd/go: add a -go flag to 'go mod graph' + 2021-06-21 761edf71f6 cmd/internal/moddeps: use a temporary directory for GOMODCACHE if needed + 2021-06-21 a0400420ad cmd/internal/moddeps: use -mod=readonly instead of -mod=mod + 2021-06-21 3f9ec83b10 cmd/go: document GOPPC64 environment variable + 2021-06-21 20bdfba325 go/scanner: fall back to next() when encountering 0 bytes in parseIdentifier + 2021-06-21 44f9a3566c database/sql: fix deadlock test in prepare statement Change-Id: I16490e8ea70ee65081f467223857033842da513a
2021-06-22runtime/internal/atomic: remove incorrect pointer indirection in commentXing Gao
Change-Id: I9d743b7f6b001158299bea4af4aede678654bc8e GitHub-Last-Rev: 7e07834abc861e21030fe4a8eb323bac01e18f7a GitHub-Pull-Request: golang/go#46851 Reviewed-on: https://go-review.googlesource.com/c/go/+/329730 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ben Shi <powerman1st@163.com>
2021-06-17[dev.typeparams] runtime/internal/sys: remove unused Goarch* and Goos* constantsMichael Anthony Knyszek
Change-Id: Ibc8381662242c6754f34edce9c0ad81681f55940 Reviewed-on: https://go-review.googlesource.com/c/go/+/329192 Trust: Michael Knyszek <mknyszek@google.com> Run-TryBot: Michael Knyszek <mknyszek@google.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org>
2021-06-17[dev.typeparams] internal/goarch,internal/goos: rename Goos and Goarch constantsMichael Anthony Knyszek
Lots of constants in these packages start with Goarch and Goos, which is redundant. Instead, add the "Is" prefix to make the constant clearer, and to differentiate from the arch family constants. Change-Id: Id92c1d3e911296a72949f8c9d649f142e7dc9d17 Reviewed-on: https://go-review.googlesource.com/c/go/+/328343 Trust: Michael Knyszek <mknyszek@google.com> Run-TryBot: Michael Knyszek <mknyszek@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2021-06-17[dev.typeparams] runtime/internal/sys: replace ArchFamily and constants with ↵Michael Anthony Knyszek
goarch Refactoring with rf rf 'ex . { import "internal/goarch" import "runtime/internal/sys" sys.ArchFamily -> goarch.ArchFamily sys.AMD64 -> goarch.AMD64 sys.ARM -> goarch.ARM sys.ARM64 -> goarch.ARM64 sys.I386 -> goarch.I386 sys.MIPS -> goarch.MIPS sys.MIPS64 -> goarch.MIPS64 sys.PPC64 -> goarch.PPC64 sys.RISCV64 -> goarch.RISCV64 sys.S390X -> goarch.S390X sys.WASM -> goarch.WASM }' Change-Id: I0cc29ed3fdcf9ff39aa901d8bc92270996f0821c Reviewed-on: https://go-review.googlesource.com/c/go/+/328341 Trust: Michael Knyszek <mknyszek@google.com> Run-TryBot: Michael Knyszek <mknyszek@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2021-06-17[dev.typeparams] runtime,runtime/internal/sys: remove unused BigEndianMichael Anthony Knyszek
Change-Id: I1209904326b1563e12d9c7d19a12a10c72d1dbcb Reviewed-on: https://go-review.googlesource.com/c/go/+/329191 Trust: Michael Knyszek <mknyszek@google.com> Run-TryBot: Michael Knyszek <mknyszek@google.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org>
2021-06-17[dev.typeparams] runtime/internal/sys: replace BigEndian with ↵Michael Anthony Knyszek
goarch.BigEndian [generated] [git-generate] cd src/runtime/internal/atomic gofmt -w -r "sys.BigEndian -> goarch.BigEndian" . goimports -w *.go cd ../.. gofmt -w -r "sys.BigEndian -> goarch.BigEndian" . goimports -w *.go Change-Id: Iad35d2b367d8defb081a77ca837e7a7c805c2b7b Reviewed-on: https://go-review.googlesource.com/c/go/+/329190 Trust: Michael Knyszek <mknyszek@google.com> Run-TryBot: Michael Knyszek <mknyszek@google.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org>
2021-06-17[dev.typeparams] runtime/internal/sys: replace GOOS with goos.GOOSMichael Anthony Knyszek
Refactoring done by rf tool: rf 'ex . { import "internal/goos" import "runtime/internal/sys" sys.GOOS -> goos.GOOS }' Change-Id: I4b4aadff8640731ce4cb9bdad9954c267eb484c8 Reviewed-on: https://go-review.googlesource.com/c/go/+/328339 Trust: Michael Knyszek <mknyszek@google.com> Run-TryBot: Michael Knyszek <mknyszek@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2021-06-17[dev.typeparams] runtime/internal/sys: replace uses of GOARCH with goarch.GOARCHMichael Anthony Knyszek
Refactoring performed by the rf tool: rf 'ex . { import "internal/goarch" import "runtime/internal/sys" sys.GOARCH -> goarch.GOARCH }' Change-Id: I4b0246bf4e734f08313c6fff7b547db362057714 Reviewed-on: https://go-review.googlesource.com/c/go/+/328338 Trust: Michael Knyszek <mknyszek@google.com> Run-TryBot: Michael Knyszek <mknyszek@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2021-06-17[dev.typeparams] runtime/internal/sys: remove unused PtrSizeMichael Anthony Knyszek
Change-Id: I01e079b95f71b01edaf049d49a0993a7ed39c7bf Reviewed-on: https://go-review.googlesource.com/c/go/+/328810 Trust: Michael Knyszek <mknyszek@google.com> Run-TryBot: Michael Knyszek <mknyszek@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2021-06-17[dev.typeparams] runtime: replace uses of runtime/internal/sys.PtrSize with ↵Michael Anthony Knyszek
internal/goarch.PtrSize [generated] [git-generate] cd src/runtime/internal/math gofmt -w -r "sys.PtrSize -> goarch.PtrSize" . goimports -w *.go cd ../.. gofmt -w -r "sys.PtrSize -> goarch.PtrSize" . goimports -w *.go Change-Id: I43491cdd54d2e06d4d04152b3d213851b7d6d423 Reviewed-on: https://go-review.googlesource.com/c/go/+/328337 Trust: Michael Knyszek <mknyszek@google.com> Run-TryBot: Michael Knyszek <mknyszek@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2021-06-17[dev.typeparams] internal/goarch,internal/goos: explode runtime/internal/sys ↵Michael Anthony Knyszek
into pieces This change extracts the GOOS and GOARCH specific constants from runtime/internal/sys into packages that are available to the entire standard library. This change does not yet update the runtime and associated packages to use them, and instead adds constants to runtime/internal/sys to forward the constants defined by these new packages. Change-Id: I14d574b8d7bfe599ad25da29dc1b39716e35a734 Reviewed-on: https://go-review.googlesource.com/c/go/+/328336 Trust: Michael Knyszek <mknyszek@google.com> Run-TryBot: Michael Knyszek <mknyszek@google.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org>
2021-06-02runtime/internal/sys: generate //go:build lines in gengoos.goTobias Klauser
For #41184 Change-Id: If7a1c3980f47bc28d0a13fe497eaba6178c65c91 Reviewed-on: https://go-review.googlesource.com/c/go/+/323750 Trust: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
2021-06-02runtime: fix formattingKeith Randall
Fix up a gofmt complaint from CL 310591. Change-Id: I73534ef064a4cfc53539e5e65a8653e2cd684c64 Reviewed-on: https://go-review.googlesource.com/c/go/+/324090 Trust: Keith Randall <khr@golang.org> Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org>
2021-05-13all: add //go:build lines to assembly filesTobias Klauser
Don't add them to files in vendor and cmd/vendor though. These will be pulled in by updating the respective dependencies. For #41184 Change-Id: Icc57458c9b3033c347124323f33084c85b224c70 Reviewed-on: https://go-review.googlesource.com/c/go/+/319389 Trust: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
2021-05-12runtime/internal/atomic: add LSE atomics instructions to arm64Jonathan Swinney
As a follow up to an earlier change[1] to add ARMv8+LSE instructions in the compiler generated atomic intrinsics, make the same change in the runtime library. Since not all ARMv8 systems support LSE instructions, they are protected by a feature-flag branch. [1]: golang.org/cl/234217 commit: ecc3f5112eba Change-Id: I0e2fb22e78d5eddb6547863667a8865946679a00 Reviewed-on: https://go-review.googlesource.com/c/go/+/310591 Reviewed-by: Cherry Mui <cherryyz@google.com> Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org> Trust: Heschi Kreinick <heschi@google.com>