1
0
mirror of https://github.com/golang/go synced 2024-11-08 10:46:23 -07:00
go/src/runtime/pprof
Austin Clements b067ad939d runtime: record mutex event before readying
Currently, semrelease1 readies the next waiter before recording a
mutex event. However, if the next waiter is expecting to look at the
mutex profile, as is the case in TestMutexProfile, this may delay
recording the event too much.

Swap the order of these operations so semrelease1 records the mutex
event before readying the next waiter. This also means readying the
next waiter is the very last thing semrelease1 does, which seems
appropriate.

Fixes #19139.

Change-Id: I1a62063599fdb5d49bd86061a180c0a2d659474b
Reviewed-on: https://go-review.googlesource.com/45751
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Peter Weinberger <pjw@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-06-14 16:07:58 +00:00
..
internal/profile
testdata
elf.go
label_test.go
label.go
map.go
mprof_test.go
pprof_test.go runtime: record mutex event before readying 2017-06-14 16:07:58 +00:00
pprof.go runtime/pprof: don't produce 0 location in count profiles 2017-05-17 18:58:31 +00:00
proto_test.go
proto.go runtime/pprof: expand inlined frames in symbolized proto profiles 2017-05-15 18:20:23 +00:00
protobuf.go
protomem_test.go
protomem.go runtime/pprof: expand inlined frames in symbolized proto profiles 2017-05-15 18:20:23 +00:00
runtime_test.go
runtime.go