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/debug.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/runtime/debug.go') diff --git a/src/runtime/debug.go b/src/runtime/debug.go index dacadd2721..56b766f11f 100644 --- a/src/runtime/debug.go +++ b/src/runtime/debug.go @@ -177,7 +177,7 @@ func totalMutexWaitTimeNanos() int64 { // NumGoroutine returns the number of goroutines that currently exist. func NumGoroutine() int { - return int(gcount()) + return int(gcount(false)) } //go:linkname debug_modinfo runtime/debug.modinfo -- cgit v1.3