aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/debug.go
diff options
context:
space:
mode:
authorMichael Anthony Knyszek <mknyszek@google.com>2025-07-23 17:35:54 +0000
committerGopher Robot <gobot@golang.org>2025-08-15 11:31:00 -0700
commit13df972f6885ebdeba1ea38f0acd99ea0f2bfb49 (patch)
treea21583595b6f0e8a29054840d6b04bba04f5fbe4 /src/runtime/debug.go
parentbd07fafb0a2f979b2be05d9a533182ca55428079 (diff)
downloadgo-13df972f6885ebdeba1ea38f0acd99ea0f2bfb49.tar.xz
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 <mpratt@google.com> Auto-Submit: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/runtime/debug.go')
-rw-r--r--src/runtime/debug.go2
1 files changed, 1 insertions, 1 deletions
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