From 13df972f6885ebdeba1ea38f0acd99ea0f2bfb49 Mon Sep 17 00:00:00 2001 From: Michael Anthony Knyszek Date: Wed, 23 Jul 2025 17:35:54 +0000 Subject: runtime/metrics: add metrics for goroutine sched states This is largely a port of CL 38180. For #15490. Change-Id: I2726111e472e81e9f9f0f294df97872c2689f061 Reviewed-on: https://go-review.googlesource.com/c/go/+/690397 Reviewed-by: Michael Pratt Auto-Submit: Michael Knyszek LUCI-TryBot-Result: Go LUCI --- src/runtime/runtime2.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/runtime/runtime2.go') diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go index b5d2dcefad..c5d15754ec 100644 --- a/src/runtime/runtime2.go +++ b/src/runtime/runtime2.go @@ -792,7 +792,8 @@ type schedt struct { nmsys int32 // number of system m's not counted for deadlock nmfreed int64 // cumulative number of freed m's - ngsys atomic.Int32 // number of system goroutines + ngsys atomic.Int32 // number of system goroutines + nGsyscallNoP atomic.Int32 // number of goroutines in syscalls without a P pidle puintptr // idle p's npidle atomic.Int32 -- cgit v1.3