]> Cypherpunks repositories - gostls13.git/commitdiff
runtime/pprof: TestLabelSystemstack parallelLabelHog.func1 must be labeled
authorMichael Pratt <mpratt@google.com>
Fri, 21 Jan 2022 16:07:52 +0000 (11:07 -0500)
committerMichael Pratt <mpratt@google.com>
Fri, 21 Jan 2022 16:59:19 +0000 (16:59 +0000)
The closure in parallelLabelHog should be labeled in a addition to
parallelLabelHog itself. Generally samples on that goroutine land on
labelHog, but there is a small portion of the closure outside of
labelHog.

Fixes #50740.

Change-Id: I363b6d8eec2e6920c215686e2039fce6d5b29a98
Reviewed-on: https://go-review.googlesource.com/c/go/+/380055
Reviewed-by: Bryan Mills <bcmills@google.com>
Trust: Michael Pratt <mpratt@google.com>

src/runtime/pprof/pprof_test.go

index 19b9754e8b65e19713be98128adb500fcc57447e..1a44ab7ad726c3987d28e55682c37bd28c34011e 100644 (file)
@@ -1448,7 +1448,7 @@ func TestLabelSystemstack(t *testing.T) {
                for _, loc := range s.Location {
                        for _, l := range loc.Line {
                                switch l.Function.Name {
-                               case "runtime/pprof.labelHog", "runtime/pprof.parallelLabelHog":
+                               case "runtime/pprof.labelHog", "runtime/pprof.parallelLabelHog", "runtime/pprof.parallelLabelHog.func1":
                                        mustBeLabeled = true
                                case "runtime/pprof.Do":
                                        // Do sets the labels, so samples may