From ca7d300509626e2071f3f5babc2e9c121d806fec Mon Sep 17 00:00:00 2001 From: Rhys Hiltner Date: Wed, 29 May 2024 16:41:10 +0000 Subject: Revert "runtime: remove GODEBUG=runtimecontentionstacks" This reverts commit 87e930f7289136fad1310d4b63dd4127e409bac5 (CL 585639) Reason for revert: This is part of a patch series that changed the handling of contended lock2/unlock2 calls, reducing the maximum throughput of contended runtime.mutex values, and causing a performance regression on applications where that is (or became) the bottleneck. Updates #66999 Updates #67585 Change-Id: I1e286d2a16d16e4af202cd5dc04b2d9c4ee71b32 Reviewed-on: https://go-review.googlesource.com/c/go/+/589097 Reviewed-by: Than McIntosh LUCI-TryBot-Result: Go LUCI Reviewed-by: Michael Pratt Auto-Submit: Rhys Hiltner --- src/runtime/pprof/pprof.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/runtime/pprof') diff --git a/src/runtime/pprof/pprof.go b/src/runtime/pprof/pprof.go index 43ef66f0b0..be17e59875 100644 --- a/src/runtime/pprof/pprof.go +++ b/src/runtime/pprof/pprof.go @@ -166,6 +166,12 @@ import ( // holds a lock for 1s while 5 other goroutines are waiting for the entire // second to acquire the lock, its unlock call stack will report 5s of // contention. +// +// Runtime-internal locks are always reported at the location +// "runtime._LostContendedRuntimeLock". More detailed stack traces for +// runtime-internal locks can be obtained by setting +// `GODEBUG=runtimecontentionstacks=1` (see package [runtime] docs for +// caveats). type Profile struct { name string mu sync.Mutex -- cgit v1.3-6-g1900