]> Cypherpunks repositories - gostls13.git/commit
runtime, cmd/trace: track goroutines blocked on GC assists
authorAustin Clements <austin@google.com>
Sat, 8 Oct 2016 22:38:35 +0000 (18:38 -0400)
committerAustin Clements <austin@google.com>
Fri, 28 Oct 2016 14:29:47 +0000 (14:29 +0000)
commit6da83c6fc006019f6fe0503099d165e19f465b1b
tree155fe589bc74911e73cd403ca40a9254af2feb81
parent640e9169155ea96a6f1156663269dba5babf0632
runtime, cmd/trace: track goroutines blocked on GC assists

Currently when a goroutine blocks on a GC assist, it emits a generic
EvGoBlock event. Since assist blocking events and, in particular, the
length of the blocked assist queue, are important for diagnosing GC
behavior, this commit adds a new EvGoBlockGC event for blocking on a
GC assist. The trace viewer uses this event to report a "waiting on
GC" count in the "Goroutines" row. This makes sense because, unlike
other blocked goroutines, these goroutines do have work to do, so
being blocked on a GC assist is quite similar to being in the
"runnable" state, which we also report in the trace viewer.

Change-Id: Ic21a326992606b121ea3d3d00110d8d1fdc7a5ef
Reviewed-on: https://go-review.googlesource.com/30704
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
src/cmd/trace/pprof.go
src/cmd/trace/trace.go
src/internal/trace/goroutines.go
src/internal/trace/order.go
src/internal/trace/parser.go
src/runtime/mgcmark.go
src/runtime/trace.go