1
0
mirror of https://github.com/golang/go synced 2024-09-29 00:24:30 -06:00
go/misc/cgo
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
..
errors all: use bytes.Cut, strings.Cut 2021-10-06 15:53:04 +00:00
fortran misc/cgo/fortran: avoid writing to $PWD 2019-11-20 22:37:23 +00:00
gmp all: gofmt more (but vendor, testdata, and top-level test directories) 2021-08-13 20:45:17 +00:00
life all: update references to symbols moved from io/ioutil to io 2021-04-05 17:51:15 +00:00
nocgo
stdio all: update references to symbols moved from io/ioutil to io 2021-04-05 17:51:15 +00:00
test runtime: fix comments on the behavior of SetGCPercent 2021-12-07 17:46:04 +00:00
testasan misc: log 'ok' from 'go run' tests on success 2019-11-25 16:43:27 +00:00
testcarchive runtime: install sigPreempt signal handler for c-archive/c-shared 2021-11-03 00:49:50 +00:00
testcshared misc/cgo/testcshared: skip TestGo2C2Go on Windows 2021-11-22 18:57:50 +00:00
testgodefs cmd/cgo: for godefs, don't let field prefix removal cause duplicates 2021-09-16 23:56:28 +00:00
testplugin misc/cgo/testplugin: remove skip in TestIssue25756pie 2021-12-07 00:03:34 +00:00
testsanitizers cmd/dist: add asan tests in misc/cgo/testsanitizers package 2021-11-02 06:21:44 +00:00
testshared misc/cgo/testshared: correct test of gccgo version number 2021-11-11 04:54:05 +00:00
testsigfwd misc: log 'ok' from 'go run' tests on success 2019-11-25 16:43:27 +00:00
testso all: gofmt more (but vendor, testdata, and top-level test directories) 2021-08-13 20:45:17 +00:00
testsovar all: gofmt more (but vendor, testdata, and top-level test directories) 2021-08-13 20:45:17 +00:00
testtls all: gofmt more (but vendor, testdata, and top-level test directories) 2021-08-13 20:45:17 +00:00