1
0
mirror of https://github.com/golang/go synced 2024-09-29 12:14:28 -06:00
go/misc
Michael Anthony Knyszek 4c943abb95 runtime: fix comments on the behavior of SetGCPercent
Fixes for #49680, #49695, #45867, and #49370 all assumed that
SetGCPercent(-1) doesn't block until the GC's mark phase is done, but
it actually does. The cause of 3 of those 4 failures comes from the fact
that at the beginning of the sweep phase, the GC does try to preempt
every P once, and this may run concurrently with test code. In the
fourth case, the issue was likely that only *one* of the debug_test.go
tests was missing a call to SetGCPercent(-1). Just to be safe, leave a
TODO there for now to remove the extraneous runtime.GC calls, but leave
the calls in.

Updates #49680, #49695, #45867, and #49370.

Change-Id: Ibf4e64addfba18312526968bcf40f1f5d54eb3f1
Reviewed-on: https://go-review.googlesource.com/c/go/+/369815
Reviewed-by: Austin Clements <austin@google.com>
Trust: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2021-12-07 17:46:04 +00:00
..
android all: gofmt more (but vendor, testdata, and top-level test directories) 2021-08-13 20:45:17 +00:00
arm
cgo runtime: fix comments on the behavior of SetGCPercent 2021-12-07 17:46:04 +00:00
chrome/gophertool docs: fix case of GitHub 2021-03-05 02:35:21 +00:00
ios misc/ios: bump min version 2021-12-02 16:48:07 +00:00
linkcheck all: use bytes.Cut, strings.Cut 2021-10-06 15:53:04 +00:00
reboot misc/reboot: skip TestRepeatBootstrap on short builders 2021-11-23 16:52:38 +00:00
swig cmd/go: fix swig support and run swig tests during run.bash 2017-11-16 17:19:19 +00:00
trace all: use HTML5 br tags 2021-03-13 03:38:42 +00:00
wasm cmd/link: increase reserved space for passing env on wasm 2021-10-25 20:08:25 +00:00
editors
go.mod cmd/cgo: update to handle ast.IndexListExpr 2021-10-07 18:02:14 +00:00