]> Cypherpunks repositories - gostls13.git/commit
runtime,runtime/pprof: clean up goroutine leak profile writing
authorVlad Saioc <vsaioc@uber.com>
Thu, 6 Nov 2025 09:53:28 +0000 (09:53 +0000)
committerMichael Knyszek <mknyszek@google.com>
Wed, 12 Nov 2025 16:08:34 +0000 (08:08 -0800)
commit8873e8bea29ac6de5fecee88b8b81239bd2eb179
tree611e017bb3870c45c3d0ab213269e88fddbd9046
parentb8b84b789e4275aeea491dbdb50536facd1fa7d7
runtime,runtime/pprof: clean up goroutine leak profile writing

Cleaned up goroutine leak profile extraction:
- removed the acquisition of goroutineProfile semaphore
- inlined the call to saveg when recording stacks instead of using
doRecordGoroutineProfile, which had side-effects over
goroutineProfile fields.

Added regression tests for goroutine leak profiling frontend for binary
and debug=1 profile formats.
Added stress tests for concurrent goroutine and goroutine leak profile requests.

Change-Id: I55c1bcef11e9a7fb7699b4c5a2353e594d3e7173
GitHub-Last-Rev: 5e9eb3b1d80c4d2d9b668a01f6b39a7b42f7bb45
GitHub-Pull-Request: golang/go#76045
Reviewed-on: https://go-review.googlesource.com/c/go/+/714580
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
src/runtime/mprof.go
src/runtime/pprof/pprof.go
src/runtime/pprof/pprof_test.go