1
0
mirror of https://github.com/golang/go synced 2024-11-19 20:54:39 -07:00
go/src/runtime/pprof
Dmitry Vyukov 4396ea96c4 runtime: remove futile wakeups from trace
Channels and sync.Mutex'es allow another goroutine to acquire resource
ahead of an unblocked goroutine. This is good for performance, but
leads to futile wakeups (the unblocked goroutine needs to block again).
Futile wakeups caused user confusion during the very first evaluation
of tracing functionality on a real server (a goroutine as if acquires a mutex
in a loop, while there is no loop in user code).

This change detects futile wakeups on channels and emits a special event
to denote the fact. Later parser finds entire wakeup sequences
(unblock->start->block) and removes them.

sync.Mutex will be supported in a separate change.

Change-Id: Iaaaee9d5c0921afc62b449a97447445030ac19d3
Reviewed-on: https://go-review.googlesource.com/7380
Reviewed-by: Keith Randall <khr@golang.org>
2015-03-17 14:14:55 +00:00
..
mprof_test.go runtime/pprof: fix memory profiler test 2014-10-17 21:28:47 +04:00
pprof_test.go runtime/pprof: skip tests that fork on darwin/arm 2015-02-27 19:55:54 +00:00
pprof.go runtime/pprof: add tracing support 2015-01-28 16:40:35 +00:00
trace_stack_test.go cmd/trace: move goroutine analysis code to internal/trace 2015-03-11 12:53:24 +00:00
trace_test.go runtime: remove futile wakeups from trace 2015-03-17 14:14:55 +00:00