diff options
| author | Michael Anthony Knyszek <mknyszek@google.com> | 2025-07-23 17:35:54 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2025-08-15 11:31:00 -0700 |
| commit | 13df972f6885ebdeba1ea38f0acd99ea0f2bfb49 (patch) | |
| tree | a21583595b6f0e8a29054840d6b04bba04f5fbe4 /src/runtime/mprof.go | |
| parent | bd07fafb0a2f979b2be05d9a533182ca55428079 (diff) | |
| download | go-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/mprof.go')
| -rw-r--r-- | src/runtime/mprof.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/mprof.go b/src/runtime/mprof.go index b2ff257f65..97b2907652 100644 --- a/src/runtime/mprof.go +++ b/src/runtime/mprof.go @@ -1308,7 +1308,7 @@ func goroutineProfileWithLabelsConcurrent(p []profilerecord.StackRecord, labels // allocation estimate without bothering to STW. As long as // this is close, then we'll only need to STW once (on the next // call). - return int(gcount()), false + return int(gcount(false)), false } semacquire(&goroutineProfile.sema) @@ -1324,7 +1324,7 @@ func goroutineProfileWithLabelsConcurrent(p []profilerecord.StackRecord, labels // goroutines that can vary between user and system to ensure that the count // doesn't change during the collection. So, check the finalizer goroutine // and cleanup goroutines in particular. - n = int(gcount()) + n = int(gcount(false)) if fingStatus.Load()&fingRunningFinalizer != 0 { n++ } |
