aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/align_runtime_test.go
AgeCommit message (Collapse)Author
2025-05-08runtime: remove ptr/scalar bitmap metrickhr@golang.org
We don't use this mechanism any more, so the metric will always be zero. Since CL 616255. Update #73628 Change-Id: Ic179927a8bc24e6291876c218d88e8848b057c2a Reviewed-on: https://go-review.googlesource.com/c/go/+/671096 Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Auto-Submit: Keith Randall <khr@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-03-25runtime: migrate internal/atomic to internal/runtimeAndy Pan
For #65355 Change-Id: I65dd090fb99de9b231af2112c5ccb0eb635db2be Reviewed-on: https://go-review.googlesource.com/c/go/+/560155 Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ibrahim Bazoka <ibrahimbazoka729@gmail.com> Auto-Submit: Emmanuel Odeke <emmanuel@orijtech.com>
2022-08-23runtime: convert ticksType.val to atomic typeCuong Manh Le
Updates #53821 Change-Id: Ia0c58d7e7e11a1b52bbb7c19ebbb131e3eea5314 Reviewed-on: https://go-review.googlesource.com/c/go/+/424926 Reviewed-by: Michael Knyszek <mknyszek@google.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Pratt <mpratt@google.com>
2022-08-18runtime: remove p padding field for atomic fields alignmentCuong Manh Le
CL 424396 and CL 424397 changed timer0When/timerModifiedEarliest to atomic.Uint64, just they're guaranted to have 64-bit alignment. Change-Id: Idaff1059da2aac84520b9b0e34f9721a74dbba5a Reviewed-on: https://go-review.googlesource.com/c/go/+/424794 Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Michael Pratt <mpratt@google.com>
2022-08-12runtime: convert timeHistogram to atomic typesMichael Pratt
I've dropped the note that sched.timeToRun is protected by sched.lock, as it does not seem to be true. For #53821. Change-Id: I03f8dc6ca0bcd4ccf3ec113010a0aa39c6f7d6ef Reviewed-on: https://go-review.googlesource.com/c/go/+/419449 Reviewed-by: Austin Clements <austin@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Michael Pratt <mpratt@google.com>
2022-08-12runtime: convert schedt.pollUntil to atomic typeMichael Pratt
Note that this converts pollUntil from uint64 to int64, the type used by nanotime(). For #53821. Change-Id: Iec9ec7e09d3350552561d0708ba6ea9e8a8ae7ab Reviewed-on: https://go-review.googlesource.com/c/go/+/419443 Run-TryBot: Michael Pratt <mpratt@google.com> Reviewed-by: Austin Clements <austin@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-08-12runtime: convert schedt.lastpoll to atomic typeMichael Pratt
Note that this changes the type from uint64 to int64, the type used by nanotime(). It also adds an atomic load in pollWork(), which used to use a non-atomic load. For #53821. Change-Id: I6173c90f20bfdc0e0a4bc3a7b1c798d1c429fff5 Reviewed-on: https://go-review.googlesource.com/c/go/+/419442 Run-TryBot: Michael Pratt <mpratt@google.com> Reviewed-by: Austin Clements <austin@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-08-12runtime: convert schedt.goidgen to atomic typeMichael Pratt
For #53821. Change-Id: I84c96ade5982b8e68d1d1787bf1bfa16a17a4fb4 Reviewed-on: https://go-review.googlesource.com/c/go/+/419439 Reviewed-by: Austin Clements <austin@google.com> Run-TryBot: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-08-08runtime: convert gcController.dedicatedMarkWorkersNeeded to atomic typeMichael Pratt
In gcController.startCycle we just compute the initial value in a local variable before assigning to the atomic field to avoid noisy churn. For #53821. Change-Id: Ibde0ac8fd49aa6bbee3bd02fe3ffb17429abd5a9 Reviewed-on: https://go-review.googlesource.com/c/go/+/417784 Run-TryBot: Michael Pratt <mpratt@google.com> Reviewed-by: Austin Clements <austin@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-08-08runtime: convert gcController.idleMarkTime to atomic typeMichael Pratt
For #53821. Change-Id: I2f2b462908096dacb97fba9973798036ea1d9b68 Reviewed-on: https://go-review.googlesource.com/c/go/+/417783 Run-TryBot: Michael Pratt <mpratt@google.com> Reviewed-by: Austin Clements <austin@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-08-08runtime: convert gcController.fractionalMarkTime to atomic typeMichael Pratt
For #53821. Change-Id: Ic54bda422b87ee9365090fe6b42b82df7b25d2a1 Reviewed-on: https://go-review.googlesource.com/c/go/+/417782 Run-TryBot: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
2022-08-08runtime: convert gcController.dedicatedMarkTime to atomic typeMichael Pratt
For #53821. Change-Id: I772b58b21392855af95ee5b932cdd7a0b507e4e5 Reviewed-on: https://go-review.googlesource.com/c/go/+/417781 Reviewed-by: Austin Clements <austin@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Michael Pratt <mpratt@google.com>
2022-08-08runtime: convert gcController.bgScanCredit to atomic typeMichael Pratt
For #53821. Change-Id: I9ccce3eb0adf4300095743c24a411213428306b4 Reviewed-on: https://go-review.googlesource.com/c/go/+/417780 Reviewed-by: Austin Clements <austin@google.com> Run-TryBot: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-08-08runtime: convert gcController.globalsScan to atomic typeMichael Pratt
For #53821. Change-Id: I92bd33e355c868ae229395fd9c98fdb10768d03d Reviewed-on: https://go-review.googlesource.com/c/go/+/417779 Run-TryBot: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
2022-08-08runtime: convert gcController.maxStackScan to atomic typeMichael Pratt
For #53821. Change-Id: I1bd23cdbc371011ec2331fb0a37482ecf99a063b Reviewed-on: https://go-review.googlesource.com/c/go/+/417778 Run-TryBot: Michael Pratt <mpratt@google.com> Reviewed-by: Austin Clements <austin@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-08-08runtime: convert gcController.lastStackScan to atomic typeMichael Pratt
For #53821. Change-Id: I6a7dcc9b72683e977a2b8d90e521a53a8a508558 Reviewed-on: https://go-review.googlesource.com/c/go/+/417777 Run-TryBot: Michael Pratt <mpratt@google.com> Reviewed-by: Austin Clements <austin@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-08-08runtime: convert gcController.heapScan to atomic typeMichael Pratt
For #53821. Change-Id: I64d3f53c89a579d93056906304e4c05fc35cd9b3 Reviewed-on: https://go-review.googlesource.com/c/go/+/417776 Run-TryBot: Michael Pratt <mpratt@google.com> Reviewed-by: Austin Clements <austin@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-08-08runtime: convert gcController.heapLive to atomic typeMichael Pratt
Atomic operations are used even during STW for consistency. For #53821. Change-Id: Ibe7afe5cf893b1288ce24fc96b7691b1f81754ff Reviewed-on: https://go-review.googlesource.com/c/go/+/417775 Run-TryBot: Michael Pratt <mpratt@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-05-19runtime: test alignment of fields targeted by 64-bit atomicsKeith Randall
Make sure that all the targets of 64-bit atomic operations are actually aligned to 8 bytes. This has been a source of bugs on 32-bit systems. (e.g. CL 399754) The strategy is to have a simple test that just checks the alignment of some explicitly listed fields and global variables. Then there's a more complicated test that makes sure the list used in the simple test is exhaustive. That test has some limitations, but it should catch most cases, particularly new uses of atomic operations on new or existing fields. Unlike a runtime assert, this check is free and will catch accesses that occur even in very unlikely code paths. Change-Id: I25ac78df471ac33b57cb91375bd8453d6ce2814f Reviewed-on: https://go-review.googlesource.com/c/go/+/407034 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: David Chase <drchase@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>