]> Cypherpunks repositories - gostls13.git/commit
runtime: report finalizer and cleanup queue length with checkfinalizer>0
authorMichael Anthony Knyszek <mknyszek@google.com>
Fri, 9 May 2025 19:33:22 +0000 (19:33 +0000)
committerGopher Robot <gobot@golang.org>
Tue, 20 May 2025 19:04:52 +0000 (12:04 -0700)
commit0d42cebacdba1855d11f29f708587c9a7a5cb976
treedd334c94d40e11be4903548e9e031e4ce4fc241d
parent2aac5a5cbacdaaefb518be7ea8ddc2a455ae35f2
runtime: report finalizer and cleanup queue length with checkfinalizer>0

This change adds tracking for approximate finalizer and cleanup queue
lengths. These lengths are reported once every GC cycle as a single line
printed to stderr when GODEBUG=checkfinalizer>0.

This change lays the groundwork for runtime/metrics metrics to produce
the same values.

For #72948.
For #72950.

Change-Id: I081721238a0fc4c7e5bee2dbaba6cfb4120d1a33
Reviewed-on: https://go-review.googlesource.com/c/go/+/671437
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/runtime/mcleanup.go
src/runtime/mfinal.go
src/runtime/mgc.go
src/runtime/proc.go
src/runtime/runtime2.go