]> Cypherpunks.ru repositories - gostls13.git/commit
[release-branch.go1.22] runtime: fix trace EvGoStop Gosched reason to match function
authorMichael Anthony Knyszek <mknyszek@google.com>
Thu, 21 Dec 2023 20:26:38 +0000 (20:26 +0000)
committerMichael Knyszek <mknyszek@google.com>
Thu, 1 Feb 2024 22:47:23 +0000 (22:47 +0000)
commit5d647ed9fc00100d2131372de9b3433ad65aeb5a
tree99fa105c9aaf7a95b9fc800022036b10e4c1a48e
parente34f6a9928942d227513e6bf51a94db87d9ec07d
[release-branch.go1.22] runtime: fix trace EvGoStop Gosched reason to match function

Currently the stop reason for runtime.Gosched is labeled
"runtime.GoSched" which doesn't actually match the function name. Fix
the label to match the function name.

This change doesn't regenerate the internal/trace/v2 tests, because
regenerating the tests breaks summarization tests in internal/trace that
rely on very specific details in the example traces that aren't
guaranteed. Also, go122-gc-trace.test isn't generated at all, as it
turns out. I'll fix this all up in a follow-up CL. For now, just replace
runtime.GoSched with runtime.Gosched in the traces so we don't have a
problem later if a test wants to look for that string.

This change does regenerate the cmd/trace/v2 test, but it turns out the
cmd/trace/v2 tests are way too strict about network unblock events, and
3 usually pop up instead of 1 or 2, which is what the test expects.
AFAICT this looks plausible to me, so just lift the restriction on
"up to 2" events entirely.

Change-Id: Id7350132be19119c743c259f2f5250903bf41a04
Reviewed-on: https://go-review.googlesource.com/c/go/+/552275
TryBot-Bypass: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
(cherry picked from commit 287f791845ac0311012814f4419d5e043c212d17)
Reviewed-on: https://go-review.googlesource.com/c/go/+/560555
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
src/cmd/trace/v2/jsontrace_test.go
src/cmd/trace/v2/testdata/go122.test
src/internal/trace/v2/testdata/tests/go122-annotations-stress.test
src/internal/trace/v2/testdata/tests/go122-annotations.test
src/internal/trace/v2/testdata/tests/go122-gc-stress.test
src/internal/trace/v2/trace_test.go
src/runtime/trace2runtime.go