]> Cypherpunks repositories - gostls13.git/commit
runtime/pprof: include labels for caller of goroutine profile
authorRhys Hiltner <rhys@justin.tv>
Tue, 24 Oct 2023 20:10:13 +0000 (13:10 -0700)
committerGopher Robot <gobot@golang.org>
Wed, 25 Oct 2023 17:37:34 +0000 (17:37 +0000)
commit9cdcb01320d9a866e46a2daedb9bde16e0d51278
tree0de8efae82f1d513f70ef8bfa63e52a035114990
parent884c93a6df07eb62efeaa44265b58936d3084dd7
runtime/pprof: include labels for caller of goroutine profile

The goroutine profile has close to three code paths for adding a
goroutine record to the goroutine profile: one for the goroutine that
requested the profile, one for every other goroutine, plus some special
handling for the finalizer goroutine. The first of those captured the
goroutine stack, but neglected to include that goroutine's labels.

Update the tests to check for the inclusion of labels for all three
types of goroutines, and include labels for the creator of the goroutine
profile.

For #63712

Change-Id: Id5387a5f536d3c37268c240e0b6db3d329a3d632
Reviewed-on: https://go-review.googlesource.com/c/go/+/537515
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Rhys Hiltner <rhys@justin.tv>
Reviewed-by: David Chase <drchase@google.com>
src/runtime/mprof.go
src/runtime/pprof/pprof_test.go